mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-08-02 16:59:14 +08:00
Add Command Version Control
Add more comments(zh) Optimize code structure Update the loading order to avoid repeated loading to optimize startup speed.
This commit is contained in:
parent
eba9db1e35
commit
aff13c2a97
@ -17,7 +17,7 @@
|
||||
<value>10001</value>
|
||||
</setting>
|
||||
<setting name="DefaultLanguage" serializeAs="String">
|
||||
<value>zh-CN</value>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ResourcesDirPath" serializeAs="String">
|
||||
<value />
|
||||
@ -38,7 +38,7 @@
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CommandVersion" serializeAs="String">
|
||||
<value>1.2.2</value>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="IsTopMost" serializeAs="String">
|
||||
<value>False</value>
|
||||
|
90
Source/GrasscutterTools/Forms/FormMain.Designer.cs
generated
90
Source/GrasscutterTools/Forms/FormMain.Designer.cs
generated
@ -75,7 +75,6 @@ namespace GrasscutterTools.Forms
|
||||
this.DTPBanEndTime = new System.Windows.Forms.DateTimePicker();
|
||||
this.BtnUnban = new System.Windows.Forms.Button();
|
||||
this.BtnBan = new System.Windows.Forms.Button();
|
||||
this.TxtBanReason = new GrasscutterTools.Controls.TextBoxXP();
|
||||
this.NUDBanUID = new System.Windows.Forms.NumericUpDown();
|
||||
this.LblBanUID = new System.Windows.Forms.Label();
|
||||
this.GrpAccount = new System.Windows.Forms.GroupBox();
|
||||
@ -219,13 +218,15 @@ namespace GrasscutterTools.Forms
|
||||
this.GrasscutterToolsIcon = new System.Windows.Forms.PictureBox();
|
||||
this.GrpSettings = new System.Windows.Forms.GroupBox();
|
||||
this.ChkTopMost = new System.Windows.Forms.CheckBox();
|
||||
this.ChkNewCommand = new System.Windows.Forms.CheckBox();
|
||||
this.CmbLanguage = new System.Windows.Forms.ComboBox();
|
||||
this.LblLanguage = new System.Windows.Forms.Label();
|
||||
this.NUDUid = new System.Windows.Forms.NumericUpDown();
|
||||
this.ChkIncludeUID = new System.Windows.Forms.CheckBox();
|
||||
this.LblDefaultUid = new System.Windows.Forms.Label();
|
||||
this.TCMain = new System.Windows.Forms.TabControl();
|
||||
this.CmbGcVersions = new System.Windows.Forms.ComboBox();
|
||||
this.LblGCVersion = new System.Windows.Forms.Label();
|
||||
this.TxtBanReason = new GrasscutterTools.Controls.TextBoxXP();
|
||||
this.GrpCommand.SuspendLayout();
|
||||
this.TPRemoteCall.SuspendLayout();
|
||||
this.GrpServerStatus.SuspendLayout();
|
||||
@ -322,7 +323,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPRemoteCall
|
||||
//
|
||||
resources.ApplyResources(this.TPRemoteCall, "TPRemoteCall");
|
||||
this.TPRemoteCall.Controls.Add(this.LnkLinks);
|
||||
this.TPRemoteCall.Controls.Add(this.LnkGOODHelp);
|
||||
this.TPRemoteCall.Controls.Add(this.LnkInventoryKamera);
|
||||
@ -334,6 +334,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPRemoteCall.Controls.Add(this.TxtHost);
|
||||
this.TPRemoteCall.Controls.Add(this.BtnQueryServerStatus);
|
||||
this.TPRemoteCall.Controls.Add(this.LblHost);
|
||||
resources.ApplyResources(this.TPRemoteCall, "TPRemoteCall");
|
||||
this.TPRemoteCall.Name = "TPRemoteCall";
|
||||
this.TPRemoteCall.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -430,15 +431,14 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPOpenCommandCheck
|
||||
//
|
||||
resources.ApplyResources(this.TPOpenCommandCheck, "TPOpenCommandCheck");
|
||||
this.TPOpenCommandCheck.Controls.Add(this.TPPlayerCheck);
|
||||
this.TPOpenCommandCheck.Controls.Add(this.TPConsoleCheck);
|
||||
resources.ApplyResources(this.TPOpenCommandCheck, "TPOpenCommandCheck");
|
||||
this.TPOpenCommandCheck.Name = "TPOpenCommandCheck";
|
||||
this.TPOpenCommandCheck.SelectedIndex = 0;
|
||||
//
|
||||
// TPPlayerCheck
|
||||
//
|
||||
resources.ApplyResources(this.TPPlayerCheck, "TPPlayerCheck");
|
||||
this.TPPlayerCheck.Controls.Add(this.LnkRCHelp);
|
||||
this.TPPlayerCheck.Controls.Add(this.NUDRemotePlayerId);
|
||||
this.TPPlayerCheck.Controls.Add(this.BtnConnectOpenCommand);
|
||||
@ -446,6 +446,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPPlayerCheck.Controls.Add(this.BtnSendVerificationCode);
|
||||
this.TPPlayerCheck.Controls.Add(this.NUDVerificationCode);
|
||||
this.TPPlayerCheck.Controls.Add(this.LblRemotePlayerId);
|
||||
resources.ApplyResources(this.TPPlayerCheck, "TPPlayerCheck");
|
||||
this.TPPlayerCheck.Name = "TPPlayerCheck";
|
||||
this.TPPlayerCheck.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -517,11 +518,11 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPConsoleCheck
|
||||
//
|
||||
resources.ApplyResources(this.TPConsoleCheck, "TPConsoleCheck");
|
||||
this.TPConsoleCheck.Controls.Add(this.BtnConsoleConnect);
|
||||
this.TPConsoleCheck.Controls.Add(this.TxtToken);
|
||||
this.TPConsoleCheck.Controls.Add(this.LblToken);
|
||||
this.TPConsoleCheck.Controls.Add(this.LblConsoleTip);
|
||||
resources.ApplyResources(this.TPConsoleCheck, "TPConsoleCheck");
|
||||
this.TPConsoleCheck.Name = "TPConsoleCheck";
|
||||
this.TPConsoleCheck.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -566,10 +567,10 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPAbout
|
||||
//
|
||||
resources.ApplyResources(this.TPAbout, "TPAbout");
|
||||
this.TPAbout.Controls.Add(this.GrasscutterToolsSupport);
|
||||
this.TPAbout.Controls.Add(this.LnkGithub);
|
||||
this.TPAbout.Controls.Add(this.LblSupportDescription);
|
||||
resources.ApplyResources(this.TPAbout, "TPAbout");
|
||||
this.TPAbout.Name = "TPAbout";
|
||||
this.TPAbout.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -594,10 +595,10 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPManage
|
||||
//
|
||||
resources.ApplyResources(this.TPManage, "TPManage");
|
||||
this.TPManage.Controls.Add(this.GrpBanPlayer);
|
||||
this.TPManage.Controls.Add(this.GrpAccount);
|
||||
this.TPManage.Controls.Add(this.GrpPermission);
|
||||
resources.ApplyResources(this.TPManage, "TPManage");
|
||||
this.TPManage.Name = "TPManage";
|
||||
this.TPManage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -615,8 +616,8 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// DTPBanEndTime
|
||||
//
|
||||
resources.ApplyResources(this.DTPBanEndTime, "DTPBanEndTime");
|
||||
this.DTPBanEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Short;
|
||||
resources.ApplyResources(this.DTPBanEndTime, "DTPBanEndTime");
|
||||
this.DTPBanEndTime.MaxDate = new System.DateTime(2034, 12, 31, 0, 0, 0, 0);
|
||||
this.DTPBanEndTime.MinDate = new System.DateTime(2022, 6, 28, 0, 0, 0, 0);
|
||||
this.DTPBanEndTime.Name = "DTPBanEndTime";
|
||||
@ -636,14 +637,6 @@ namespace GrasscutterTools.Forms
|
||||
this.BtnBan.UseVisualStyleBackColor = true;
|
||||
this.BtnBan.Click += new System.EventHandler(this.BtnBan_Click);
|
||||
//
|
||||
// TxtBanReason
|
||||
//
|
||||
resources.ApplyResources(this.TxtBanReason, "TxtBanReason");
|
||||
this.TxtBanReason.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.TxtBanReason.Maximum = 0F;
|
||||
this.TxtBanReason.Minimum = 0F;
|
||||
this.TxtBanReason.Name = "TxtBanReason";
|
||||
//
|
||||
// NUDBanUID
|
||||
//
|
||||
resources.ApplyResources(this.NUDBanUID, "NUDBanUID");
|
||||
@ -737,10 +730,10 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// CmbPerm
|
||||
//
|
||||
resources.ApplyResources(this.CmbPerm, "CmbPerm");
|
||||
this.CmbPerm.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CmbPerm.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CmbPerm.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.CmbPerm, "CmbPerm");
|
||||
this.CmbPerm.Name = "CmbPerm";
|
||||
//
|
||||
// NUDPermUID
|
||||
@ -786,7 +779,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPScene
|
||||
//
|
||||
resources.ApplyResources(this.TPScene, "TPScene");
|
||||
this.TPScene.Controls.Add(this.TxtSceneFilter);
|
||||
this.TPScene.Controls.Add(this.ChkIncludeSceneId);
|
||||
this.TPScene.Controls.Add(this.LblTp);
|
||||
@ -801,6 +793,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPScene.Controls.Add(this.LblClimateType);
|
||||
this.TPScene.Controls.Add(this.LblSceneDescription);
|
||||
this.TPScene.Controls.Add(this.ListScenes);
|
||||
resources.ApplyResources(this.TPScene, "TPScene");
|
||||
this.TPScene.Name = "TPScene";
|
||||
this.TPScene.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -935,7 +928,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPItem
|
||||
//
|
||||
resources.ApplyResources(this.TPItem, "TPItem");
|
||||
this.TPItem.Controls.Add(this.LblClearGiveItemLogs);
|
||||
this.TPItem.Controls.Add(this.BtnSaveGiveItemLog);
|
||||
this.TPItem.Controls.Add(this.BtnRemoveGiveItemLog);
|
||||
@ -948,6 +940,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPItem.Controls.Add(this.NUDGameItemAmout);
|
||||
this.TPItem.Controls.Add(this.NUDGameItemLevel);
|
||||
this.TPItem.Controls.Add(this.LblGiveCommandDescription);
|
||||
resources.ApplyResources(this.TPItem, "TPItem");
|
||||
this.TPItem.Name = "TPItem";
|
||||
this.TPItem.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1065,7 +1058,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPWeapon
|
||||
//
|
||||
resources.ApplyResources(this.TPWeapon, "TPWeapon");
|
||||
this.TPWeapon.Controls.Add(this.TxtWeaponFilter);
|
||||
this.TPWeapon.Controls.Add(this.LblWeaponDescription);
|
||||
this.TPWeapon.Controls.Add(this.LblWeaponRefinement);
|
||||
@ -1075,6 +1067,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPWeapon.Controls.Add(this.NUDWeaponAmout);
|
||||
this.TPWeapon.Controls.Add(this.NUDWeaponLevel);
|
||||
this.TPWeapon.Controls.Add(this.ListWeapons);
|
||||
resources.ApplyResources(this.TPWeapon, "TPWeapon");
|
||||
this.TPWeapon.Name = "TPWeapon";
|
||||
this.TPWeapon.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1171,10 +1164,10 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPStats
|
||||
//
|
||||
resources.ApplyResources(this.TPStats, "TPStats");
|
||||
this.TPStats.Controls.Add(this.GrpSetStats);
|
||||
this.TPStats.Controls.Add(this.GrpTalentLevel);
|
||||
this.TPStats.Controls.Add(this.LblStatsDescription);
|
||||
resources.ApplyResources(this.TPStats, "TPStats");
|
||||
this.TPStats.Name = "TPStats";
|
||||
this.TPStats.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1206,9 +1199,9 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// LblStatTip
|
||||
//
|
||||
resources.ApplyResources(this.LblStatTip, "LblStatTip");
|
||||
this.LblStatTip.AutoEllipsis = true;
|
||||
this.LblStatTip.ForeColor = System.Drawing.SystemColors.GrayText;
|
||||
resources.ApplyResources(this.LblStatTip, "LblStatTip");
|
||||
this.LblStatTip.Name = "LblStatTip";
|
||||
//
|
||||
// LblStatPercent
|
||||
@ -1234,9 +1227,9 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// CmbStat
|
||||
//
|
||||
resources.ApplyResources(this.CmbStat, "CmbStat");
|
||||
this.CmbStat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CmbStat.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.CmbStat, "CmbStat");
|
||||
this.CmbStat.Name = "CmbStat";
|
||||
this.CmbStat.SelectedIndexChanged += new System.EventHandler(this.SetStatsInputChanged);
|
||||
//
|
||||
@ -1296,7 +1289,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPAvatar
|
||||
//
|
||||
resources.ApplyResources(this.TPAvatar, "TPAvatar");
|
||||
this.TPAvatar.Controls.Add(this.BtnGiveAllChar);
|
||||
this.TPAvatar.Controls.Add(this.LblConstellationTip);
|
||||
this.TPAvatar.Controls.Add(this.LblAvatarConstellation);
|
||||
@ -1306,6 +1298,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPAvatar.Controls.Add(this.LblAvatarLevel);
|
||||
this.TPAvatar.Controls.Add(this.NUDAvatarLevel);
|
||||
this.TPAvatar.Controls.Add(this.CmbAvatar);
|
||||
resources.ApplyResources(this.TPAvatar, "TPAvatar");
|
||||
this.TPAvatar.Name = "TPAvatar";
|
||||
this.TPAvatar.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1391,7 +1384,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPSpawn
|
||||
//
|
||||
resources.ApplyResources(this.TPSpawn, "TPSpawn");
|
||||
this.TPSpawn.Controls.Add(this.LblClearSpawnLogs);
|
||||
this.TPSpawn.Controls.Add(this.BtnSaveSpawnLog);
|
||||
this.TPSpawn.Controls.Add(this.BtnRemoveSpawnLog);
|
||||
@ -1404,6 +1396,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPSpawn.Controls.Add(this.NUDEntityLevel);
|
||||
this.TPSpawn.Controls.Add(this.TxtEntityFilter);
|
||||
this.TPSpawn.Controls.Add(this.ListEntity);
|
||||
resources.ApplyResources(this.TPSpawn, "TPSpawn");
|
||||
this.TPSpawn.Name = "TPSpawn";
|
||||
this.TPSpawn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1544,13 +1537,13 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPQuest
|
||||
//
|
||||
resources.ApplyResources(this.TPQuest, "TPQuest");
|
||||
this.TPQuest.Controls.Add(this.GrpQuestFilters);
|
||||
this.TPQuest.Controls.Add(this.BtnFinishQuest);
|
||||
this.TPQuest.Controls.Add(this.BtnAddQuest);
|
||||
this.TPQuest.Controls.Add(this.LblQuestDescription);
|
||||
this.TPQuest.Controls.Add(this.TxtQuestFilter);
|
||||
this.TPQuest.Controls.Add(this.ListQuest);
|
||||
resources.ApplyResources(this.TPQuest, "TPQuest");
|
||||
this.TPQuest.Name = "TPQuest";
|
||||
this.TPQuest.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1622,7 +1615,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPArtifact
|
||||
//
|
||||
resources.ApplyResources(this.TPArtifact, "TPArtifact");
|
||||
this.TPArtifact.Controls.Add(this.LblArtifactLevelTip);
|
||||
this.TPArtifact.Controls.Add(this.BtnAddSubAttr);
|
||||
this.TPArtifact.Controls.Add(this.LblArtifactName);
|
||||
@ -1642,6 +1634,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPArtifact.Controls.Add(this.NUDArtifactLevel);
|
||||
this.TPArtifact.Controls.Add(this.LblArtifactStars);
|
||||
this.TPArtifact.Controls.Add(this.NUDArtifactStars);
|
||||
resources.ApplyResources(this.TPArtifact, "TPArtifact");
|
||||
this.TPArtifact.Name = "TPArtifact";
|
||||
this.TPArtifact.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1807,7 +1800,6 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPCustom
|
||||
//
|
||||
resources.ApplyResources(this.TPCustom, "TPCustom");
|
||||
this.TPCustom.Controls.Add(this.BtnExportCustomCommands);
|
||||
this.TPCustom.Controls.Add(this.BtnLoadCustomCommands);
|
||||
this.TPCustom.Controls.Add(this.LblCustomName);
|
||||
@ -1815,6 +1807,7 @@ namespace GrasscutterTools.Forms
|
||||
this.TPCustom.Controls.Add(this.BtnRemoveCustomCommand);
|
||||
this.TPCustom.Controls.Add(this.BtnSaveCustomCommand);
|
||||
this.TPCustom.Controls.Add(this.TxtCustomName);
|
||||
resources.ApplyResources(this.TPCustom, "TPCustom");
|
||||
this.TPCustom.Name = "TPCustom";
|
||||
this.TPCustom.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1878,12 +1871,12 @@ namespace GrasscutterTools.Forms
|
||||
//
|
||||
// TPHome
|
||||
//
|
||||
resources.ApplyResources(this.TPHome, "TPHome");
|
||||
this.TPHome.Controls.Add(this.LblAbout);
|
||||
this.TPHome.Controls.Add(this.BtnOpenTextMap);
|
||||
this.TPHome.Controls.Add(this.BtnOpenGachaBannerEditor);
|
||||
this.TPHome.Controls.Add(this.GrasscutterToolsIcon);
|
||||
this.TPHome.Controls.Add(this.GrpSettings);
|
||||
resources.ApplyResources(this.TPHome, "TPHome");
|
||||
this.TPHome.Name = "TPHome";
|
||||
this.TPHome.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@ -1916,8 +1909,9 @@ namespace GrasscutterTools.Forms
|
||||
// GrpSettings
|
||||
//
|
||||
resources.ApplyResources(this.GrpSettings, "GrpSettings");
|
||||
this.GrpSettings.Controls.Add(this.LblGCVersion);
|
||||
this.GrpSettings.Controls.Add(this.CmbGcVersions);
|
||||
this.GrpSettings.Controls.Add(this.ChkTopMost);
|
||||
this.GrpSettings.Controls.Add(this.ChkNewCommand);
|
||||
this.GrpSettings.Controls.Add(this.CmbLanguage);
|
||||
this.GrpSettings.Controls.Add(this.LblLanguage);
|
||||
this.GrpSettings.Controls.Add(this.NUDUid);
|
||||
@ -1931,22 +1925,13 @@ namespace GrasscutterTools.Forms
|
||||
resources.ApplyResources(this.ChkTopMost, "ChkTopMost");
|
||||
this.ChkTopMost.Name = "ChkTopMost";
|
||||
this.ChkTopMost.UseVisualStyleBackColor = true;
|
||||
this.ChkTopMost.CheckedChanged += new System.EventHandler(this.ChkTopMost_CheckedChanged);
|
||||
//
|
||||
// ChkNewCommand
|
||||
//
|
||||
resources.ApplyResources(this.ChkNewCommand, "ChkNewCommand");
|
||||
this.ChkNewCommand.Name = "ChkNewCommand";
|
||||
this.ChkNewCommand.UseVisualStyleBackColor = true;
|
||||
this.ChkNewCommand.CheckedChanged += new System.EventHandler(this.ChkNewCommand_CheckedChanged);
|
||||
//
|
||||
// CmbLanguage
|
||||
//
|
||||
resources.ApplyResources(this.CmbLanguage, "CmbLanguage");
|
||||
this.CmbLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CmbLanguage.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.CmbLanguage, "CmbLanguage");
|
||||
this.CmbLanguage.Name = "CmbLanguage";
|
||||
this.CmbLanguage.SelectedIndexChanged += new System.EventHandler(this.CmbLanguage_SelectedIndexChanged);
|
||||
//
|
||||
// LblLanguage
|
||||
//
|
||||
@ -1998,6 +1983,26 @@ namespace GrasscutterTools.Forms
|
||||
this.TCMain.Name = "TCMain";
|
||||
this.TCMain.SelectedIndex = 0;
|
||||
//
|
||||
// CmbGcVersions
|
||||
//
|
||||
this.CmbGcVersions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CmbGcVersions.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.CmbGcVersions, "CmbGcVersions");
|
||||
this.CmbGcVersions.Name = "CmbGcVersions";
|
||||
//
|
||||
// LblGCVersion
|
||||
//
|
||||
resources.ApplyResources(this.LblGCVersion, "LblGCVersion");
|
||||
this.LblGCVersion.Name = "LblGCVersion";
|
||||
//
|
||||
// TxtBanReason
|
||||
//
|
||||
this.TxtBanReason.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
resources.ApplyResources(this.TxtBanReason, "TxtBanReason");
|
||||
this.TxtBanReason.Maximum = 0F;
|
||||
this.TxtBanReason.Minimum = 0F;
|
||||
this.TxtBanReason.Name = "TxtBanReason";
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -2272,7 +2277,6 @@ namespace GrasscutterTools.Forms
|
||||
private System.Windows.Forms.PictureBox GrasscutterToolsIcon;
|
||||
private System.Windows.Forms.GroupBox GrpSettings;
|
||||
private System.Windows.Forms.CheckBox ChkTopMost;
|
||||
private System.Windows.Forms.CheckBox ChkNewCommand;
|
||||
private System.Windows.Forms.ComboBox CmbLanguage;
|
||||
private System.Windows.Forms.Label LblLanguage;
|
||||
private System.Windows.Forms.NumericUpDown NUDUid;
|
||||
@ -2294,5 +2298,7 @@ namespace GrasscutterTools.Forms
|
||||
private System.Windows.Forms.LinkLabel LnkLinks;
|
||||
private System.Windows.Forms.Button BtnUnlockStat;
|
||||
private System.Windows.Forms.Button BtnLockStat;
|
||||
private System.Windows.Forms.Label LblGCVersion;
|
||||
private System.Windows.Forms.ComboBox CmbGcVersions;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@ -39,7 +40,7 @@ namespace GrasscutterTools.Forms
|
||||
{
|
||||
public partial class FormMain : Form
|
||||
{
|
||||
#region - 初始化 -
|
||||
#region - 初始化 Init -
|
||||
|
||||
public FormMain()
|
||||
{
|
||||
@ -52,7 +53,6 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
private void FormMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
MultiLanguage.LoadLanguage(this, typeof(FormMain));
|
||||
#if DEBUG
|
||||
Text += " - by jie65535 - v" + AppVersion.ToString(3) + "-debug";
|
||||
#else
|
||||
@ -74,7 +74,6 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
ChangeTPArtifact();
|
||||
ChangeBtnGiveAllChar();
|
||||
|
||||
}
|
||||
|
||||
private void FormMain_FormClosed(object sender, FormClosedEventArgs e)
|
||||
@ -82,31 +81,40 @@ namespace GrasscutterTools.Forms
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
private readonly string[] LanguageNames = new string[] { "简体中文", "繁體中文", "English", "Русский" };
|
||||
private readonly string[] Languages = new string[] { "zh-CN", "zh-TW", "en-US", "ru-RU" };
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 应用版本
|
||||
/// </summary>
|
||||
private Version AppVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 加载应用版本
|
||||
/// </summary>
|
||||
private void LoadVersion()
|
||||
{
|
||||
AppVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 载入设置
|
||||
/// </summary>
|
||||
private void LoadSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
// 恢复自动复制选项状态
|
||||
ChkAutoCopy.Checked = Settings.Default.AutoCopy;
|
||||
NUDUid.Value = Settings.Default.Uid;
|
||||
ChkTopMost.Checked = Settings.Default.IsTopMost;
|
||||
ChkNewCommand.Checked = Settings.Default.CommandVersion == "1.2.2";
|
||||
|
||||
CmbLanguage.Items.AddRange(LanguageNames);
|
||||
CmbLanguage.SelectedIndex = Array.IndexOf(Languages, Settings.Default.DefaultLanguage);
|
||||
|
||||
|
||||
// 初始化首页设置
|
||||
InitHomeSettings();
|
||||
|
||||
// 初始化获取物品记录
|
||||
InitGiveItemRecord();
|
||||
|
||||
// 初始化生成记录
|
||||
InitSpawnRecord();
|
||||
|
||||
// 初始化开放命令
|
||||
InitOpenCommand();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -115,14 +123,14 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存设置
|
||||
/// </summary>
|
||||
private void SaveSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
Settings.Default.AutoCopy = ChkAutoCopy.Checked;
|
||||
Settings.Default.Uid = NUDUid.Value;
|
||||
Settings.Default.IsTopMost = ChkTopMost.Checked;
|
||||
Settings.Default.CommandVersion = ChkNewCommand.Checked ? "1.2.2" : string.Empty;
|
||||
SaveCustomCommands();
|
||||
SaveGiveItemRecord();
|
||||
SaveSpawnRecord();
|
||||
@ -172,12 +180,60 @@ namespace GrasscutterTools.Forms
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion - 初始化 -
|
||||
#endregion - 初始化 Init -
|
||||
|
||||
#region - 主页 -
|
||||
#region - 主页 Home -
|
||||
|
||||
/// <summary>
|
||||
/// 命令版本
|
||||
/// </summary>
|
||||
private CommandVersion CommandVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 卡池编辑器窗口实例
|
||||
/// </summary>
|
||||
private Form GachaBannerEditor;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化首页设置
|
||||
/// </summary>
|
||||
private void InitHomeSettings()
|
||||
{
|
||||
// 玩家UID
|
||||
NUDUid.Value = Settings.Default.Uid;
|
||||
NUDUid.ValueChanged += (o, e) => Settings.Default.Uid = NUDUid.Value;
|
||||
|
||||
// 置顶
|
||||
ChkTopMost.Checked = Settings.Default.IsTopMost;
|
||||
ChkTopMost.CheckedChanged += (o, e) => Settings.Default.IsTopMost = TopMost = ChkTopMost.Checked;
|
||||
|
||||
// 命令版本初始化
|
||||
CommandVersion = Version.TryParse(Settings.Default.CommandVersion, out Version current) ? new CommandVersion(current) : CommandVersion.Latest();
|
||||
CmbGcVersions.DataSource = CommandVersion.List.Select(it => it.ToString(3)).ToList();
|
||||
CmbGcVersions.SelectedIndex = Array.IndexOf(CommandVersion.List, CommandVersion.Current);
|
||||
CmbGcVersions.SelectedIndexChanged += (o, e) => CommandVersion.Current = CommandVersion.List[CmbGcVersions.SelectedIndex];
|
||||
CommandVersion.VersionChanged += OnCommandVersionChanged;
|
||||
|
||||
|
||||
// 初始化多语言
|
||||
CmbLanguage.DataSource = MultiLanguage.LanguageNames;
|
||||
if (string.IsNullOrEmpty(Settings.Default.DefaultLanguage))
|
||||
{
|
||||
// 如果未选择语言,则默认载入本地语言
|
||||
var i = Array.IndexOf(MultiLanguage.Languages, Thread.CurrentThread.CurrentUICulture);
|
||||
// 仅支持时切换,避免重复加载
|
||||
if (i > 0) CmbLanguage.SelectedIndex = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
CmbLanguage.SelectedIndex = Array.IndexOf(MultiLanguage.Languages, Settings.Default.DefaultLanguage);
|
||||
}
|
||||
CmbLanguage.SelectedIndexChanged += CmbLanguage_SelectedIndexChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击打开卡池编辑器时触发
|
||||
/// </summary>
|
||||
private void BtnOpenGachaBannerEditor_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GachaBannerEditor == null || GachaBannerEditor.IsDisposed)
|
||||
@ -192,6 +248,9 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文本浏览器窗口实例
|
||||
/// </summary>
|
||||
private FormTextMapBrowser TextMapBrowser;
|
||||
|
||||
private void BtnOpenTextMap_Click(object sender, EventArgs e)
|
||||
@ -207,151 +266,50 @@ namespace GrasscutterTools.Forms
|
||||
TextMapBrowser.TopMost = false;
|
||||
}
|
||||
}
|
||||
async private void ButtonOpenGOODImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog openFileDialog1 = new OpenFileDialog
|
||||
{
|
||||
Filter = "GOOD file (*.GOOD;*.json)|*.GOOD;*.json|All files (*.*)|*.*",
|
||||
};
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (DialogResult.Yes != MessageBox.Show(Resources.GOODImportText + openFileDialog1.FileName + "?",
|
||||
Resources.GOODImportTitle, MessageBoxButtons.YesNo))
|
||||
return;
|
||||
try
|
||||
{
|
||||
GOOD.GOOD good = JsonConvert.DeserializeObject<GOOD.GOOD>(File.ReadAllText(openFileDialog1.FileName));
|
||||
var commands_list = new List<string>();
|
||||
var missingItems = new List<string>();
|
||||
|
||||
if (good.Characters != null)
|
||||
{
|
||||
foreach (var character in good.Characters)
|
||||
{
|
||||
if (character.Name != "Traveler")
|
||||
{
|
||||
if (GOODData.Avatars.TryGetValue(character.Name, out var character_id))
|
||||
commands_list.Add("/give " + character_id + " lv" + character.Level + "c" + character.Constellation);
|
||||
else
|
||||
missingItems.Add(character.Name);
|
||||
// TODO: Implement command to set talent level when giving character in Grasscutter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (good.Weapons != null)
|
||||
{
|
||||
foreach (var weapon in good.Weapons)
|
||||
{
|
||||
if (GOODData.Weapons.TryGetValue(weapon.Name, out var weapon_id))
|
||||
commands_list.Add("/give " + weapon_id + " lv" + weapon.Level + "r" + weapon.RefinementLevel);
|
||||
else
|
||||
missingItems.Add(weapon.Name);
|
||||
// TODO: Implement command to give weapon directly to character in Grasscutter
|
||||
}
|
||||
}
|
||||
|
||||
if (good.Artifacts != null)
|
||||
{
|
||||
foreach (var artifact in good.Artifacts)
|
||||
{
|
||||
// Format: set rarity slot
|
||||
if (!GOODData.ArtifactCats.TryGetValue(artifact.SetName, out var artifact_set_id))
|
||||
{
|
||||
missingItems.Add(artifact.SetName);
|
||||
continue;
|
||||
}
|
||||
var artifact_id = artifact_set_id.ToString() + artifact.Rarity.ToString() + GOODData.ArtifactSlotMap[artifact.GearSlot] + "4";
|
||||
var artifact_mainStat_id = GOODData.ArtifactMainAttribution[artifact.MainStat];
|
||||
var artifact_substats = "";
|
||||
var artifact_substat_prefix = artifact.Rarity + "0";
|
||||
int substat_count = 0;
|
||||
foreach (var substat in artifact.SubStats)
|
||||
{
|
||||
if (substat.Value <= 0)
|
||||
continue;
|
||||
substat_count++;
|
||||
var substat_key = substat.Stat;
|
||||
var substat_key_id = GOODData.ArtifactSubAttribution[substat_key];
|
||||
var substat_indices = ArtifactUtils.SplitSubstats(substat_key, artifact.Rarity, substat.Value);
|
||||
|
||||
foreach (int index in substat_indices)
|
||||
{
|
||||
artifact_substats += artifact_substat_prefix + substat_key_id + index.ToString() + " ";
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: Add def+2 substat to counteract Grasscutter automatically adding another substat
|
||||
if (substat_count == 4)
|
||||
artifact_substats += "101081 ";
|
||||
commands_list.Add("/give " + artifact_id + " lv" + artifact.Level + " " + artifact_mainStat_id + " " + artifact_substats);
|
||||
// TODO: Implement command to give artifact directly to character in Grasscutter
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Materials
|
||||
//if (good.Materials != null)
|
||||
//{
|
||||
// foreach (var material in good.Materials)
|
||||
// {
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
var msg = string.Format("Loaded {0} Characters\nLoaded {1} Weapons\nLoaded {2} Artifacts\n",
|
||||
good.Characters?.Count ?? 0,
|
||||
good.Weapons?.Count ?? 0,
|
||||
good.Artifacts?.Count ?? 0
|
||||
);
|
||||
if (missingItems.Count > 0)
|
||||
{
|
||||
msg += string.Format("There are {0} pieces of data that cannot be parsed, including:\n{1}",
|
||||
missingItems.Count,
|
||||
string.Join("\n", missingItems.Take(10)));
|
||||
if (missingItems.Count > 10)
|
||||
msg += "......";
|
||||
}
|
||||
msg += "Do you want to start?";
|
||||
|
||||
if (DialogResult.Yes != MessageBox.Show(msg, Resources.Tips, MessageBoxButtons.YesNo, MessageBoxIcon.Information))
|
||||
return;
|
||||
|
||||
|
||||
if (await RunCommands(commands_list.ToArray()))
|
||||
MessageBox.Show(Resources.GOODImportSuccess);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 语言选中项改变时触发
|
||||
/// </summary>
|
||||
private void CmbLanguage_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
MultiLanguage.SetDefaultLanguage(Languages[CmbLanguage.SelectedIndex]);
|
||||
if (CmbLanguage.SelectedIndex < 0) return;
|
||||
// 切换默认语言
|
||||
MultiLanguage.SetDefaultLanguage(MultiLanguage.Languages[CmbLanguage.SelectedIndex]);
|
||||
// 动态更改语言
|
||||
MultiLanguage.LoadLanguage(this, typeof(FormMain));
|
||||
// 重新载入页面资源
|
||||
FormMain_Load(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void ChkTopMost_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
TopMost = ChkTopMost.Checked;
|
||||
}
|
||||
|
||||
private void ChkNewCommand_CheckedChanged(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// 命令版本改变时触发
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnCommandVersionChanged(object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.CommandVersion = CommandVersion.Current.ToString(3);
|
||||
ChangeTPArtifact();
|
||||
ChangeBtnGiveAllChar();
|
||||
}
|
||||
|
||||
#endregion - 主页 -
|
||||
#endregion - 主页 Home -
|
||||
|
||||
#region - 自定义 -
|
||||
#region - 自定义 Custom -
|
||||
|
||||
/// <summary>
|
||||
/// 自定义命令保存位置
|
||||
/// </summary>
|
||||
private readonly string CustomCommandsFilePath = Path.Combine(Application.LocalUserAppDataPath, "CustomCommands.txt");
|
||||
|
||||
/// <summary>
|
||||
/// 自定义命令是否存在更改
|
||||
/// </summary>
|
||||
private bool CustomCommandsChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 加载自定义命令
|
||||
/// </summary>
|
||||
private void LoadCustomCommands()
|
||||
{
|
||||
if (File.Exists(CustomCommandsFilePath))
|
||||
@ -360,6 +318,10 @@ namespace GrasscutterTools.Forms
|
||||
LoadCustomCommandControls(Resources.CustomCommands);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载自定义命令控件列表
|
||||
/// </summary>
|
||||
/// <param name="commands">命令集(示例:"标签1\n命令1\n标签2\n命令2")</param>
|
||||
private void LoadCustomCommandControls(string commands)
|
||||
{
|
||||
FLPCustomCommands.Controls.Clear();
|
||||
@ -368,12 +330,19 @@ namespace GrasscutterTools.Forms
|
||||
AddCustomCommand(lines[i].Trim(), lines[i + 1].Trim());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存自定义命令
|
||||
/// </summary>
|
||||
private void SaveCustomCommands()
|
||||
{
|
||||
if (CustomCommandsChanged)
|
||||
File.WriteAllText(CustomCommandsFilePath, SaveCustomCommandControls());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存自定义命令控件列表
|
||||
/// </summary>
|
||||
/// <returns>命令集(示例:"标签1\n命令1\n标签2\n命令2")</returns>
|
||||
private string SaveCustomCommandControls()
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@ -385,6 +354,9 @@ namespace GrasscutterTools.Forms
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义命令点击时触发
|
||||
/// </summary>
|
||||
private void CustomCommand_Click(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
if (sender is LinkLabel lnk && lnk.Tag is string command)
|
||||
@ -394,6 +366,11 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击保存自定义命令列表时触发
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private async void BtnSaveCustomCommand_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TxtCustomName.Text))
|
||||
@ -425,6 +402,11 @@ namespace GrasscutterTools.Forms
|
||||
await ButtonComplete(BtnSaveCustomCommand);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加自定义命令
|
||||
/// </summary>
|
||||
/// <param name="name">标签</param>
|
||||
/// <param name="command">命令</param>
|
||||
private void AddCustomCommand(string name, string command)
|
||||
{
|
||||
var lnk = new LinkLabel
|
||||
@ -437,6 +419,9 @@ namespace GrasscutterTools.Forms
|
||||
FLPCustomCommands.Controls.Add(lnk);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击移除自定义命令按钮时触发
|
||||
/// </summary>
|
||||
private async void BtnRemoveCustomCommand_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TxtCustomName.Text))
|
||||
@ -462,6 +447,9 @@ namespace GrasscutterTools.Forms
|
||||
MessageBox.Show(Resources.CommandNotFound, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击导入自定义命令时触发
|
||||
/// </summary>
|
||||
private void BtnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog
|
||||
@ -479,6 +467,11 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击导出自定义命令时触发
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void BtnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new SaveFileDialog
|
||||
@ -496,6 +489,9 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击重置链接按钮时触发
|
||||
/// </summary>
|
||||
private void LnkResetCustomCommands_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(Resources.RestoreCustomCommands, Resources.Tips, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
@ -506,9 +502,9 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
#endregion - 自定义 -
|
||||
#endregion - 自定义 Custom -
|
||||
|
||||
#region - 圣遗物 -
|
||||
#region - 圣遗物 Artifact -
|
||||
|
||||
private Dictionary<string, List<KeyValuePair<int, string>>> subAttrs;
|
||||
|
||||
@ -620,7 +616,7 @@ namespace GrasscutterTools.Forms
|
||||
id = id / 1000 * 1000 + (int)NUDArtifactStars.Value * 100 + id % 100;
|
||||
if (CmbMainAttribution.SelectedIndex < 0)
|
||||
{
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
SetCommand("/give", $"{id} lv{NUDArtifactLevel.Value}");
|
||||
else
|
||||
SetCommand("/giveart", $"{id} {NUDArtifactLevel.Value}");
|
||||
@ -652,7 +648,7 @@ namespace GrasscutterTools.Forms
|
||||
subAttrs += $"{kv.Key} ";
|
||||
}
|
||||
}
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
SetCommand("/give", $"{id} lv{NUDArtifactLevel.Value} {mainAttr} {subAttrs}");
|
||||
else
|
||||
SetCommand("/giveart", $"{id} {mainAttr} {subAttrs}{NUDArtifactLevel.Value}");
|
||||
@ -678,7 +674,7 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
private void ChangeTPArtifact()
|
||||
{
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
{
|
||||
NUDArtifactLevel.Minimum = 0;
|
||||
NUDArtifactLevel.Maximum = 20;
|
||||
@ -691,9 +687,9 @@ namespace GrasscutterTools.Forms
|
||||
LblArtifactLevelTip.Text = $"[{NUDArtifactLevel.Minimum}-{NUDArtifactLevel.Maximum}]";
|
||||
}
|
||||
|
||||
#endregion - 圣遗物 -
|
||||
#endregion - 圣遗物 Artifact -
|
||||
|
||||
#region - 武器 -
|
||||
#region - 武器 Weapons -
|
||||
|
||||
private void InitWeapons()
|
||||
{
|
||||
@ -716,16 +712,16 @@ namespace GrasscutterTools.Forms
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
var id = name.Substring(0, name.IndexOf(':')).Trim();
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
SetCommand("/give", $"{id} x{NUDWeaponAmout.Value} lv{NUDWeaponLevel.Value} r{NUDWeaponRefinement.Value}");
|
||||
else
|
||||
SetCommand("/give", $"{id} {NUDWeaponAmout.Value} {NUDWeaponLevel.Value} {NUDWeaponRefinement.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion - 武器 -
|
||||
#endregion - 武器 Weapons -
|
||||
|
||||
#region - 物品 -
|
||||
#region - 物品 Items -
|
||||
|
||||
private void InitGameItemList()
|
||||
{
|
||||
@ -757,7 +753,7 @@ namespace GrasscutterTools.Forms
|
||||
else
|
||||
{
|
||||
NUDGameItemLevel.Enabled = true;
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
SetCommand("/give", $"{id} x{NUDGameItemAmout.Value} lv{NUDGameItemLevel.Value}");
|
||||
else
|
||||
SetCommand("/give", $"{id} {NUDGameItemAmout.Value} {NUDGameItemLevel.Value}");
|
||||
@ -838,9 +834,9 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
#endregion -- 物品记录 --
|
||||
|
||||
#endregion - 物品 -
|
||||
#endregion - 物品 Items -
|
||||
|
||||
#region - 角色 -
|
||||
#region - 角色 Avatars -
|
||||
|
||||
private void InitAvatars()
|
||||
{
|
||||
@ -867,7 +863,7 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
private void GenAvatar(int level)
|
||||
{
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
{
|
||||
int avatarId = GameData.Avatars.Ids[CmbAvatar.SelectedIndex];
|
||||
SetCommand("/give", $"{avatarId} lv{level}");
|
||||
@ -888,15 +884,12 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
private void ChangeBtnGiveAllChar()
|
||||
{
|
||||
if (ChkNewCommand.Checked)
|
||||
BtnGiveAllChar.Enabled = true;
|
||||
else
|
||||
BtnGiveAllChar.Enabled = false;
|
||||
BtnGiveAllChar.Enabled = Check(CommandVersion.V1_2_2);
|
||||
}
|
||||
|
||||
#endregion - 角色 -
|
||||
#endregion - 角色 Avatars -
|
||||
|
||||
#region - 生成 -
|
||||
#region - 生成 Spawns -
|
||||
|
||||
private void InitEntityList()
|
||||
{
|
||||
@ -1021,9 +1014,9 @@ namespace GrasscutterTools.Forms
|
||||
|
||||
#endregion -- 生成记录 --
|
||||
|
||||
#endregion - 生成 -
|
||||
#endregion - 生成 Spawns -
|
||||
|
||||
#region - 场景 -
|
||||
#region - 场景 Scenes -
|
||||
|
||||
private void InitScenes()
|
||||
{
|
||||
@ -1055,7 +1048,7 @@ namespace GrasscutterTools.Forms
|
||||
// 可以直接弃用 scene 命令
|
||||
var name = ListScenes.SelectedItem as string;
|
||||
var id = name.Substring(0, name.IndexOf(':')).Trim();
|
||||
if (!ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
{
|
||||
SetCommand("/scene", id.ToString());
|
||||
}
|
||||
@ -1070,7 +1063,7 @@ namespace GrasscutterTools.Forms
|
||||
{
|
||||
if (CmbClimateType.SelectedIndex < 0)
|
||||
return;
|
||||
if (ChkNewCommand.Checked)
|
||||
if (Check(CommandVersion.V1_2_2))
|
||||
SetCommand("/weather", CmbClimateType.SelectedIndex < climateTypes.Length ? climateTypes[CmbClimateType.SelectedIndex] : "none");
|
||||
else
|
||||
SetCommand("/weather", $"0 {CmbClimateType.SelectedIndex}");
|
||||
@ -1084,9 +1077,9 @@ namespace GrasscutterTools.Forms
|
||||
SetCommand("/tp", args);
|
||||
}
|
||||
|
||||
#endregion - 场景 -
|
||||
#endregion - 场景 Scenes -
|
||||
|
||||
#region - 数据 -
|
||||
#region - 数据 Stats -
|
||||
|
||||
private void InitStatList()
|
||||
{
|
||||
@ -1127,9 +1120,9 @@ namespace GrasscutterTools.Forms
|
||||
SetCommand("/talent", $"{(sender as LinkLabel).Tag} {NUDTalentLevel.Value}");
|
||||
}
|
||||
|
||||
#endregion - 数据 -
|
||||
#endregion - 数据 Stats -
|
||||
|
||||
#region - 管理 -
|
||||
#region - 管理 Management -
|
||||
|
||||
private void InitPermList()
|
||||
{
|
||||
@ -1176,18 +1169,18 @@ namespace GrasscutterTools.Forms
|
||||
SetCommand($"/unban @{NUDBanUID.Value}");
|
||||
}
|
||||
|
||||
#endregion - 管理 -
|
||||
#endregion - 管理 Management -
|
||||
|
||||
#region - 关于 -
|
||||
#region - 关于 About -
|
||||
|
||||
private void LnkGithub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
OpenURL("https://github.com/jie65535/GrasscutterCommandGenerator");
|
||||
}
|
||||
|
||||
#endregion - 关于 -
|
||||
#endregion - 关于 About -
|
||||
|
||||
#region - 命令 -
|
||||
#region - 命令 Command -
|
||||
|
||||
private void SetCommand(string command)
|
||||
{
|
||||
@ -1315,9 +1308,9 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
#endregion - 命令 -
|
||||
#endregion - 命令 Command -
|
||||
|
||||
#region - 通用 -
|
||||
#region - 通用 General -
|
||||
|
||||
private async Task ButtonComplete(Button btn)
|
||||
{
|
||||
@ -1343,9 +1336,11 @@ namespace GrasscutterTools.Forms
|
||||
TTip.Show(message, control, 0, control.Size.Height, 3000);
|
||||
}
|
||||
|
||||
#endregion - 通用 -
|
||||
private bool Check(Version version) => CommandVersion.Current >= version;
|
||||
|
||||
#region - 命令记录 -
|
||||
#endregion - 通用 General -
|
||||
|
||||
#region - 命令记录 Command Logs -
|
||||
|
||||
private List<GameCommand> GetCommands(string commandsText)
|
||||
{
|
||||
@ -1367,9 +1362,9 @@ namespace GrasscutterTools.Forms
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
#endregion - 命令记录 -
|
||||
#endregion - 命令记录 Command Logs -
|
||||
|
||||
#region - 远程 -
|
||||
#region - 远程 Remote -
|
||||
|
||||
private OpenCommandAPI OC;
|
||||
|
||||
@ -1389,7 +1384,8 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
// 自动尝试查询本地服务端地址,降低门槛
|
||||
#if !DEBUG
|
||||
// 自动尝试查询本地服务端地址,降低使用门槛
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(5000);
|
||||
@ -1416,6 +1412,7 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1592,9 +1589,133 @@ namespace GrasscutterTools.Forms
|
||||
}
|
||||
}
|
||||
|
||||
#endregion - 远程 -
|
||||
#endregion - 远程 Remote -
|
||||
|
||||
#region - 任务 -
|
||||
#region - GOOD -
|
||||
|
||||
async private void ButtonOpenGOODImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog openFileDialog1 = new OpenFileDialog
|
||||
{
|
||||
Filter = "GOOD file (*.GOOD;*.json)|*.GOOD;*.json|All files (*.*)|*.*",
|
||||
};
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (DialogResult.Yes != MessageBox.Show(Resources.GOODImportText + openFileDialog1.FileName + "?",
|
||||
Resources.GOODImportTitle, MessageBoxButtons.YesNo))
|
||||
return;
|
||||
try
|
||||
{
|
||||
GOOD.GOOD good = JsonConvert.DeserializeObject<GOOD.GOOD>(File.ReadAllText(openFileDialog1.FileName));
|
||||
var commands_list = new List<string>();
|
||||
var missingItems = new List<string>();
|
||||
|
||||
if (good.Characters != null)
|
||||
{
|
||||
foreach (var character in good.Characters)
|
||||
{
|
||||
if (character.Name != "Traveler")
|
||||
{
|
||||
if (GOODData.Avatars.TryGetValue(character.Name, out var character_id))
|
||||
commands_list.Add("/give " + character_id + " lv" + character.Level + "c" + character.Constellation);
|
||||
else
|
||||
missingItems.Add(character.Name);
|
||||
// TODO: Implement command to set talent level when giving character in Grasscutter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (good.Weapons != null)
|
||||
{
|
||||
foreach (var weapon in good.Weapons)
|
||||
{
|
||||
if (GOODData.Weapons.TryGetValue(weapon.Name, out var weapon_id))
|
||||
commands_list.Add("/give " + weapon_id + " lv" + weapon.Level + "r" + weapon.RefinementLevel);
|
||||
else
|
||||
missingItems.Add(weapon.Name);
|
||||
// TODO: Implement command to give weapon directly to character in Grasscutter
|
||||
}
|
||||
}
|
||||
|
||||
if (good.Artifacts != null)
|
||||
{
|
||||
foreach (var artifact in good.Artifacts)
|
||||
{
|
||||
// Format: set rarity slot
|
||||
if (!GOODData.ArtifactCats.TryGetValue(artifact.SetName, out var artifact_set_id))
|
||||
{
|
||||
missingItems.Add(artifact.SetName);
|
||||
continue;
|
||||
}
|
||||
var artifact_id = artifact_set_id.ToString() + artifact.Rarity.ToString() + GOODData.ArtifactSlotMap[artifact.GearSlot] + "4";
|
||||
var artifact_mainStat_id = GOODData.ArtifactMainAttribution[artifact.MainStat];
|
||||
var artifact_substats = "";
|
||||
var artifact_substat_prefix = artifact.Rarity + "0";
|
||||
int substat_count = 0;
|
||||
foreach (var substat in artifact.SubStats)
|
||||
{
|
||||
if (substat.Value <= 0)
|
||||
continue;
|
||||
substat_count++;
|
||||
var substat_key = substat.Stat;
|
||||
var substat_key_id = GOODData.ArtifactSubAttribution[substat_key];
|
||||
var substat_indices = ArtifactUtils.SplitSubstats(substat_key, artifact.Rarity, substat.Value);
|
||||
|
||||
foreach (int index in substat_indices)
|
||||
{
|
||||
artifact_substats += artifact_substat_prefix + substat_key_id + index.ToString() + " ";
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: Add def+2 substat to counteract Grasscutter automatically adding another substat
|
||||
if (substat_count == 4)
|
||||
artifact_substats += "101081 ";
|
||||
commands_list.Add("/give " + artifact_id + " lv" + artifact.Level + " " + artifact_mainStat_id + " " + artifact_substats);
|
||||
// TODO: Implement command to give artifact directly to character in Grasscutter
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Materials
|
||||
//if (good.Materials != null)
|
||||
//{
|
||||
// foreach (var material in good.Materials)
|
||||
// {
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
var msg = string.Format("Loaded {0} Characters\nLoaded {1} Weapons\nLoaded {2} Artifacts\n",
|
||||
good.Characters?.Count ?? 0,
|
||||
good.Weapons?.Count ?? 0,
|
||||
good.Artifacts?.Count ?? 0
|
||||
);
|
||||
if (missingItems.Count > 0)
|
||||
{
|
||||
msg += string.Format("There are {0} pieces of data that cannot be parsed, including:\n{1}",
|
||||
missingItems.Count,
|
||||
string.Join("\n", missingItems.Take(10)));
|
||||
if (missingItems.Count > 10)
|
||||
msg += "......";
|
||||
}
|
||||
msg += "Do you want to start?";
|
||||
|
||||
if (DialogResult.Yes != MessageBox.Show(msg, Resources.Tips, MessageBoxButtons.YesNo, MessageBoxIcon.Information))
|
||||
return;
|
||||
|
||||
|
||||
if (await RunCommands(commands_list.ToArray()))
|
||||
MessageBox.Show(Resources.GOODImportSuccess);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region - 任务 Quests -
|
||||
|
||||
private void InitQuestList()
|
||||
{
|
||||
@ -1629,7 +1750,7 @@ namespace GrasscutterTools.Forms
|
||||
SetCommand("/quest", $"{(sender as Button).Tag} {id}");
|
||||
}
|
||||
|
||||
#endregion - 任务 -
|
||||
#endregion - 任务 Quests -
|
||||
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
94
Source/GrasscutterTools/Game/CommandVersion.cs
Normal file
94
Source/GrasscutterTools/Game/CommandVersion.cs
Normal file
@ -0,0 +1,94 @@
|
||||
using System;
|
||||
|
||||
namespace GrasscutterTools.Game
|
||||
{
|
||||
/// <summary>
|
||||
/// 命令版本
|
||||
///
|
||||
/// 用法:
|
||||
/// ver = Version.TryParse(input, out Version current) ? new CommandVersion(current) : CommandVersion.Latest();
|
||||
///
|
||||
/// </summary>
|
||||
internal class CommandVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化当前版本
|
||||
/// </summary>
|
||||
/// <param name="current"></param>
|
||||
public CommandVersion(Version current)
|
||||
{
|
||||
this.current = current ?? throw new ArgumentNullException(nameof(current));
|
||||
}
|
||||
|
||||
private Version current;
|
||||
|
||||
/// <summary>
|
||||
/// 当前命令版本
|
||||
/// </summary>
|
||||
public Version Current
|
||||
{
|
||||
get => current;
|
||||
set
|
||||
{
|
||||
if (current != value)
|
||||
{
|
||||
current = value;
|
||||
OnVersionChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选中版本改变事件
|
||||
/// </summary>
|
||||
public event EventHandler VersionChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 触发版本更改事件
|
||||
/// </summary>
|
||||
private void OnVersionChanged() => VersionChanged?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// 当前支持的最新版本 - 当未选择版本时,默认为最新版本
|
||||
/// </summary>
|
||||
public static CommandVersion Latest() => new CommandVersion(List[List.Length - 1]);
|
||||
|
||||
|
||||
#region - 版本列表 Version List -
|
||||
|
||||
// 忽略更早以前的版本
|
||||
/// <summary>
|
||||
/// v1.2.1 2022/6/18
|
||||
/// git 30c7bb94439a123417a6a1e0116acd3c40f2d115
|
||||
/// </summary>
|
||||
public static readonly Version V1_2_1 = new Version(1, 2, 1);
|
||||
|
||||
/// <summary>
|
||||
/// v1.2.1 -> v1.2.2 2022/6/22
|
||||
/// git aa43943025fefcda9739c9fcf242e67f1a7b83b4
|
||||
/// </summary>
|
||||
public static readonly Version V1_2_2 = new Version(1, 2, 2);
|
||||
|
||||
/// <summary>
|
||||
/// v1.2.2 -> v1.2.3 2022/7/21
|
||||
/// git a07b3f21e6fbeb9abfad8862d6fa0dc4a1c3c1a3
|
||||
/// </summary>
|
||||
public static readonly Version V1_2_3 = new Version(1, 2, 3);
|
||||
|
||||
// More...
|
||||
/// <summary>
|
||||
/// v1.2.3 -> v1.2.4 2022/7/21
|
||||
/// git hash
|
||||
/// </summary>
|
||||
//public static readonly Version V1_2_4 = new Version(1, 2, 4);
|
||||
|
||||
public static Version[] List { get; } = new Version[] {
|
||||
V1_2_1,
|
||||
V1_2_2,
|
||||
V1_2_3,
|
||||
//V1_2_4,
|
||||
};
|
||||
|
||||
#endregion - 版本列表 Version List -
|
||||
}
|
||||
}
|
@ -81,6 +81,7 @@
|
||||
<Compile Include="Forms\FormTextMapBrowser.Designer.cs">
|
||||
<DependentUpon>FormTextMapBrowser.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Game\CommandVersion.cs" />
|
||||
<Compile Include="Game\Gacha\GachaBanner2.cs" />
|
||||
<Compile Include="Game\GameCommand.cs" />
|
||||
<Compile Include="Game\Gacha\BannerType.cs" />
|
||||
@ -103,6 +104,7 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Utils\ArtifactUtils.cs" />
|
||||
<Compile Include="Utils\HttpHelper.cs" />
|
||||
<Compile Include="Utils\ReleaseAPI.cs" />
|
||||
|
@ -23,14 +23,20 @@ namespace GrasscutterTools
|
||||
{
|
||||
internal static class MultiLanguage
|
||||
{
|
||||
public static string DefaultLanguage = "zh-CN";
|
||||
/// <summary>
|
||||
/// 语言名称列表
|
||||
/// </summary>
|
||||
public static readonly string[] LanguageNames = new string[] { "简体中文", "繁體中文", "English", "Русский" };
|
||||
|
||||
/// <summary>
|
||||
/// 语言代码列表
|
||||
/// </summary>
|
||||
public static readonly string[] Languages = new string[] { "zh-CN", "zh-TW", "en-US", "ru-RU" };
|
||||
|
||||
public static void SetDefaultLanguage(string lang)
|
||||
{
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
||||
DefaultLanguage = lang;
|
||||
Properties.Settings.Default.DefaultLanguage = lang;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -72,6 +72,10 @@ namespace GrasscutterTools
|
||||
//处理非UI线程异常
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
|
||||
// 初始化语言环境
|
||||
if (!string.IsNullOrEmpty(Settings.Default.DefaultLanguage))
|
||||
MultiLanguage.SetDefaultLanguage(Settings.Default.DefaultLanguage);
|
||||
|
||||
Application.Run(new Forms.FormMain());
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace GrasscutterTools.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
|
||||
[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())));
|
||||
@ -49,7 +49,7 @@ namespace GrasscutterTools.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("zh-CN")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DefaultLanguage {
|
||||
get {
|
||||
return ((string)(this["DefaultLanguage"]));
|
||||
@ -133,7 +133,7 @@ namespace GrasscutterTools.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1.2.2")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string CommandVersion {
|
||||
get {
|
||||
return ((string)(this["CommandVersion"]));
|
||||
|
@ -9,7 +9,7 @@
|
||||
<Value Profile="(Default)">10001</Value>
|
||||
</Setting>
|
||||
<Setting Name="DefaultLanguage" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">zh-CN</Value>
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ResourcesDirPath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
@ -30,7 +30,7 @@
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="CommandVersion" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">1.2.2</Value>
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="IsTopMost" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
|
28
Source/GrasscutterTools/Settings.cs
Normal file
28
Source/GrasscutterTools/Settings.cs
Normal file
@ -0,0 +1,28 @@
|
||||
namespace GrasscutterTools.Properties {
|
||||
|
||||
|
||||
// 通过此类可以处理设置类的特定事件:
|
||||
// 在更改某个设置的值之前将引发 SettingChanging 事件。
|
||||
// 在更改某个设置的值之后将引发 PropertyChanged 事件。
|
||||
// 在加载设置值之后将引发 SettingsLoaded 事件。
|
||||
// 在保存设置值之前将引发 SettingsSaving 事件。
|
||||
internal sealed partial class Settings {
|
||||
|
||||
public Settings() {
|
||||
// // 若要为保存和更改设置添加事件处理程序,请取消注释下列行:
|
||||
//
|
||||
// this.SettingChanging += this.SettingChangingEventHandler;
|
||||
//
|
||||
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
||||
//
|
||||
}
|
||||
|
||||
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
|
||||
// 在此处添加用于处理 SettingChangingEvent 事件的代码。
|
||||
}
|
||||
|
||||
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
|
||||
// 在此处添加用于处理 SettingsSaving 事件的代码。
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user