Update to no longer automatically pop-up prompts to update
Change when to look for native services
This commit is contained in:
2022-09-01 23:17:38 +08:00
parent a70a3979e5
commit 43ff071250
3 changed files with 5488 additions and 5423 deletions

View File

@ -216,6 +216,7 @@ namespace GrasscutterTools.Forms
this.BtnSaveCustomCommand = new System.Windows.Forms.Button(); this.BtnSaveCustomCommand = new System.Windows.Forms.Button();
this.TxtCustomName = new System.Windows.Forms.TextBox(); this.TxtCustomName = new System.Windows.Forms.TextBox();
this.TPHome = new System.Windows.Forms.TabPage(); this.TPHome = new System.Windows.Forms.TabPage();
this.LnkNewVersion = new System.Windows.Forms.LinkLabel();
this.LblAbout = new System.Windows.Forms.Label(); this.LblAbout = new System.Windows.Forms.Label();
this.BtnOpenTextMap = new System.Windows.Forms.Button(); this.BtnOpenTextMap = new System.Windows.Forms.Button();
this.BtnOpenGachaBannerEditor = new System.Windows.Forms.Button(); this.BtnOpenGachaBannerEditor = new System.Windows.Forms.Button();
@ -326,7 +327,6 @@ namespace GrasscutterTools.Forms
// //
// TPRemoteCall // TPRemoteCall
// //
resources.ApplyResources(this.TPRemoteCall, "TPRemoteCall");
this.TPRemoteCall.Controls.Add(this.LnkLinks); this.TPRemoteCall.Controls.Add(this.LnkLinks);
this.TPRemoteCall.Controls.Add(this.LnkGOODHelp); this.TPRemoteCall.Controls.Add(this.LnkGOODHelp);
this.TPRemoteCall.Controls.Add(this.LnkInventoryKamera); this.TPRemoteCall.Controls.Add(this.LnkInventoryKamera);
@ -338,8 +338,10 @@ namespace GrasscutterTools.Forms
this.TPRemoteCall.Controls.Add(this.TxtHost); this.TPRemoteCall.Controls.Add(this.TxtHost);
this.TPRemoteCall.Controls.Add(this.BtnQueryServerStatus); this.TPRemoteCall.Controls.Add(this.BtnQueryServerStatus);
this.TPRemoteCall.Controls.Add(this.LblHost); this.TPRemoteCall.Controls.Add(this.LblHost);
resources.ApplyResources(this.TPRemoteCall, "TPRemoteCall");
this.TPRemoteCall.Name = "TPRemoteCall"; this.TPRemoteCall.Name = "TPRemoteCall";
this.TPRemoteCall.UseVisualStyleBackColor = true; this.TPRemoteCall.UseVisualStyleBackColor = true;
this.TPRemoteCall.Enter += new System.EventHandler(this.TPRemoteCall_Enter);
// //
// LnkLinks // LnkLinks
// //
@ -434,15 +436,14 @@ namespace GrasscutterTools.Forms
// //
// TPOpenCommandCheck // TPOpenCommandCheck
// //
resources.ApplyResources(this.TPOpenCommandCheck, "TPOpenCommandCheck");
this.TPOpenCommandCheck.Controls.Add(this.TPPlayerCheck); this.TPOpenCommandCheck.Controls.Add(this.TPPlayerCheck);
this.TPOpenCommandCheck.Controls.Add(this.TPConsoleCheck); this.TPOpenCommandCheck.Controls.Add(this.TPConsoleCheck);
resources.ApplyResources(this.TPOpenCommandCheck, "TPOpenCommandCheck");
this.TPOpenCommandCheck.Name = "TPOpenCommandCheck"; this.TPOpenCommandCheck.Name = "TPOpenCommandCheck";
this.TPOpenCommandCheck.SelectedIndex = 0; this.TPOpenCommandCheck.SelectedIndex = 0;
// //
// TPPlayerCheck // TPPlayerCheck
// //
resources.ApplyResources(this.TPPlayerCheck, "TPPlayerCheck");
this.TPPlayerCheck.Controls.Add(this.LnkRCHelp); this.TPPlayerCheck.Controls.Add(this.LnkRCHelp);
this.TPPlayerCheck.Controls.Add(this.NUDRemotePlayerId); this.TPPlayerCheck.Controls.Add(this.NUDRemotePlayerId);
this.TPPlayerCheck.Controls.Add(this.BtnConnectOpenCommand); this.TPPlayerCheck.Controls.Add(this.BtnConnectOpenCommand);
@ -450,6 +451,7 @@ namespace GrasscutterTools.Forms
this.TPPlayerCheck.Controls.Add(this.BtnSendVerificationCode); this.TPPlayerCheck.Controls.Add(this.BtnSendVerificationCode);
this.TPPlayerCheck.Controls.Add(this.NUDVerificationCode); this.TPPlayerCheck.Controls.Add(this.NUDVerificationCode);
this.TPPlayerCheck.Controls.Add(this.LblRemotePlayerId); this.TPPlayerCheck.Controls.Add(this.LblRemotePlayerId);
resources.ApplyResources(this.TPPlayerCheck, "TPPlayerCheck");
this.TPPlayerCheck.Name = "TPPlayerCheck"; this.TPPlayerCheck.Name = "TPPlayerCheck";
this.TPPlayerCheck.UseVisualStyleBackColor = true; this.TPPlayerCheck.UseVisualStyleBackColor = true;
// //
@ -521,11 +523,11 @@ namespace GrasscutterTools.Forms
// //
// TPConsoleCheck // TPConsoleCheck
// //
resources.ApplyResources(this.TPConsoleCheck, "TPConsoleCheck");
this.TPConsoleCheck.Controls.Add(this.BtnConsoleConnect); this.TPConsoleCheck.Controls.Add(this.BtnConsoleConnect);
this.TPConsoleCheck.Controls.Add(this.TxtToken); this.TPConsoleCheck.Controls.Add(this.TxtToken);
this.TPConsoleCheck.Controls.Add(this.LblToken); this.TPConsoleCheck.Controls.Add(this.LblToken);
this.TPConsoleCheck.Controls.Add(this.LblConsoleTip); this.TPConsoleCheck.Controls.Add(this.LblConsoleTip);
resources.ApplyResources(this.TPConsoleCheck, "TPConsoleCheck");
this.TPConsoleCheck.Name = "TPConsoleCheck"; this.TPConsoleCheck.Name = "TPConsoleCheck";
this.TPConsoleCheck.UseVisualStyleBackColor = true; this.TPConsoleCheck.UseVisualStyleBackColor = true;
// //
@ -570,10 +572,10 @@ namespace GrasscutterTools.Forms
// //
// TPAbout // TPAbout
// //
resources.ApplyResources(this.TPAbout, "TPAbout");
this.TPAbout.Controls.Add(this.GrasscutterToolsSupport); this.TPAbout.Controls.Add(this.GrasscutterToolsSupport);
this.TPAbout.Controls.Add(this.LnkGithub); this.TPAbout.Controls.Add(this.LnkGithub);
this.TPAbout.Controls.Add(this.LblSupportDescription); this.TPAbout.Controls.Add(this.LblSupportDescription);
resources.ApplyResources(this.TPAbout, "TPAbout");
this.TPAbout.Name = "TPAbout"; this.TPAbout.Name = "TPAbout";
this.TPAbout.UseVisualStyleBackColor = true; this.TPAbout.UseVisualStyleBackColor = true;
// //
@ -598,10 +600,10 @@ namespace GrasscutterTools.Forms
// //
// TPManage // TPManage
// //
resources.ApplyResources(this.TPManage, "TPManage");
this.TPManage.Controls.Add(this.GrpBanPlayer); this.TPManage.Controls.Add(this.GrpBanPlayer);
this.TPManage.Controls.Add(this.GrpAccount); this.TPManage.Controls.Add(this.GrpAccount);
this.TPManage.Controls.Add(this.GrpPermission); this.TPManage.Controls.Add(this.GrpPermission);
resources.ApplyResources(this.TPManage, "TPManage");
this.TPManage.Name = "TPManage"; this.TPManage.Name = "TPManage";
this.TPManage.UseVisualStyleBackColor = true; this.TPManage.UseVisualStyleBackColor = true;
// //
@ -619,8 +621,8 @@ namespace GrasscutterTools.Forms
// //
// DTPBanEndTime // DTPBanEndTime
// //
resources.ApplyResources(this.DTPBanEndTime, "DTPBanEndTime");
this.DTPBanEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Short; 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.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.MinDate = new System.DateTime(2022, 6, 28, 0, 0, 0, 0);
this.DTPBanEndTime.Name = "DTPBanEndTime"; this.DTPBanEndTime.Name = "DTPBanEndTime";
@ -642,8 +644,8 @@ namespace GrasscutterTools.Forms
// //
// TxtBanReason // TxtBanReason
// //
resources.ApplyResources(this.TxtBanReason, "TxtBanReason");
this.TxtBanReason.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.TxtBanReason.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.TxtBanReason, "TxtBanReason");
this.TxtBanReason.Maximum = 0F; this.TxtBanReason.Maximum = 0F;
this.TxtBanReason.Minimum = 0F; this.TxtBanReason.Minimum = 0F;
this.TxtBanReason.Name = "TxtBanReason"; this.TxtBanReason.Name = "TxtBanReason";
@ -750,10 +752,10 @@ namespace GrasscutterTools.Forms
// //
// CmbPerm // CmbPerm
// //
resources.ApplyResources(this.CmbPerm, "CmbPerm");
this.CmbPerm.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; this.CmbPerm.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CmbPerm.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.CmbPerm.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CmbPerm.FormattingEnabled = true; this.CmbPerm.FormattingEnabled = true;
resources.ApplyResources(this.CmbPerm, "CmbPerm");
this.CmbPerm.Name = "CmbPerm"; this.CmbPerm.Name = "CmbPerm";
// //
// NUDPermUID // NUDPermUID
@ -815,7 +817,6 @@ namespace GrasscutterTools.Forms
// //
// TPScene // TPScene
// //
resources.ApplyResources(this.TPScene, "TPScene");
this.TPScene.Controls.Add(this.TxtSceneFilter); this.TPScene.Controls.Add(this.TxtSceneFilter);
this.TPScene.Controls.Add(this.ChkIncludeSceneId); this.TPScene.Controls.Add(this.ChkIncludeSceneId);
this.TPScene.Controls.Add(this.LblTpZ); this.TPScene.Controls.Add(this.LblTpZ);
@ -830,6 +831,7 @@ namespace GrasscutterTools.Forms
this.TPScene.Controls.Add(this.LblSceneDescription); this.TPScene.Controls.Add(this.LblSceneDescription);
this.TPScene.Controls.Add(this.ListScenes); this.TPScene.Controls.Add(this.ListScenes);
this.TPScene.Controls.Add(this.LblTp); this.TPScene.Controls.Add(this.LblTp);
resources.ApplyResources(this.TPScene, "TPScene");
this.TPScene.Name = "TPScene"; this.TPScene.Name = "TPScene";
this.TPScene.UseVisualStyleBackColor = true; this.TPScene.UseVisualStyleBackColor = true;
// //
@ -964,7 +966,6 @@ namespace GrasscutterTools.Forms
// //
// TPItem // TPItem
// //
resources.ApplyResources(this.TPItem, "TPItem");
this.TPItem.Controls.Add(this.LblClearGiveItemLogs); this.TPItem.Controls.Add(this.LblClearGiveItemLogs);
this.TPItem.Controls.Add(this.BtnSaveGiveItemLog); this.TPItem.Controls.Add(this.BtnSaveGiveItemLog);
this.TPItem.Controls.Add(this.BtnRemoveGiveItemLog); this.TPItem.Controls.Add(this.BtnRemoveGiveItemLog);
@ -977,6 +978,7 @@ namespace GrasscutterTools.Forms
this.TPItem.Controls.Add(this.NUDGameItemAmout); this.TPItem.Controls.Add(this.NUDGameItemAmout);
this.TPItem.Controls.Add(this.NUDGameItemLevel); this.TPItem.Controls.Add(this.NUDGameItemLevel);
this.TPItem.Controls.Add(this.LblGiveCommandDescription); this.TPItem.Controls.Add(this.LblGiveCommandDescription);
resources.ApplyResources(this.TPItem, "TPItem");
this.TPItem.Name = "TPItem"; this.TPItem.Name = "TPItem";
this.TPItem.UseVisualStyleBackColor = true; this.TPItem.UseVisualStyleBackColor = true;
// //
@ -1094,7 +1096,6 @@ namespace GrasscutterTools.Forms
// //
// TPWeapon // TPWeapon
// //
resources.ApplyResources(this.TPWeapon, "TPWeapon");
this.TPWeapon.Controls.Add(this.TxtWeaponFilter); this.TPWeapon.Controls.Add(this.TxtWeaponFilter);
this.TPWeapon.Controls.Add(this.LblWeaponDescription); this.TPWeapon.Controls.Add(this.LblWeaponDescription);
this.TPWeapon.Controls.Add(this.LblWeaponRefinement); this.TPWeapon.Controls.Add(this.LblWeaponRefinement);
@ -1104,6 +1105,7 @@ namespace GrasscutterTools.Forms
this.TPWeapon.Controls.Add(this.NUDWeaponAmout); this.TPWeapon.Controls.Add(this.NUDWeaponAmout);
this.TPWeapon.Controls.Add(this.NUDWeaponLevel); this.TPWeapon.Controls.Add(this.NUDWeaponLevel);
this.TPWeapon.Controls.Add(this.ListWeapons); this.TPWeapon.Controls.Add(this.ListWeapons);
resources.ApplyResources(this.TPWeapon, "TPWeapon");
this.TPWeapon.Name = "TPWeapon"; this.TPWeapon.Name = "TPWeapon";
this.TPWeapon.UseVisualStyleBackColor = true; this.TPWeapon.UseVisualStyleBackColor = true;
// //
@ -1200,10 +1202,10 @@ namespace GrasscutterTools.Forms
// //
// TPStats // TPStats
// //
resources.ApplyResources(this.TPStats, "TPStats");
this.TPStats.Controls.Add(this.GrpSetStats); this.TPStats.Controls.Add(this.GrpSetStats);
this.TPStats.Controls.Add(this.GrpTalentLevel); this.TPStats.Controls.Add(this.GrpTalentLevel);
this.TPStats.Controls.Add(this.LblStatsDescription); this.TPStats.Controls.Add(this.LblStatsDescription);
resources.ApplyResources(this.TPStats, "TPStats");
this.TPStats.Name = "TPStats"; this.TPStats.Name = "TPStats";
this.TPStats.UseVisualStyleBackColor = true; this.TPStats.UseVisualStyleBackColor = true;
// //
@ -1235,9 +1237,9 @@ namespace GrasscutterTools.Forms
// //
// LblStatTip // LblStatTip
// //
resources.ApplyResources(this.LblStatTip, "LblStatTip");
this.LblStatTip.AutoEllipsis = true; this.LblStatTip.AutoEllipsis = true;
this.LblStatTip.ForeColor = System.Drawing.SystemColors.GrayText; this.LblStatTip.ForeColor = System.Drawing.SystemColors.GrayText;
resources.ApplyResources(this.LblStatTip, "LblStatTip");
this.LblStatTip.Name = "LblStatTip"; this.LblStatTip.Name = "LblStatTip";
// //
// LblStatPercent // LblStatPercent
@ -1263,9 +1265,9 @@ namespace GrasscutterTools.Forms
// //
// CmbStat // CmbStat
// //
resources.ApplyResources(this.CmbStat, "CmbStat");
this.CmbStat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbStat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbStat.FormattingEnabled = true; this.CmbStat.FormattingEnabled = true;
resources.ApplyResources(this.CmbStat, "CmbStat");
this.CmbStat.Name = "CmbStat"; this.CmbStat.Name = "CmbStat";
this.CmbStat.SelectedIndexChanged += new System.EventHandler(this.SetStatsInputChanged); this.CmbStat.SelectedIndexChanged += new System.EventHandler(this.SetStatsInputChanged);
// //
@ -1325,7 +1327,6 @@ namespace GrasscutterTools.Forms
// //
// TPAvatar // TPAvatar
// //
resources.ApplyResources(this.TPAvatar, "TPAvatar");
this.TPAvatar.Controls.Add(this.BtnGiveAllChar); this.TPAvatar.Controls.Add(this.BtnGiveAllChar);
this.TPAvatar.Controls.Add(this.LblConstellationTip); this.TPAvatar.Controls.Add(this.LblConstellationTip);
this.TPAvatar.Controls.Add(this.LblAvatarConstellation); this.TPAvatar.Controls.Add(this.LblAvatarConstellation);
@ -1335,6 +1336,7 @@ namespace GrasscutterTools.Forms
this.TPAvatar.Controls.Add(this.LblAvatarLevel); this.TPAvatar.Controls.Add(this.LblAvatarLevel);
this.TPAvatar.Controls.Add(this.NUDAvatarLevel); this.TPAvatar.Controls.Add(this.NUDAvatarLevel);
this.TPAvatar.Controls.Add(this.CmbAvatar); this.TPAvatar.Controls.Add(this.CmbAvatar);
resources.ApplyResources(this.TPAvatar, "TPAvatar");
this.TPAvatar.Name = "TPAvatar"; this.TPAvatar.Name = "TPAvatar";
this.TPAvatar.UseVisualStyleBackColor = true; this.TPAvatar.UseVisualStyleBackColor = true;
// //
@ -1420,7 +1422,6 @@ namespace GrasscutterTools.Forms
// //
// TPSpawn // TPSpawn
// //
resources.ApplyResources(this.TPSpawn, "TPSpawn");
this.TPSpawn.Controls.Add(this.LblClearSpawnLogs); this.TPSpawn.Controls.Add(this.LblClearSpawnLogs);
this.TPSpawn.Controls.Add(this.BtnSaveSpawnLog); this.TPSpawn.Controls.Add(this.BtnSaveSpawnLog);
this.TPSpawn.Controls.Add(this.BtnRemoveSpawnLog); this.TPSpawn.Controls.Add(this.BtnRemoveSpawnLog);
@ -1433,6 +1434,7 @@ namespace GrasscutterTools.Forms
this.TPSpawn.Controls.Add(this.NUDEntityLevel); this.TPSpawn.Controls.Add(this.NUDEntityLevel);
this.TPSpawn.Controls.Add(this.TxtEntityFilter); this.TPSpawn.Controls.Add(this.TxtEntityFilter);
this.TPSpawn.Controls.Add(this.ListEntity); this.TPSpawn.Controls.Add(this.ListEntity);
resources.ApplyResources(this.TPSpawn, "TPSpawn");
this.TPSpawn.Name = "TPSpawn"; this.TPSpawn.Name = "TPSpawn";
this.TPSpawn.UseVisualStyleBackColor = true; this.TPSpawn.UseVisualStyleBackColor = true;
// //
@ -1573,13 +1575,13 @@ namespace GrasscutterTools.Forms
// //
// TPQuest // TPQuest
// //
resources.ApplyResources(this.TPQuest, "TPQuest");
this.TPQuest.Controls.Add(this.GrpQuestFilters); this.TPQuest.Controls.Add(this.GrpQuestFilters);
this.TPQuest.Controls.Add(this.BtnFinishQuest); this.TPQuest.Controls.Add(this.BtnFinishQuest);
this.TPQuest.Controls.Add(this.BtnAddQuest); this.TPQuest.Controls.Add(this.BtnAddQuest);
this.TPQuest.Controls.Add(this.LblQuestDescription); this.TPQuest.Controls.Add(this.LblQuestDescription);
this.TPQuest.Controls.Add(this.TxtQuestFilter); this.TPQuest.Controls.Add(this.TxtQuestFilter);
this.TPQuest.Controls.Add(this.ListQuest); this.TPQuest.Controls.Add(this.ListQuest);
resources.ApplyResources(this.TPQuest, "TPQuest");
this.TPQuest.Name = "TPQuest"; this.TPQuest.Name = "TPQuest";
this.TPQuest.UseVisualStyleBackColor = true; this.TPQuest.UseVisualStyleBackColor = true;
// //
@ -1651,7 +1653,6 @@ namespace GrasscutterTools.Forms
// //
// TPArtifact // TPArtifact
// //
resources.ApplyResources(this.TPArtifact, "TPArtifact");
this.TPArtifact.Controls.Add(this.LblArtifactLevelTip); this.TPArtifact.Controls.Add(this.LblArtifactLevelTip);
this.TPArtifact.Controls.Add(this.BtnAddSubAttr); this.TPArtifact.Controls.Add(this.BtnAddSubAttr);
this.TPArtifact.Controls.Add(this.LblArtifactName); this.TPArtifact.Controls.Add(this.LblArtifactName);
@ -1671,6 +1672,7 @@ namespace GrasscutterTools.Forms
this.TPArtifact.Controls.Add(this.NUDArtifactLevel); this.TPArtifact.Controls.Add(this.NUDArtifactLevel);
this.TPArtifact.Controls.Add(this.LblArtifactStars); this.TPArtifact.Controls.Add(this.LblArtifactStars);
this.TPArtifact.Controls.Add(this.NUDArtifactStars); this.TPArtifact.Controls.Add(this.NUDArtifactStars);
resources.ApplyResources(this.TPArtifact, "TPArtifact");
this.TPArtifact.Name = "TPArtifact"; this.TPArtifact.Name = "TPArtifact";
this.TPArtifact.UseVisualStyleBackColor = true; this.TPArtifact.UseVisualStyleBackColor = true;
// //
@ -1836,7 +1838,6 @@ namespace GrasscutterTools.Forms
// //
// TPCustom // TPCustom
// //
resources.ApplyResources(this.TPCustom, "TPCustom");
this.TPCustom.Controls.Add(this.BtnExportCustomCommands); this.TPCustom.Controls.Add(this.BtnExportCustomCommands);
this.TPCustom.Controls.Add(this.BtnLoadCustomCommands); this.TPCustom.Controls.Add(this.BtnLoadCustomCommands);
this.TPCustom.Controls.Add(this.LblCustomName); this.TPCustom.Controls.Add(this.LblCustomName);
@ -1844,6 +1845,7 @@ namespace GrasscutterTools.Forms
this.TPCustom.Controls.Add(this.BtnRemoveCustomCommand); this.TPCustom.Controls.Add(this.BtnRemoveCustomCommand);
this.TPCustom.Controls.Add(this.BtnSaveCustomCommand); this.TPCustom.Controls.Add(this.BtnSaveCustomCommand);
this.TPCustom.Controls.Add(this.TxtCustomName); this.TPCustom.Controls.Add(this.TxtCustomName);
resources.ApplyResources(this.TPCustom, "TPCustom");
this.TPCustom.Name = "TPCustom"; this.TPCustom.Name = "TPCustom";
this.TPCustom.UseVisualStyleBackColor = true; this.TPCustom.UseVisualStyleBackColor = true;
// //
@ -1907,15 +1909,23 @@ namespace GrasscutterTools.Forms
// //
// TPHome // TPHome
// //
resources.ApplyResources(this.TPHome, "TPHome"); this.TPHome.Controls.Add(this.LnkNewVersion);
this.TPHome.Controls.Add(this.LblAbout); this.TPHome.Controls.Add(this.LblAbout);
this.TPHome.Controls.Add(this.BtnOpenTextMap); this.TPHome.Controls.Add(this.BtnOpenTextMap);
this.TPHome.Controls.Add(this.BtnOpenGachaBannerEditor); this.TPHome.Controls.Add(this.BtnOpenGachaBannerEditor);
this.TPHome.Controls.Add(this.GrasscutterToolsIcon); this.TPHome.Controls.Add(this.GrasscutterToolsIcon);
this.TPHome.Controls.Add(this.GrpSettings); this.TPHome.Controls.Add(this.GrpSettings);
resources.ApplyResources(this.TPHome, "TPHome");
this.TPHome.Name = "TPHome"; this.TPHome.Name = "TPHome";
this.TPHome.UseVisualStyleBackColor = true; this.TPHome.UseVisualStyleBackColor = true;
// //
// LnkNewVersion
//
resources.ApplyResources(this.LnkNewVersion, "LnkNewVersion");
this.LnkNewVersion.Name = "LnkNewVersion";
this.LnkNewVersion.TabStop = true;
this.LnkNewVersion.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LnkNewVersion_LinkClicked);
//
// LblAbout // LblAbout
// //
resources.ApplyResources(this.LblAbout, "LblAbout"); resources.ApplyResources(this.LblAbout, "LblAbout");
@ -1963,9 +1973,9 @@ namespace GrasscutterTools.Forms
// //
// CmbGcVersions // CmbGcVersions
// //
resources.ApplyResources(this.CmbGcVersions, "CmbGcVersions");
this.CmbGcVersions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbGcVersions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbGcVersions.FormattingEnabled = true; this.CmbGcVersions.FormattingEnabled = true;
resources.ApplyResources(this.CmbGcVersions, "CmbGcVersions");
this.CmbGcVersions.Name = "CmbGcVersions"; this.CmbGcVersions.Name = "CmbGcVersions";
// //
// ChkTopMost // ChkTopMost
@ -1976,9 +1986,9 @@ namespace GrasscutterTools.Forms
// //
// CmbLanguage // CmbLanguage
// //
resources.ApplyResources(this.CmbLanguage, "CmbLanguage");
this.CmbLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CmbLanguage.FormattingEnabled = true; this.CmbLanguage.FormattingEnabled = true;
resources.ApplyResources(this.CmbLanguage, "CmbLanguage");
this.CmbLanguage.Name = "CmbLanguage"; this.CmbLanguage.Name = "CmbLanguage";
// //
// LblLanguage // LblLanguage
@ -2331,5 +2341,6 @@ namespace GrasscutterTools.Forms
private System.Windows.Forms.Label LblPermNewCommandTip; private System.Windows.Forms.Label LblPermNewCommandTip;
private System.Windows.Forms.Button BtnPermClear; private System.Windows.Forms.Button BtnPermClear;
private System.Windows.Forms.Button BtnPermList; private System.Windows.Forms.Button BtnPermList;
private System.Windows.Forms.LinkLabel LnkNewVersion;
} }
} }

View File

@ -46,9 +46,17 @@ namespace GrasscutterTools.Forms
{ {
InitializeComponent(); InitializeComponent();
Icon = Resources.IconGrasscutter; Icon = Resources.IconGrasscutter;
// 加载版本信息
LoadVersion(); LoadVersion();
// 加载设置
LoadSettings(); LoadSettings();
LoadUpdate();
#if !DEBUG // 仅正式版
// 检查更新,但不要弹窗
Task.Run(async () => { try { await LoadUpdate(); } catch { /* 启动时检查更新,忽略异常 */ }});
#endif
} }
private void FormMain_Load(object sender, EventArgs e) private void FormMain_Load(object sender, EventArgs e)
@ -142,42 +150,23 @@ namespace GrasscutterTools.Forms
} }
} }
private void LoadUpdate() private ReleaseAPI.ReleaseInfo LastestInfo = null;
private Version lastestVersion = null;
private async Task LoadUpdate()
{ {
#if !DEBUG
Task.Run(async () =>
{
try
{
await Task.Delay(5000);
var info = await ReleaseAPI.GetReleasesLastest("jie65535", "GrasscutterCommandGenerator"); var info = await ReleaseAPI.GetReleasesLastest("jie65535", "GrasscutterCommandGenerator");
if (Version.TryParse(info.TagName.Substring(1), out Version lastestVersion) && AppVersion < lastestVersion) if (Version.TryParse(info.TagName.Substring(1), out lastestVersion) && AppVersion < lastestVersion)
{ {
if (!string.IsNullOrEmpty(Settings.Default.CheckedLastVersion) if (!string.IsNullOrEmpty(Settings.Default.CheckedLastVersion)
&& Version.TryParse(Settings.Default.CheckedLastVersion, out Version checkedVersion) && Version.TryParse(Settings.Default.CheckedLastVersion, out Version checkedVersion)
&& checkedVersion >= lastestVersion) && checkedVersion >= lastestVersion)
return; return;
BeginInvoke(new Action(() => LnkNewVersion.Text = Resources.CheckToNewVersion;
{ LnkNewVersion.Visible = true;
var r = MessageBox.Show( LastestInfo = info;
string.Format(Resources.NewVersionInfo, info.Name, info.CraeteTime.ToLocalTime(), info.Body),
Resources.CheckToNewVersion,
MessageBoxButtons.YesNo,
MessageBoxIcon.Information);
if (r == DialogResult.Yes)
OpenURL(info.Url);
else if (r == DialogResult.No)
Settings.Default.CheckedLastVersion = lastestVersion.ToString();
}));
} }
} }
catch (Exception)
{
throw;
}
});
#endif
}
#endregion - Init - #endregion - Init -
@ -291,6 +280,31 @@ namespace GrasscutterTools.Forms
ChangeTPArtifact(); ChangeTPArtifact();
} }
/// <summary>
/// 点击检查更新时触发
/// </summary>
private void LnkNewVersion_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (LastestInfo != null)
{
var r = MessageBox.Show(
string.Format(Resources.NewVersionInfo, LastestInfo.Name, LastestInfo.CraeteTime.ToLocalTime(), LastestInfo.Body),
Resources.CheckToNewVersion,
MessageBoxButtons.YesNo,
MessageBoxIcon.Information);
if (r == DialogResult.Yes)
OpenURL(LastestInfo.Url);
else if (r == DialogResult.No)
Settings.Default.CheckedLastVersion = lastestVersion.ToString();
}
else
{
// 没有更新,隐藏
LnkNewVersion.Visible = false;
}
}
#endregion - Home - #endregion - Home -
#region - Custom - #region - Custom -
@ -1647,29 +1661,16 @@ namespace GrasscutterTools.Forms
private OpenCommandAPI OC; private OpenCommandAPI OC;
/// <summary> /// <summary>
/// 初始化开放命令 /// 进入远程页面时触发
/// </summary> /// </summary>
private void InitOpenCommand() private void TPRemoteCall_Enter(object sender, EventArgs e)
{
NUDRemotePlayerId.Value = Settings.Default.RemoteUid;
TxtHost.Text = Settings.Default.Host;
if (!string.IsNullOrEmpty(Settings.Default.Host) && !string.IsNullOrEmpty(Settings.Default.TokenCache))
{
OC = new OpenCommandAPI(Settings.Default.Host, Settings.Default.TokenCache);
TxtToken.Text = Settings.Default.TokenCache;
Task.Run(async () =>
{
await Task.Delay(1000);
BeginInvoke(new Action(() => ShowTip(Resources.TokenRestoredFromCache, BtnInvokeOpenCommand)));
});
}
else
{ {
#if !DEBUG #if !DEBUG
if (string.IsNullOrEmpty(Settings.Default.Host) || string.IsNullOrEmpty(Settings.Default.TokenCache))
{
// 自动尝试查询本地服务端地址,降低使用门槛 // 自动尝试查询本地服务端地址,降低使用门槛
Task.Run(async () => Task.Run(async () =>
{ {
await Task.Delay(5000);
var localhosts = new string[] { var localhosts = new string[] {
"http://127.0.0.1:443", "http://127.0.0.1:443",
"https://127.0.0.1", "https://127.0.0.1",
@ -1693,8 +1694,27 @@ namespace GrasscutterTools.Forms
} }
} }
}); });
}
#endif #endif
} }
/// <summary>
/// 初始化开放命令
/// </summary>
private void InitOpenCommand()
{
NUDRemotePlayerId.Value = Settings.Default.RemoteUid;
TxtHost.Text = Settings.Default.Host;
if (!string.IsNullOrEmpty(Settings.Default.Host) && !string.IsNullOrEmpty(Settings.Default.TokenCache))
{
OC = new OpenCommandAPI(Settings.Default.Host, Settings.Default.TokenCache);
TxtToken.Text = Settings.Default.TokenCache;
Task.Run(async () =>
{
await Task.Delay(1000);
BeginInvoke(new Action(() => ShowTip(Resources.TokenRestoredFromCache, BtnInvokeOpenCommand)));
});
}
} }
/// <summary> /// <summary>
@ -2084,5 +2104,6 @@ namespace GrasscutterTools.Forms
} }
#endregion - Quests - #endregion - Quests -
} }
} }

File diff suppressed because it is too large Load Diff