diff --git a/Source/GrasscutterTools/Pages/PageQuest.Designer.cs b/Source/GrasscutterTools/Pages/PageQuest.Designer.cs index 8e79d5e0..d2e942be 100644 --- a/Source/GrasscutterTools/Pages/PageQuest.Designer.cs +++ b/Source/GrasscutterTools/Pages/PageQuest.Designer.cs @@ -39,6 +39,7 @@ private void InitializeComponent() this.TxtQuestFilter = new System.Windows.Forms.TextBox(); this.ListQuest = new System.Windows.Forms.ListBox(); this.LblClearFilter = new System.Windows.Forms.Label(); + this.ChkAddAndFinishQuest = new System.Windows.Forms.CheckBox(); this.GrpQuestFilters.SuspendLayout(); this.SuspendLayout(); // @@ -107,6 +108,7 @@ private void InitializeComponent() resources.ApplyResources(this.ListQuest, "ListQuest"); this.ListQuest.FormattingEnabled = true; this.ListQuest.Name = "ListQuest"; + this.ListQuest.SelectedIndexChanged += new System.EventHandler(this.ListQuest_SelectedIndexChanged); // // LblClearFilter // @@ -116,10 +118,17 @@ private void InitializeComponent() this.LblClearFilter.Name = "LblClearFilter"; this.LblClearFilter.Click += new System.EventHandler(this.LblClearFilter_Click); // + // ChkAddAndFinishQuest + // + resources.ApplyResources(this.ChkAddAndFinishQuest, "ChkAddAndFinishQuest"); + this.ChkAddAndFinishQuest.Name = "ChkAddAndFinishQuest"; + this.ChkAddAndFinishQuest.UseVisualStyleBackColor = true; + // // PageQuest // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.ChkAddAndFinishQuest); this.Controls.Add(this.LblClearFilter); this.Controls.Add(this.GrpQuestFilters); this.Controls.Add(this.BtnFinishQuest); @@ -147,5 +156,6 @@ private void InitializeComponent() private System.Windows.Forms.TextBox TxtQuestFilter; private System.Windows.Forms.ListBox ListQuest; private System.Windows.Forms.Label LblClearFilter; + private System.Windows.Forms.CheckBox ChkAddAndFinishQuest; } } diff --git a/Source/GrasscutterTools/Pages/PageQuest.cs b/Source/GrasscutterTools/Pages/PageQuest.cs index 83099f18..de2e0b01 100644 --- a/Source/GrasscutterTools/Pages/PageQuest.cs +++ b/Source/GrasscutterTools/Pages/PageQuest.cs @@ -84,7 +84,19 @@ private void QuestButsClicked(object sender, EventArgs e) return; var item = ListQuest.SelectedItem as string; var id = ItemMap.ToId(item); - SetCommand("/quest", $"{(sender as Button).Tag} {id}"); + SetCommand("/quest", $"{(sender == BtnAddQuest ? "add" : "finish")} {id}"); + } + + /// + /// 列表选中项改变时触发 + /// + private void ListQuest_SelectedIndexChanged(object sender, EventArgs e) + { + if (!ChkAddAndFinishQuest.Checked || ListQuest.SelectedIndex == -1) return; + + var item = ListQuest.SelectedItem as string; + var id = ItemMap.ToId(item); + SetCommand($"/quest add {id} | /quest finish {id}"); } } } \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageQuest.en-US.resx b/Source/GrasscutterTools/Pages/PageQuest.en-US.resx index 8a36ee37..f03687d7 100644 --- a/Source/GrasscutterTools/Pages/PageQuest.en-US.resx +++ b/Source/GrasscutterTools/Pages/PageQuest.en-US.resx @@ -151,4 +151,10 @@ Tip: Many quest require server-side scripting support Therefore, the quest can be added and finished, but not necessarily work. + + 187, 21 + + + Add && Finish when selected + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageQuest.resx b/Source/GrasscutterTools/Pages/PageQuest.resx index b6718d49..b7da2847 100644 --- a/Source/GrasscutterTools/Pages/PageQuest.resx +++ b/Source/GrasscutterTools/Pages/PageQuest.resx @@ -117,315 +117,345 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Bottom, Left + + + 26, 55 - - True + + 1 - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 26, 82 + + 添加任务 - - 75, 21 + + 288, 23 - - 2 + + 6 - - 测试任务 + + GrasscutterTools.Pages.BasePage, GrasscutterTools, Version=1.15.1.0, Culture=neutral, PublicKeyToken=de2b1c089621e923 - - ChkQuestFilterTEST + + ChkQuestFilterUNRELEASED + + + 99, 21 + + + 26, 28 + + + TxtQuestFilter + + + 22 + + + 3, 3 + + + 626, 5 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GrpQuestFilters + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + 17 - - True + + 90, 23 - + + + Top, Bottom, Left + + NoControl - - 26, 55 + + $this - - 99, 21 + + 7, 17 - - 1 + + 26, 82 - - 未发布的任务 + + Bottom, Left - - ChkQuestFilterUNRELEASED + + 2 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 4 - - GrpQuestFilters + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + 75, 21 - - True + + $this - + NoControl - - 26, 28 + + True - - 87, 21 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + GrpQuestFilters - - 隐藏的任务 + + Bottom, Left - - ChkQuestFilterHIDDEN + + ListQuest + + + GrpQuestFilters + + + GrpQuestFilters + + + 完成任务 + + + 3 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GrpQuestFilters + + 列表过滤 - + + NoControl + + + $this + + + True + + + 1 + + + 选中时添加并完成 + + 2 199, 106 - - 150, 130 + + 87, 21 - - 3 + + 23 - - 列表过滤 + + ChkAddAndFinishQuest - - GrpQuestFilters + + 123, 21 + + + ChkQuestFilterTEST System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + True - - 1 + + 4 - - Bottom, Left + + Top, Bottom, Left, Right - + NoControl - - 99, 213 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 90, 23 + + 2 - - 5 + + 346, 100 - - 完成任务 + + 测试任务 + + + 6, 186 + + + 16, 17 + + + True + + + 288, 208 + + + 150, 130 BtnFinishQuest - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - + $this - 2 - - - Bottom, Left + 3 - + NoControl - - 3, 213 - - - 90, 23 + + Top, Right - - 4 + + 99, 213 - - 添加任务 + + X BtnAddQuest - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 + + Bottom, Left - - Top, Bottom, Left + + ChkQuestFilterHIDDEN - + NoControl - - 3, 3 + + 1 - - 346, 100 + + 3, 213 - - 0 + + $this + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 添加或完成任务 提示:许多任务需要服务端脚本支持 因此任务可以接,可以完成,但是不一定可以做 - - LblQuestDescription - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - Top, Left, Right - - 355, 2 + + PageQuest - - 288, 23 + + LblClearFilter - + + $this + + 1 - - TxtQuestFilter + + $this System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this - - - 5 - - - Top, Bottom, Left, Right - - - 17 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 355, 28 + + False - - 288, 208 + + GrpQuestFilters - - 2 + + 0 - - ListQuest + + NoControl - - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 355, 2 - - $this + + 5 - - 6 + + 隐藏的任务 - - Top, Right + + 355, 28 - - True + + 90, 23 - - NoControl + + 5 - - 626, 5 + + 0 - - 16, 17 + + Bottom, Left - - 22 + + 7 - - X + + 2 - - False + + $this - - LblClearFilter + + 未发布的任务 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + LblQuestDescription - - $this + + 0 - + 0 True - - 7, 17 - - - PageQuest - - - GrasscutterTools.Pages.BasePage, GrasscutterTools, Version=1.13.0.0, Culture=neutral, PublicKeyToken=de2b1c089621e923 - \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageQuest.ru-RU.resx b/Source/GrasscutterTools/Pages/PageQuest.ru-RU.resx index e95b3c16..c9ae622d 100644 --- a/Source/GrasscutterTools/Pages/PageQuest.ru-RU.resx +++ b/Source/GrasscutterTools/Pages/PageQuest.ru-RU.resx @@ -151,4 +151,10 @@ Поэтому квест может быть добавлен или отозван через консоль, но завершён игроком - вряд ли. + + 167, 21 + + + Добавить и завершить + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageQuest.zh-TW.resx b/Source/GrasscutterTools/Pages/PageQuest.zh-TW.resx index 7bbaa786..8eb1c68b 100644 --- a/Source/GrasscutterTools/Pages/PageQuest.zh-TW.resx +++ b/Source/GrasscutterTools/Pages/PageQuest.zh-TW.resx @@ -141,4 +141,7 @@ 囙此任務可以接,可以完成,但是不一定可以做 + + 選中時添加並完成 + \ No newline at end of file