diff --git a/Source/GrasscutterTools/App.config b/Source/GrasscutterTools/App.config index 33800ae..ca17ac4 100644 --- a/Source/GrasscutterTools/App.config +++ b/Source/GrasscutterTools/App.config @@ -61,6 +61,9 @@ + + False + \ No newline at end of file diff --git a/Source/GrasscutterTools/Forms/FormMain.cs b/Source/GrasscutterTools/Forms/FormMain.cs index 55286b9..42315de 100644 --- a/Source/GrasscutterTools/Forms/FormMain.cs +++ b/Source/GrasscutterTools/Forms/FormMain.cs @@ -230,10 +230,10 @@ namespace GrasscutterTools.Forms /// 参数 private void SetCommand(string command, string args) { - //if (ChkIncludeUID.Checked) - // SetCommand($"{command} @{NUDUid.Value} {args.Trim()}"); - //else - SetCommand($"{command} {args.Trim()}"); + if (Settings.Default.IsIncludeUID) + SetCommand($"{command} @{Settings.Default.Uid} {args.Trim()}"); + else + SetCommand($"{command} {args.Trim()}"); } /// diff --git a/Source/GrasscutterTools/Pages/PageHome.cs b/Source/GrasscutterTools/Pages/PageHome.cs index 967f1b9..a13aaa2 100644 --- a/Source/GrasscutterTools/Pages/PageHome.cs +++ b/Source/GrasscutterTools/Pages/PageHome.cs @@ -46,6 +46,10 @@ namespace GrasscutterTools.Pages NUDUid.Value = Settings.Default.Uid; NUDUid.ValueChanged += (o, e) => Settings.Default.Uid = NUDUid.Value; + // 是否包含UID + ChkIncludeUID.Checked = Settings.Default.IsIncludeUID; + ChkIncludeUID.CheckedChanged += (o, e) => Settings.Default.IsIncludeUID = ChkIncludeUID.Checked; + // 置顶 ChkTopMost.Checked = Settings.Default.IsTopMost; ChkTopMost.CheckedChanged += (o, e) => Settings.Default.IsTopMost = ParentForm.TopMost = ChkTopMost.Checked; diff --git a/Source/GrasscutterTools/Properties/Settings.Designer.cs b/Source/GrasscutterTools/Properties/Settings.Designer.cs index ed05a22..25f67b5 100644 --- a/Source/GrasscutterTools/Properties/Settings.Designer.cs +++ b/Source/GrasscutterTools/Properties/Settings.Designer.cs @@ -226,5 +226,17 @@ namespace GrasscutterTools.Properties { this["BannersJsonPath"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool IsIncludeUID { + get { + return ((bool)(this["IsIncludeUID"])); + } + set { + this["IsIncludeUID"] = value; + } + } } } diff --git a/Source/GrasscutterTools/Properties/Settings.settings b/Source/GrasscutterTools/Properties/Settings.settings index f407dcc..bb28457 100644 --- a/Source/GrasscutterTools/Properties/Settings.settings +++ b/Source/GrasscutterTools/Properties/Settings.settings @@ -53,5 +53,8 @@ + + False + \ No newline at end of file diff --git a/Source/GrasscutterTools/Utils/Common.cs b/Source/GrasscutterTools/Utils/Common.cs index 69f4eef..6529283 100644 --- a/Source/GrasscutterTools/Utils/Common.cs +++ b/Source/GrasscutterTools/Utils/Common.cs @@ -31,5 +31,15 @@ namespace GrasscutterTools.Utils Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "GrasscutterTools", filename); + + /// + /// UID + /// + public static int UID { get; set; } + + /// + /// 生成命令是否包含UID + /// + public static bool IsIncludeUID { get; set; } } }