diff --git a/Source/GrasscutterTools/GrasscutterTools.csproj b/Source/GrasscutterTools/GrasscutterTools.csproj index 6ca821a..ffb2270 100644 --- a/Source/GrasscutterTools/GrasscutterTools.csproj +++ b/Source/GrasscutterTools/GrasscutterTools.csproj @@ -709,9 +709,18 @@ PageTools.cs + + PageWeather.cs + PageWeather.cs + + PageWeather.cs + + + PageWeather.cs + ResXFileCodeGenerator Resources.zh-TW.Designer.cs diff --git a/Source/GrasscutterTools/Pages/PageWeather.Designer.cs b/Source/GrasscutterTools/Pages/PageWeather.Designer.cs index 84e852b..2a54bf5 100644 --- a/Source/GrasscutterTools/Pages/PageWeather.Designer.cs +++ b/Source/GrasscutterTools/Pages/PageWeather.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PageWeather)); this.TvSceneWeathers = new System.Windows.Forms.TreeView(); this.LblPageTitle = new System.Windows.Forms.Label(); this.CmbClimateType = new System.Windows.Forms.ComboBox(); @@ -43,175 +44,122 @@ this.TxtWeatherFilter = new System.Windows.Forms.TextBox(); this.ListFilteredWeathers = new System.Windows.Forms.ListBox(); this.LblClearFilter = new System.Windows.Forms.Label(); + this.LnkCheckWeather = new System.Windows.Forms.LinkLabel(); this.SuspendLayout(); // // TvSceneWeathers // - this.TvSceneWeathers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + resources.ApplyResources(this.TvSceneWeathers, "TvSceneWeathers"); this.TvSceneWeathers.FullRowSelect = true; - this.TvSceneWeathers.Location = new System.Drawing.Point(343, 32); this.TvSceneWeathers.Name = "TvSceneWeathers"; this.TvSceneWeathers.ShowLines = false; - this.TvSceneWeathers.Size = new System.Drawing.Size(300, 204); - this.TvSceneWeathers.TabIndex = 102; this.TvSceneWeathers.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TvSceneWeathers_AfterSelect); // // LblPageTitle // - this.LblPageTitle.AutoSize = true; - this.LblPageTitle.Location = new System.Drawing.Point(3, 3); + resources.ApplyResources(this.LblPageTitle, "LblPageTitle"); this.LblPageTitle.Name = "LblPageTitle"; - this.LblPageTitle.Size = new System.Drawing.Size(56, 17); - this.LblPageTitle.TabIndex = 0; - this.LblPageTitle.Text = "场景天气"; // // CmbClimateType // + resources.ApplyResources(this.CmbClimateType, "CmbClimateType"); this.CmbClimateType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CmbClimateType.FormattingEnabled = true; - this.CmbClimateType.Location = new System.Drawing.Point(81, 33); this.CmbClimateType.Name = "CmbClimateType"; - this.CmbClimateType.Size = new System.Drawing.Size(121, 25); - this.CmbClimateType.TabIndex = 2; this.CmbClimateType.SelectedIndexChanged += new System.EventHandler(this.CmbClimateType_SelectedIndexChanged); // // LblClimateType // - this.LblClimateType.AutoSize = true; - this.LblClimateType.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.LblClimateType.Location = new System.Drawing.Point(19, 36); + resources.ApplyResources(this.LblClimateType, "LblClimateType"); this.LblClimateType.Name = "LblClimateType"; - this.LblClimateType.Size = new System.Drawing.Size(56, 17); - this.LblClimateType.TabIndex = 1; - this.LblClimateType.Text = "设置气候"; // // BtnLockWeather // - this.BtnLockWeather.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.BtnLockWeather.Location = new System.Drawing.Point(6, 211); + resources.ApplyResources(this.BtnLockWeather, "BtnLockWeather"); this.BtnLockWeather.Name = "BtnLockWeather"; - this.BtnLockWeather.Size = new System.Drawing.Size(150, 25); - this.BtnLockWeather.TabIndex = 10; this.BtnLockWeather.Tag = "on"; - this.BtnLockWeather.Text = "锁定天气"; this.BtnLockWeather.UseVisualStyleBackColor = true; this.BtnLockWeather.Click += new System.EventHandler(this.BtnLockWeather_Click); // // BtnUnlockWeather // - this.BtnUnlockWeather.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.BtnUnlockWeather.Location = new System.Drawing.Point(162, 211); + resources.ApplyResources(this.BtnUnlockWeather, "BtnUnlockWeather"); this.BtnUnlockWeather.Name = "BtnUnlockWeather"; - this.BtnUnlockWeather.Size = new System.Drawing.Size(150, 25); - this.BtnUnlockWeather.TabIndex = 11; this.BtnUnlockWeather.Tag = "off"; - this.BtnUnlockWeather.Text = "解锁天气"; this.BtnUnlockWeather.UseVisualStyleBackColor = true; this.BtnUnlockWeather.Click += new System.EventHandler(this.BtnLockWeather_Click); // // label1 // - this.label1.Location = new System.Drawing.Point(3, 78); + resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(334, 55); - this.label1.TabIndex = 4; - this.label1.Text = "天气数据目前暂未翻译,在此邀请你参与天气数据翻译,导出天气原始数据,在游戏内测试天气效果,修改数据文件通过提交更改按钮在 Github 创建 Pull Reque" + - "st,即可参与贡献!"; // // BtnExportWeather // - this.BtnExportWeather.Location = new System.Drawing.Point(3, 136); + resources.ApplyResources(this.BtnExportWeather, "BtnExportWeather"); this.BtnExportWeather.Name = "BtnExportWeather"; - this.BtnExportWeather.Size = new System.Drawing.Size(150, 25); - this.BtnExportWeather.TabIndex = 5; - this.BtnExportWeather.Text = "导出原始天气"; this.BtnExportWeather.UseVisualStyleBackColor = true; this.BtnExportWeather.Click += new System.EventHandler(this.BtnExportWeather_Click); // // BtnImportWeather // - this.BtnImportWeather.Location = new System.Drawing.Point(159, 136); + resources.ApplyResources(this.BtnImportWeather, "BtnImportWeather"); this.BtnImportWeather.Name = "BtnImportWeather"; - this.BtnImportWeather.Size = new System.Drawing.Size(150, 25); - this.BtnImportWeather.TabIndex = 6; - this.BtnImportWeather.Text = "导入天气"; this.BtnImportWeather.UseVisualStyleBackColor = true; this.BtnImportWeather.Click += new System.EventHandler(this.BtnImportWeather_Click); // // BtnCreatePullRequest // - this.BtnCreatePullRequest.Location = new System.Drawing.Point(3, 167); + resources.ApplyResources(this.BtnCreatePullRequest, "BtnCreatePullRequest"); this.BtnCreatePullRequest.Name = "BtnCreatePullRequest"; - this.BtnCreatePullRequest.Size = new System.Drawing.Size(150, 25); - this.BtnCreatePullRequest.TabIndex = 7; - this.BtnCreatePullRequest.Text = "提交修改 (Github)"; this.BtnCreatePullRequest.UseVisualStyleBackColor = true; this.BtnCreatePullRequest.Click += new System.EventHandler(this.BtnCreatePullRequest_Click); // // LblPullRequestTip // - this.LblPullRequestTip.AutoSize = true; + resources.ApplyResources(this.LblPullRequestTip, "LblPullRequestTip"); this.LblPullRequestTip.ForeColor = System.Drawing.SystemColors.GrayText; - this.LblPullRequestTip.Location = new System.Drawing.Point(156, 171); this.LblPullRequestTip.Name = "LblPullRequestTip"; - this.LblPullRequestTip.Size = new System.Drawing.Size(128, 17); - this.LblPullRequestTip.TabIndex = 8; - this.LblPullRequestTip.Text = "你也可以提交到群文件"; // // LblClimateTip // - this.LblClimateTip.AutoSize = true; + resources.ApplyResources(this.LblClimateTip, "LblClimateTip"); this.LblClimateTip.ForeColor = System.Drawing.SystemColors.GrayText; - this.LblClimateTip.Location = new System.Drawing.Point(208, 36); this.LblClimateTip.Name = "LblClimateTip"; - this.LblClimateTip.Size = new System.Drawing.Size(104, 17); - this.LblClimateTip.TabIndex = 3; - this.LblClimateTip.Text = "天气包含默认气候"; // // TxtWeatherFilter // - this.TxtWeatherFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TxtWeatherFilter.Location = new System.Drawing.Point(343, 3); + resources.ApplyResources(this.TxtWeatherFilter, "TxtWeatherFilter"); this.TxtWeatherFilter.Name = "TxtWeatherFilter"; - this.TxtWeatherFilter.Size = new System.Drawing.Size(300, 23); - this.TxtWeatherFilter.TabIndex = 100; this.TxtWeatherFilter.TextChanged += new System.EventHandler(this.TxtWeatherFilter_TextChanged); // // ListFilteredWeathers // - this.ListFilteredWeathers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + resources.ApplyResources(this.ListFilteredWeathers, "ListFilteredWeathers"); this.ListFilteredWeathers.FormattingEnabled = true; - this.ListFilteredWeathers.ItemHeight = 17; - this.ListFilteredWeathers.Location = new System.Drawing.Point(343, 26); this.ListFilteredWeathers.Name = "ListFilteredWeathers"; - this.ListFilteredWeathers.Size = new System.Drawing.Size(300, 191); - this.ListFilteredWeathers.TabIndex = 101; - this.ListFilteredWeathers.Visible = false; this.ListFilteredWeathers.SelectedIndexChanged += new System.EventHandler(this.ListFilteredWeathers_SelectedIndexChanged); // // LblClearFilter // - this.LblClearFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.LblClearFilter.AutoSize = true; + resources.ApplyResources(this.LblClearFilter, "LblClearFilter"); this.LblClearFilter.BackColor = System.Drawing.Color.White; this.LblClearFilter.Cursor = System.Windows.Forms.Cursors.Hand; - this.LblClearFilter.Location = new System.Drawing.Point(626, 6); this.LblClearFilter.Name = "LblClearFilter"; - this.LblClearFilter.Size = new System.Drawing.Size(16, 17); - this.LblClearFilter.TabIndex = 103; - this.LblClearFilter.Text = "X"; - this.LblClearFilter.Visible = false; this.LblClearFilter.Click += new System.EventHandler(this.LblClearFilter_Click); // + // LnkCheckWeather + // + resources.ApplyResources(this.LnkCheckWeather, "LnkCheckWeather"); + this.LnkCheckWeather.Name = "LnkCheckWeather"; + this.LnkCheckWeather.TabStop = true; + this.LnkCheckWeather.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LnkCheckWeather_LinkClicked); + // // PageWeather // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.LnkCheckWeather); this.Controls.Add(this.LblClearFilter); this.Controls.Add(this.ListFilteredWeathers); this.Controls.Add(this.TxtWeatherFilter); @@ -250,5 +198,6 @@ private System.Windows.Forms.TextBox TxtWeatherFilter; private System.Windows.Forms.ListBox ListFilteredWeathers; private System.Windows.Forms.Label LblClearFilter; + private System.Windows.Forms.LinkLabel LnkCheckWeather; } } diff --git a/Source/GrasscutterTools/Pages/PageWeather.cs b/Source/GrasscutterTools/Pages/PageWeather.cs index a127760..3263017 100644 --- a/Source/GrasscutterTools/Pages/PageWeather.cs +++ b/Source/GrasscutterTools/Pages/PageWeather.cs @@ -197,5 +197,13 @@ namespace GrasscutterTools.Pages // 生成命令 SetCommand("/weather", item.Substring(0, item.IndexOf(':')).Trim()); } + + /// + /// 点击获取当前天气命令时触发 + /// + private void LnkCheckWeather_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + SetCommand("/weather"); + } } } \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageWeather.en-US.resx b/Source/GrasscutterTools/Pages/PageWeather.en-US.resx new file mode 100644 index 0000000..8b1b456 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageWeather.en-US.resx @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 57, 17 + + + Weather + + + 51, 17 + + + Climate + + + Lock weather + + + Unlock weather + + + 108, 34 + + + Weather includes +default climate + + + 90, 17 + + + Check Current + + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageWeather.resx b/Source/GrasscutterTools/Pages/PageWeather.resx index 1af7de1..d3f7e2d 100644 --- a/Source/GrasscutterTools/Pages/PageWeather.resx +++ b/Source/GrasscutterTools/Pages/PageWeather.resx @@ -117,4 +117,454 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 + + + + 162, 211 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + + + + False + + + 导出原始天气 + + + 128, 17 + + + 你也可以提交到群文件 + + + 3, 3 + + + $this + + + + Bottom, Left + + + 8 + + + $this + + + LblPullRequestTip + + + 343, 3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top, Bottom, Left, Right + + + 343, 26 + + + label1 + + + False + + + $this + + + $this + + + 19, 36 + + + 156, 171 + + + X + + + 0 + + + LblClimateTip + + + 16, 17 + + + 300, 23 + + + False + + + TvSceneWeathers + + + 8 + + + GrasscutterTools.Pages.BasePage, GrasscutterTools, Version=1.13.0.0, Culture=neutral, PublicKeyToken=de2b1c089621e923 + + + 天气数据目前暂未翻译,在此邀请你参与天气数据翻译,导出天气原始数据,在游戏内测试天气效果,修改数据文件通过提交更改按钮在 Github 创建 Pull Request,即可参与贡献! + + + 获取当前天气 + + + PageWeather + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 300, 204 + + + 159, 136 + + + 0 + + + 锁定天气 + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6 + + + True + + + 7 + + + 150, 25 + + + True + + + Top, Bottom, Left, Right + + + 103 + + + 3, 78 + + + 150, 25 + + + 334, 55 + + + BtnLockWeather + + + False + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + 300, 191 + + + 2 + + + 10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 提交修改 (Github) + + + LblClearFilter + + + False + + + 102 + + + 2 + + + TxtWeatherFilter + + + 7 + + + False + + + 设置气候 + + + 101 + + + 78, 3 + + + 7, 17 + + + 1 + + + 121, 25 + + + 626, 6 + + + $this + + + 17 + + + BtnCreatePullRequest + + + Top, Left, Right + + + True + + + $this + + + False + + + 4 + + + 80, 17 + + + True + + + $this + + + LblPageTitle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 9 + + + 15 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Bottom, Left + + + 4 + + + 3 + + + $this + + + 56, 17 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 5 + + + $this + + + $this + + + 6, 211 + + + 3, 167 + + + 150, 25 + + + 56, 17 + + + 11 + + + True + + + BtnExportWeather + + + 1 + + + System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 13 + + + 导入天气 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + BtnUnlockWeather + + + 104, 17 + + + 343, 32 + + + LnkCheckWeather + + + CmbClimateType + + + 11 + + + 3, 136 + + + NoControl + + + 81, 33 + + + $this + + + 208, 36 + + + $this + + + 150, 25 + + + ListFilteredWeathers + + + 6 + + + $this + + + 天气包含默认气候 + + + 100 + + + 150, 25 + + + BtnImportWeather + + + LblClimateType + + + Top, Right + + + 场景天气 + + + 10 + + + $this + + + 解锁天气 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 14 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + True + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageWeather.ru-RU.resx b/Source/GrasscutterTools/Pages/PageWeather.ru-RU.resx new file mode 100644 index 0000000..39694b5 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageWeather.ru-RU.resx @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 52, 17 + + + Погода + + + 52, 17 + + + Климат + + + Заблокировать + + + Разблокировать + + + 138, 34 + + + Погода содержит кл- +имат по умолчанию  + + + 177, 17 + + + Проверьте текущую погоду + + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageWeather.zh-TW.resx b/Source/GrasscutterTools/Pages/PageWeather.zh-TW.resx new file mode 100644 index 0000000..1aa6f82 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageWeather.zh-TW.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 場景天氣 + + + 設定氣候 + + + 鎖定天氣 + + + 解鎖天氣 + + + 天氣包含默認氣候 + + + 獲取當前天氣 + + \ No newline at end of file