diff --git a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs index 9b88dad..61af2d6 100644 --- a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs +++ b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.Designer.cs @@ -31,11 +31,11 @@ namespace GrasscutterTools.Forms { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormGachaBannerEditor2)); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea5 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series17 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series18 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series19 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.Series series20 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series(); this.GrpBannerValues = new System.Windows.Forms.GroupBox(); this.DTPEndTime = new System.Windows.Forms.DateTimePicker(); this.DTPBeginTime = new System.Windows.Forms.DateTimePicker(); @@ -420,28 +420,28 @@ namespace GrasscutterTools.Forms // // ChartWeights // - chartArea5.AxisX.MajorGrid.LineColor = System.Drawing.Color.Gainsboro; - chartArea5.AxisY.MajorGrid.LineColor = System.Drawing.Color.Gainsboro; - chartArea5.Name = "ChartArea1"; - this.ChartWeights.ChartAreas.Add(chartArea5); + chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.Gainsboro; + chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Gainsboro; + chartArea1.Name = "ChartArea1"; + this.ChartWeights.ChartAreas.Add(chartArea1); resources.ApplyResources(this.ChartWeights, "ChartWeights"); this.ChartWeights.Name = "ChartWeights"; - series17.ChartArea = "ChartArea1"; - series17.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series17.Name = "SeriesWeight5"; - series18.ChartArea = "ChartArea1"; - series18.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series18.Name = "SeriesWeight4"; - series19.ChartArea = "ChartArea1"; - series19.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series19.Name = "SeriesPoolBalanceWeight5"; - series20.ChartArea = "ChartArea1"; - series20.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; - series20.Name = "SeriesPoolBalanceWeight4"; - this.ChartWeights.Series.Add(series17); - this.ChartWeights.Series.Add(series18); - this.ChartWeights.Series.Add(series19); - this.ChartWeights.Series.Add(series20); + series1.ChartArea = "ChartArea1"; + series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series1.Name = "SeriesWeight5"; + series2.ChartArea = "ChartArea1"; + series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series2.Name = "SeriesWeight4"; + series3.ChartArea = "ChartArea1"; + series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series3.Name = "SeriesPoolWeight5"; + series4.ChartArea = "ChartArea1"; + series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; + series4.Name = "SeriesPoolWeight4"; + this.ChartWeights.Series.Add(series1); + this.ChartWeights.Series.Add(series2); + this.ChartWeights.Series.Add(series3); + this.ChartWeights.Series.Add(series4); // // GrpWeights // diff --git a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs index ab9f72e..0d593e2 100644 --- a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs +++ b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.cs @@ -23,6 +23,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using System.Windows.Forms.DataVisualization.Charting; using GrasscutterTools.Game; using GrasscutterTools.Game.Gacha; @@ -158,20 +159,43 @@ namespace GrasscutterTools.Forms #region - 权重 - + Series SeriesW5; + Series SeriesW4; + Series SeriesPW5; + Series SeriesPW4; + private void InitWeights(GachaBanner2 banner) { var w5 = ListBannerWeights.Groups["GroupWeight5"]; var w4 = ListBannerWeights.Groups["GroupWeight4"]; var pw5 = ListBannerWeights.Groups["GroupPoolWeight5"]; var pw4 = ListBannerWeights.Groups["GroupPoolWeight4"]; - var t = SelectWeights(banner.Weights5).Select(it => new ListViewItem(it, w5)) - .Concat(SelectWeights(banner.Weights4).Select(it => new ListViewItem(it, w4))) - .Concat(SelectWeights(banner.PoolBalanceWeights5).Select(it => new ListViewItem(it, pw5))) - .Concat(SelectWeights(banner.PoolBalanceWeights4).Select(it => new ListViewItem(it, pw4))); + SeriesW5 = ChartWeights.Series["SeriesWeight5"]; + SeriesW5.Color = Color.OrangeRed; + SeriesW5.Points.Clear(); + SeriesW4 = ChartWeights.Series["SeriesWeight4"]; + SeriesW4.Color = Color.Purple; + SeriesW4.Points.Clear(); + SeriesPW5 = ChartWeights.Series["SeriesPoolWeight5"]; + SeriesPW5.Color = Color.Orange; + SeriesPW5.Points.Clear(); + SeriesPW4 = ChartWeights.Series["SeriesPoolWeight4"]; + SeriesPW4.Color = Color.MediumPurple; + SeriesPW4.Points.Clear(); + var t = SelectWeights(banner.Weights5).Select(it => new ListViewItem(it, w5) { ForeColor = SeriesW5.Color }) + .Concat(SelectWeights(banner.Weights4).Select(it => new ListViewItem(it, w4) { ForeColor = SeriesW4.Color })) + .Concat(SelectWeights(banner.PoolBalanceWeights5).Select(it => new ListViewItem(it, pw5) { ForeColor = SeriesPW5.Color })) + .Concat(SelectWeights(banner.PoolBalanceWeights4).Select(it => new ListViewItem(it, pw4) { ForeColor = SeriesPW4.Color })); ListBannerWeights.BeginUpdate(); ListBannerWeights.Items.Clear(); ListBannerWeights.Items.AddRange(t.ToArray()); ListBannerWeights.EndUpdate(); + UpdateChart(); + } + + private void UpdateChart() + { + // TODO } private IEnumerable SelectWeights(int[,] weights) diff --git a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx index c6168c3..1f8af00 100644 --- a/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx +++ b/Source/GrasscutterTools/Forms/FormGachaBannerEditor2.resx @@ -117,350 +117,14 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - DTPEndTime - - - System.Windows.Forms.DateTimePicker, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 0 - - - DTPBeginTime - - - System.Windows.Forms.DateTimePicker, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 1 - - - CmbPrefab - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 2 - - - LblEventChance4Tip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 3 - - - LblEventChance5Tip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 4 - - - NUDEventChance4 - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 5 - - - NUDEventChance5 - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 6 - - - LblGachaType - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 7 - - - LblEventChance4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 8 - - - LblEventChance5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 9 - - - LblSortId - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 10 - - - NUDGachaType - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 11 - - - NUDSortId - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 12 - - - LblGachaTypeTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 13 - - - LblEndTime - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 14 - - - LblScheduleId - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 15 - - - LblBeginTime - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 16 - - - NUDScheduleId - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 17 - - - LblScheduleIdTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 18 - - - CmbBannerType - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 19 - - - LblSortIdTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 20 - - - LblBannerType - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 21 - - - RbCostItem224 - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 22 - - - LblCostItem - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 23 - - - LblPrefabPath - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 24 - - - RbCostItem223 - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpBannerValues - - - 25 - - - 12, 12 - - - 440, 268 - - - - 44 - - - 卡池参数 - - - GrpBannerValues - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - 302, 173 110, 23 + 7 @@ -1119,44 +783,44 @@ 25 + + 12, 12 + + + 440, 268 + + + 44 + + + 卡池参数 + + + GrpBannerValues + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + Top, Bottom, Left, Right - - ListFallbackItems + + ID - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 65 - - GrpPurplePool + + Name - - 0 - - - 458, 248 - - - 210, 305 - - - 50 - - - 基础池 - - - GrpPurplePool - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 + + 110 Fill @@ -1242,56 +906,44 @@ 0 - - ID + + 458, 248 - - 65 + + 210, 305 - - Name + + 50 - - 110 + + 基础池 + + + GrpPurplePool + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 Top, Left, Right - - ListUpItems + + ID - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 65 - - GrpYellowPool + + Name - - 0 - - - 458, 12 - - - 210, 230 - - - 49 - - - UP池 - - - GrpYellowPool - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 + + 110 Fill @@ -1357,81 +1009,33 @@ 0 - - ID + + 458, 12 - - 65 + + 210, 230 - - Name + + 49 - - 110 + + UP池 + + + GrpYellowPool + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 Top, Bottom, Right - - BtnGen - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpJson - - - 0 - - - TxtJson - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpJson - - - 1 - - - BtnParse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GrpJson - - - 2 - - - 674, 12 - - - 300, 541 - - - 51 - - - Json - - - GrpJson - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - Bottom, Left @@ -1516,6 +1120,30 @@ 2 + + 674, 12 + + + 300, 541 + + + 51 + + + Json + + + GrpJson + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + 162, 22 @@ -1553,25 +1181,25 @@ 17, 17 - 180, 22 + 112, 22 编辑点 - 180, 22 + 112, 22 添加点 - 180, 22 + 112, 22 移除点 - 181, 92 + 113, 70 MenuCUD