mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-03-13 08:23:53 +01:00
Use hand-mande Settings.cs
This commit is contained in:
parent
57b36c7e53
commit
84a9376469
|
|
@ -4,15 +4,17 @@
|
|||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="SteamController.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="SteamController.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
<SteamController.Settings>
|
||||
<setting name="EnableSteamDetection" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="StartupProfile" serializeAs="String">
|
||||
<value>Desktop</value>
|
||||
</setting>
|
||||
</SteamController.Settings>
|
||||
</userSettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
|
@ -82,14 +82,8 @@ namespace SteamController
|
|||
|
||||
foreach (var manager in Managers)
|
||||
{
|
||||
try
|
||||
{
|
||||
manager.Tick(this);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceLine("Manager: {0}. Exception: {1}", manager, e);
|
||||
}
|
||||
try { manager.Tick(this); }
|
||||
catch (Exception e) { TraceLine("Manager: Tick: {0}. Exception: {1}", manager, e); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using CommonHelpers;
|
||||
using CommonHelpers;
|
||||
using ExternalHelpers;
|
||||
using SteamController.Profiles;
|
||||
using System.ComponentModel;
|
||||
|
|
@ -304,7 +304,8 @@ namespace SteamController
|
|||
{
|
||||
Desktop = ProfilesSettings.BackPanelSettings.Desktop,
|
||||
X360 = ProfilesSettings.BackPanelSettings.X360,
|
||||
X360Rumble = ProfilesSettings.X360RumbleSettings.Default
|
||||
X360Rumble = ProfilesSettings.X360RumbleSettings.Default,
|
||||
Application = Settings.Default
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
50
SteamController/Settings.Designer.cs
generated
50
SteamController/Settings.Designer.cs
generated
|
|
@ -1,50 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SteamController {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool EnableSteamDetection {
|
||||
get {
|
||||
return ((bool)(this["EnableSteamDetection"]));
|
||||
}
|
||||
set {
|
||||
this["EnableSteamDetection"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Desktop")]
|
||||
public string StartupProfile {
|
||||
get {
|
||||
return ((string)(this["StartupProfile"]));
|
||||
}
|
||||
set {
|
||||
this["StartupProfile"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
SteamController/Settings.cs
Normal file
43
SteamController/Settings.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
|
||||
namespace SteamController
|
||||
{
|
||||
[Category("Settings")]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
internal sealed partial class Settings : ApplicationSettingsBase
|
||||
{
|
||||
public static readonly Settings Default = (Settings)Synchronized(new Settings());
|
||||
|
||||
public Settings()
|
||||
{
|
||||
PropertyChanged += delegate
|
||||
{
|
||||
Save();
|
||||
};
|
||||
}
|
||||
|
||||
[UserScopedSetting]
|
||||
[DefaultSettingValue("False")]
|
||||
[BrowsableAttribute(false)]
|
||||
public bool EnableSteamDetection
|
||||
{
|
||||
get { return ((bool)(this["EnableSteamDetection"])); }
|
||||
set { this["EnableSteamDetection"] = value; }
|
||||
}
|
||||
|
||||
[ApplicationScopedSetting]
|
||||
[DefaultSettingValue("Desktop")]
|
||||
[BrowsableAttribute(false)]
|
||||
public string StartupProfile
|
||||
{
|
||||
get { return ((string)(this["StartupProfile"])); }
|
||||
set { this["StartupProfile"] = value; }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SteamController" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="EnableSteamDetection" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="StartupProfile" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Desktop</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
|
|
@ -44,11 +44,6 @@
|
|||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Settings.Designer.cs">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -58,11 +53,4 @@
|
|||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in a new issue