diff --git a/Source/GrasscutterTools/App.config b/Source/GrasscutterTools/App.config index 838b4d3..9b49c11 100644 --- a/Source/GrasscutterTools/App.config +++ b/Source/GrasscutterTools/App.config @@ -49,6 +49,9 @@ GrasscutterTools + + + \ No newline at end of file diff --git a/Source/GrasscutterTools/Forms/FormMain.Designer.cs b/Source/GrasscutterTools/Forms/FormMain.Designer.cs index d9c17e9..f894a59 100644 --- a/Source/GrasscutterTools/Forms/FormMain.Designer.cs +++ b/Source/GrasscutterTools/Forms/FormMain.Designer.cs @@ -266,6 +266,7 @@ namespace GrasscutterTools.Forms this.LblMailTitleLabel = new System.Windows.Forms.Label(); this.TxtMailSender = new System.Windows.Forms.TextBox(); this.LblMailSenderLabel = new System.Windows.Forms.Label(); + this.BtnOpenShopEditor = new System.Windows.Forms.Button(); this.GrpCommand.SuspendLayout(); this.TPRemoteCall.SuspendLayout(); this.GrpServerStatus.SuspendLayout(); @@ -2004,6 +2005,7 @@ namespace GrasscutterTools.Forms // // TPHome // + this.TPHome.Controls.Add(this.BtnOpenShopEditor); this.TPHome.Controls.Add(this.BtnOpenDropEditor); this.TPHome.Controls.Add(this.LnkNewVersion); this.TPHome.Controls.Add(this.LblAbout); @@ -2394,6 +2396,13 @@ namespace GrasscutterTools.Forms resources.ApplyResources(this.LblMailSenderLabel, "LblMailSenderLabel"); this.LblMailSenderLabel.Name = "LblMailSenderLabel"; // + // BtnOpenShopEditor + // + resources.ApplyResources(this.BtnOpenShopEditor, "BtnOpenShopEditor"); + this.BtnOpenShopEditor.Name = "BtnOpenShopEditor"; + this.BtnOpenShopEditor.UseVisualStyleBackColor = true; + this.BtnOpenShopEditor.Click += new System.EventHandler(this.BtnOpenShopEditor_Click); + // // FormMain // resources.ApplyResources(this, "$this"); @@ -2743,5 +2752,6 @@ namespace GrasscutterTools.Forms private System.Windows.Forms.LinkLabel LnkSetConst; private System.Windows.Forms.NumericUpDown NUDSetConstellation; private System.Windows.Forms.FlowLayoutPanel FLPEntityType; + private System.Windows.Forms.Button BtnOpenShopEditor; } } diff --git a/Source/GrasscutterTools/Forms/FormMain.cs b/Source/GrasscutterTools/Forms/FormMain.cs index b008a9c..00c2078 100644 --- a/Source/GrasscutterTools/Forms/FormMain.cs +++ b/Source/GrasscutterTools/Forms/FormMain.cs @@ -65,6 +65,7 @@ namespace GrasscutterTools.Forms Text += " - by jie65535 - v" + AppVersion.ToString(3); #if DEBUG Text += "-debug"; + //Text += "-debug -攻击修改特供版"; #endif GameData.LoadResources(); @@ -295,6 +296,27 @@ namespace GrasscutterTools.Forms } } + /// + /// 商店编辑器窗口实例 + /// + private FormShopEditor ShopEditor; + + /// + /// 点击打开商店编辑器时触发 + /// + private void BtnOpenShopEditor_Click(object sender, EventArgs e) + { + if (ShopEditor == null || ShopEditor.IsDisposed) + { + ShopEditor = new FormShopEditor(); + ShopEditor.Show(); + } + else + { + ToTop(ShopEditor); + } + } + /// /// 语言选中项改变时触发 /// @@ -1184,6 +1206,11 @@ namespace GrasscutterTools.Forms if (!string.IsNullOrEmpty(selectedItem)) { var id = ItemMap.ToId(selectedItem); + + //// 自定义攻击Gadget特供版 + //SetCommand("/at", $"set n {id}"); + //return true; + if (Check(CommandVersion.V1_3_1)) SetCommand("/spawn", $"{id} x{NUDEntityAmout.Value} lv{NUDEntityLevel.Value}" + (ChkInfiniteHP.Checked ? " hp0" : "")); else diff --git a/Source/GrasscutterTools/Forms/FormMain.resx b/Source/GrasscutterTools/Forms/FormMain.resx index a966609..ca3f1d7 100644 --- a/Source/GrasscutterTools/Forms/FormMain.resx +++ b/Source/GrasscutterTools/Forms/FormMain.resx @@ -5468,6 +5468,30 @@ 1 + + 313, 187 + + + 100, 23 + + + 11 + + + 商店编辑器 + + + BtnOpenShopEditor + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TPHome + + + 0 + Bottom, Right @@ -5496,7 +5520,7 @@ TPHome - 0 + 1 Bottom, Left @@ -5532,7 +5556,7 @@ TPHome - 1 + 2 Left @@ -5568,7 +5592,7 @@ TPHome - 2 + 3 Bottom, Right @@ -5598,7 +5622,7 @@ TPHome - 3 + 4 Bottom, Right @@ -5628,7 +5652,7 @@ TPHome - 4 + 5 Top, Bottom, Left, Right @@ -5658,7 +5682,7 @@ TPHome - 5 + 6 Bottom, Left @@ -5898,7 +5922,7 @@ TPHome - 6 + 7 4, 26 diff --git a/Source/GrasscutterTools/Forms/FormShopEditor.Designer.cs b/Source/GrasscutterTools/Forms/FormShopEditor.Designer.cs index 2eb8be5..cae9de4 100644 --- a/Source/GrasscutterTools/Forms/FormShopEditor.Designer.cs +++ b/Source/GrasscutterTools/Forms/FormShopEditor.Designer.cs @@ -35,74 +35,75 @@ this.GrpGoodsList = new System.Windows.Forms.GroupBox(); this.GrpItems = new System.Windows.Forms.GroupBox(); this.GrpGoodsInfo = new System.Windows.Forms.GroupBox(); - this.numericUpDown11 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown10 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown9 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown8 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown7 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown6 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown5 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown4 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.BtnSaveGoods = new System.Windows.Forms.Button(); + this.CmbRefreshType = new System.Windows.Forms.ComboBox(); + this.NUDRefreshParm = new System.Windows.Forms.NumericUpDown(); + this.DTPEndTime = new System.Windows.Forms.DateTimePicker(); + this.DTPBeginTime = new System.Windows.Forms.DateTimePicker(); + this.NUDGoodsId = new System.Windows.Forms.NumericUpDown(); + this.NUDMaxLevel = new System.Windows.Forms.NumericUpDown(); + this.NUDMinLevel = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem4 = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem3 = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem2 = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem1 = new System.Windows.Forms.NumericUpDown(); + this.NUDCostMcoin = new System.Windows.Forms.NumericUpDown(); + this.NUDCostScoin = new System.Windows.Forms.NumericUpDown(); + this.NUDCostHcoin = new System.Windows.Forms.NumericUpDown(); + this.NUDBuyLimit = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem4Count = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem3Count = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem2Count = new System.Windows.Forms.NumericUpDown(); + this.NUDCostItem1Count = new System.Windows.Forms.NumericUpDown(); + this.NUDGoodsItemCount = new System.Windows.Forms.NumericUpDown(); + this.TxtGoodsItem = new System.Windows.Forms.TextBox(); + this.LblRefreshModeLabel = new System.Windows.Forms.Label(); + this.LblBuyLevelLabel = new System.Windows.Forms.Label(); + this.LblEndTimeLabel = new System.Windows.Forms.Label(); + this.LblBeginTimeLabel = new System.Windows.Forms.Label(); + this.LblCostItem4Label = new System.Windows.Forms.Label(); + this.LblCostItem3Label = new System.Windows.Forms.Label(); + this.LblCostItem2Label = new System.Windows.Forms.Label(); + this.LblCostItem1Label = new System.Windows.Forms.Label(); + this.LblCostMcoinLabel = new System.Windows.Forms.Label(); + this.LblCostScoinLabel = new System.Windows.Forms.Label(); + this.LblCostHcoinLabel = new System.Windows.Forms.Label(); + this.LblBuyLimitLabel = new System.Windows.Forms.Label(); + this.LblGoodsIdLabel = new System.Windows.Forms.Label(); + this.LblGoodsItemLabel = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.LnkGenGoodsId = new System.Windows.Forms.LinkLabel(); + this.label18 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.LblItemLabel = new System.Windows.Forms.Label(); this.BtnSave = new System.Windows.Forms.Button(); this.BtnLoad = new System.Windows.Forms.Button(); this.TxtShopJsonPath = new System.Windows.Forms.TextBox(); this.LblShopPathLabel = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.NUDGoodsId = new System.Windows.Forms.NumericUpDown(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.numericUpDown12 = new System.Windows.Forms.NumericUpDown(); - this.label12 = new System.Windows.Forms.Label(); - this.numericUpDown13 = new System.Windows.Forms.NumericUpDown(); - this.label13 = new System.Windows.Forms.Label(); - this.numericUpDown14 = new System.Windows.Forms.NumericUpDown(); - this.label14 = new System.Windows.Forms.Label(); - this.numericUpDown15 = new System.Windows.Forms.NumericUpDown(); - this.label15 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.DTPBeginTime = new System.Windows.Forms.DateTimePicker(); - this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker(); - this.label17 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.label19 = new System.Windows.Forms.Label(); - this.NUDRefreshParm = new System.Windows.Forms.NumericUpDown(); - this.CmdRefreshType = new System.Windows.Forms.ComboBox(); - this.BtnSaveGoods = new System.Windows.Forms.Button(); + this.TxtItemFilter = new System.Windows.Forms.TextBox(); this.GrpShopList.SuspendLayout(); this.GrpGoodsList.SuspendLayout(); this.GrpItems.SuspendLayout(); this.GrpGoodsInfo.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown10)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown9)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUDGoodsId)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown12)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown13)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown14)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown15)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDRefreshParm)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDGoodsId)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDMaxLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDMinLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostMcoin)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostScoin)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostHcoin)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDBuyLimit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem4Count)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem3Count)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem2Count)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem1Count)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDGoodsItemCount)).BeginInit(); this.SuspendLayout(); // // ListShop @@ -114,6 +115,7 @@ this.ListShop.Name = "ListShop"; this.ListShop.Size = new System.Drawing.Size(244, 169); this.ListShop.TabIndex = 0; + this.ListShop.SelectedIndexChanged += new System.EventHandler(this.ListShop_SelectedIndexChanged); // // ListGoods // @@ -124,16 +126,20 @@ this.ListGoods.Name = "ListGoods"; this.ListGoods.Size = new System.Drawing.Size(244, 289); this.ListGoods.TabIndex = 1; + this.ListGoods.SelectedIndexChanged += new System.EventHandler(this.ListGoods_SelectedIndexChanged); // // ListItems // - this.ListItems.Dock = System.Windows.Forms.DockStyle.Fill; + this.ListItems.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))); this.ListItems.FormattingEnabled = true; this.ListItems.ItemHeight = 17; - this.ListItems.Location = new System.Drawing.Point(3, 19); + this.ListItems.Location = new System.Drawing.Point(6, 51); this.ListItems.Name = "ListItems"; - this.ListItems.Size = new System.Drawing.Size(244, 486); + this.ListItems.Size = new System.Drawing.Size(238, 446); this.ListItems.TabIndex = 2; + this.ListItems.SelectedIndexChanged += new System.EventHandler(this.ListItems_SelectedIndexChanged); // // GrpShopList // @@ -161,8 +167,9 @@ // this.GrpItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); + this.GrpItems.Controls.Add(this.TxtItemFilter); this.GrpItems.Controls.Add(this.ListItems); - this.GrpItems.Location = new System.Drawing.Point(577, 41); + this.GrpItems.Location = new System.Drawing.Point(622, 41); this.GrpItems.Name = "GrpItems"; this.GrpItems.Size = new System.Drawing.Size(250, 508); this.GrpItems.TabIndex = 6; @@ -175,242 +182,573 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.GrpGoodsInfo.Controls.Add(this.BtnSaveGoods); - this.GrpGoodsInfo.Controls.Add(this.CmdRefreshType); + this.GrpGoodsInfo.Controls.Add(this.CmbRefreshType); this.GrpGoodsInfo.Controls.Add(this.NUDRefreshParm); - this.GrpGoodsInfo.Controls.Add(this.label19); - this.GrpGoodsInfo.Controls.Add(this.linkLabel1); - this.GrpGoodsInfo.Controls.Add(this.label18); - this.GrpGoodsInfo.Controls.Add(this.label17); - this.GrpGoodsInfo.Controls.Add(this.label16); - this.GrpGoodsInfo.Controls.Add(this.label15); - this.GrpGoodsInfo.Controls.Add(this.label10); - this.GrpGoodsInfo.Controls.Add(this.label9); - this.GrpGoodsInfo.Controls.Add(this.label8); - this.GrpGoodsInfo.Controls.Add(this.label7); - this.GrpGoodsInfo.Controls.Add(this.label6); - this.GrpGoodsInfo.Controls.Add(this.label5); - this.GrpGoodsInfo.Controls.Add(this.label4); - this.GrpGoodsInfo.Controls.Add(this.label3); - this.GrpGoodsInfo.Controls.Add(this.label2); - this.GrpGoodsInfo.Controls.Add(this.LblItemLabel); - this.GrpGoodsInfo.Controls.Add(this.dateTimePicker2); + this.GrpGoodsInfo.Controls.Add(this.DTPEndTime); this.GrpGoodsInfo.Controls.Add(this.DTPBeginTime); this.GrpGoodsInfo.Controls.Add(this.NUDGoodsId); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown11); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown10); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown9); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown8); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown7); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown6); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown5); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown4); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown3); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown2); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown15); - this.GrpGoodsInfo.Controls.Add(this.label14); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown14); + this.GrpGoodsInfo.Controls.Add(this.NUDMaxLevel); + this.GrpGoodsInfo.Controls.Add(this.NUDMinLevel); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem4); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem3); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem2); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem1); + this.GrpGoodsInfo.Controls.Add(this.NUDCostMcoin); + this.GrpGoodsInfo.Controls.Add(this.NUDCostScoin); + this.GrpGoodsInfo.Controls.Add(this.NUDCostHcoin); + this.GrpGoodsInfo.Controls.Add(this.NUDBuyLimit); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem4Count); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem3Count); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem2Count); + this.GrpGoodsInfo.Controls.Add(this.NUDCostItem1Count); + this.GrpGoodsInfo.Controls.Add(this.NUDGoodsItemCount); + this.GrpGoodsInfo.Controls.Add(this.TxtGoodsItem); + this.GrpGoodsInfo.Controls.Add(this.LblRefreshModeLabel); + this.GrpGoodsInfo.Controls.Add(this.LblBuyLevelLabel); + this.GrpGoodsInfo.Controls.Add(this.LblEndTimeLabel); + this.GrpGoodsInfo.Controls.Add(this.LblBeginTimeLabel); + this.GrpGoodsInfo.Controls.Add(this.LblCostItem4Label); + this.GrpGoodsInfo.Controls.Add(this.LblCostItem3Label); + this.GrpGoodsInfo.Controls.Add(this.LblCostItem2Label); + this.GrpGoodsInfo.Controls.Add(this.LblCostItem1Label); + this.GrpGoodsInfo.Controls.Add(this.LblCostMcoinLabel); + this.GrpGoodsInfo.Controls.Add(this.LblCostScoinLabel); + this.GrpGoodsInfo.Controls.Add(this.LblCostHcoinLabel); + this.GrpGoodsInfo.Controls.Add(this.LblBuyLimitLabel); + this.GrpGoodsInfo.Controls.Add(this.LblGoodsIdLabel); + this.GrpGoodsInfo.Controls.Add(this.LblGoodsItemLabel); this.GrpGoodsInfo.Controls.Add(this.label13); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown13); this.GrpGoodsInfo.Controls.Add(this.label12); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown12); this.GrpGoodsInfo.Controls.Add(this.label11); - this.GrpGoodsInfo.Controls.Add(this.numericUpDown1); + this.GrpGoodsInfo.Controls.Add(this.label14); + this.GrpGoodsInfo.Controls.Add(this.LnkGenGoodsId); + this.GrpGoodsInfo.Controls.Add(this.label18); this.GrpGoodsInfo.Controls.Add(this.label1); - this.GrpGoodsInfo.Controls.Add(this.textBox1); this.GrpGoodsInfo.Location = new System.Drawing.Point(268, 41); this.GrpGoodsInfo.Name = "GrpGoodsInfo"; - this.GrpGoodsInfo.Size = new System.Drawing.Size(303, 508); + this.GrpGoodsInfo.Size = new System.Drawing.Size(348, 508); this.GrpGoodsInfo.TabIndex = 5; this.GrpGoodsInfo.TabStop = false; this.GrpGoodsInfo.Text = "商品信息"; // - // numericUpDown11 + // BtnSaveGoods // - this.numericUpDown11.Location = new System.Drawing.Point(185, 122); - this.numericUpDown11.Maximum = new decimal(new int[] { + this.BtnSaveGoods.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.BtnSaveGoods.Location = new System.Drawing.Point(114, 472); + this.BtnSaveGoods.Name = "BtnSaveGoods"; + this.BtnSaveGoods.Size = new System.Drawing.Size(120, 30); + this.BtnSaveGoods.TabIndex = 30; + this.BtnSaveGoods.Text = "√ 保存"; + this.BtnSaveGoods.UseVisualStyleBackColor = true; + this.BtnSaveGoods.Click += new System.EventHandler(this.BtnSaveGoods_Click); + // + // CmbRefreshType + // + this.CmbRefreshType.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.CmbRefreshType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CmbRefreshType.FormattingEnabled = true; + this.CmbRefreshType.Items.AddRange(new object[] { + "无", + "天", + "周", + "月"}); + this.CmbRefreshType.Location = new System.Drawing.Point(175, 207); + this.CmbRefreshType.Name = "CmbRefreshType"; + this.CmbRefreshType.Size = new System.Drawing.Size(104, 25); + this.CmbRefreshType.TabIndex = 10; + this.CmbRefreshType.SelectedIndexChanged += new System.EventHandler(this.CmbRefreshType_SelectedIndexChanged); + // + // NUDRefreshParm + // + this.NUDRefreshParm.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDRefreshParm.Location = new System.Drawing.Point(119, 209); + this.NUDRefreshParm.Name = "NUDRefreshParm"; + this.NUDRefreshParm.Size = new System.Drawing.Size(50, 23); + this.NUDRefreshParm.TabIndex = 9; + // + // DTPEndTime + // + this.DTPEndTime.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.DTPEndTime.CustomFormat = "yyyy\'/\'MM\'/\'dd HH\':\'mm\':\'ss"; + this.DTPEndTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.DTPEndTime.Location = new System.Drawing.Point(119, 180); + this.DTPEndTime.Name = "DTPEndTime"; + this.DTPEndTime.Size = new System.Drawing.Size(160, 23); + this.DTPEndTime.TabIndex = 8; + // + // DTPBeginTime + // + this.DTPBeginTime.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.DTPBeginTime.CustomFormat = "yyyy\'/\'MM\'/\'dd HH\':\'mm\':\'ss"; + this.DTPBeginTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.DTPBeginTime.Location = new System.Drawing.Point(119, 151); + this.DTPBeginTime.Name = "DTPBeginTime"; + this.DTPBeginTime.Size = new System.Drawing.Size(160, 23); + this.DTPBeginTime.TabIndex = 7; + // + // NUDGoodsId + // + this.NUDGoodsId.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDGoodsId.Location = new System.Drawing.Point(119, 32); + this.NUDGoodsId.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDGoodsId.Name = "NUDGoodsId"; + this.NUDGoodsId.Size = new System.Drawing.Size(120, 23); + this.NUDGoodsId.TabIndex = 0; + this.NUDGoodsId.Value = new decimal(new int[] { + 101001, + 0, + 0, + 0}); + // + // NUDMaxLevel + // + this.NUDMaxLevel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDMaxLevel.Location = new System.Drawing.Point(198, 122); + this.NUDMaxLevel.Maximum = new decimal(new int[] { 99, 0, 0, 0}); - this.numericUpDown11.Name = "numericUpDown11"; - this.numericUpDown11.Size = new System.Drawing.Size(50, 23); - this.numericUpDown11.TabIndex = 6; - this.numericUpDown11.Value = new decimal(new int[] { + this.NUDMaxLevel.Name = "NUDMaxLevel"; + this.NUDMaxLevel.Size = new System.Drawing.Size(50, 23); + this.NUDMaxLevel.TabIndex = 6; + this.NUDMaxLevel.Value = new decimal(new int[] { 61, 0, 0, 0}); // - // numericUpDown10 + // NUDMinLevel // - this.numericUpDown10.Location = new System.Drawing.Point(106, 122); - this.numericUpDown10.Maximum = new decimal(new int[] { + this.NUDMinLevel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDMinLevel.Location = new System.Drawing.Point(119, 122); + this.NUDMinLevel.Maximum = new decimal(new int[] { 99, 0, 0, 0}); - this.numericUpDown10.Name = "numericUpDown10"; - this.numericUpDown10.Size = new System.Drawing.Size(50, 23); - this.numericUpDown10.TabIndex = 5; - this.numericUpDown10.Value = new decimal(new int[] { + this.NUDMinLevel.Name = "NUDMinLevel"; + this.NUDMinLevel.Size = new System.Drawing.Size(50, 23); + this.NUDMinLevel.TabIndex = 5; + this.NUDMinLevel.Value = new decimal(new int[] { 1, 0, 0, 0}); // - // numericUpDown9 + // NUDCostItem4 // - this.numericUpDown9.Location = new System.Drawing.Point(106, 412); - this.numericUpDown9.Maximum = new decimal(new int[] { + this.NUDCostItem4.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem4.Location = new System.Drawing.Point(119, 412); + this.NUDCostItem4.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown9.Name = "numericUpDown9"; - this.numericUpDown9.Size = new System.Drawing.Size(120, 23); - this.numericUpDown9.TabIndex = 20; + this.NUDCostItem4.Name = "NUDCostItem4"; + this.NUDCostItem4.Size = new System.Drawing.Size(80, 23); + this.NUDCostItem4.TabIndex = 20; // - // numericUpDown8 + // NUDCostItem3 // - this.numericUpDown8.Location = new System.Drawing.Point(106, 383); - this.numericUpDown8.Maximum = new decimal(new int[] { + this.NUDCostItem3.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem3.Location = new System.Drawing.Point(119, 383); + this.NUDCostItem3.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown8.Name = "numericUpDown8"; - this.numericUpDown8.Size = new System.Drawing.Size(120, 23); - this.numericUpDown8.TabIndex = 18; + this.NUDCostItem3.Name = "NUDCostItem3"; + this.NUDCostItem3.Size = new System.Drawing.Size(80, 23); + this.NUDCostItem3.TabIndex = 18; // - // numericUpDown7 + // NUDCostItem2 // - this.numericUpDown7.Location = new System.Drawing.Point(106, 354); - this.numericUpDown7.Maximum = new decimal(new int[] { + this.NUDCostItem2.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem2.Location = new System.Drawing.Point(119, 354); + this.NUDCostItem2.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown7.Name = "numericUpDown7"; - this.numericUpDown7.Size = new System.Drawing.Size(120, 23); - this.numericUpDown7.TabIndex = 16; + this.NUDCostItem2.Name = "NUDCostItem2"; + this.NUDCostItem2.Size = new System.Drawing.Size(80, 23); + this.NUDCostItem2.TabIndex = 16; // - // numericUpDown6 + // NUDCostItem1 // - this.numericUpDown6.Location = new System.Drawing.Point(106, 325); - this.numericUpDown6.Maximum = new decimal(new int[] { + this.NUDCostItem1.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem1.Location = new System.Drawing.Point(119, 325); + this.NUDCostItem1.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown6.Name = "numericUpDown6"; - this.numericUpDown6.Size = new System.Drawing.Size(120, 23); - this.numericUpDown6.TabIndex = 14; + this.NUDCostItem1.Name = "NUDCostItem1"; + this.NUDCostItem1.Size = new System.Drawing.Size(80, 23); + this.NUDCostItem1.TabIndex = 14; // - // numericUpDown5 + // NUDCostMcoin // - this.numericUpDown5.Location = new System.Drawing.Point(106, 296); - this.numericUpDown5.Maximum = new decimal(new int[] { + this.NUDCostMcoin.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostMcoin.Location = new System.Drawing.Point(119, 296); + this.NUDCostMcoin.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown5.Name = "numericUpDown5"; - this.numericUpDown5.Size = new System.Drawing.Size(120, 23); - this.numericUpDown5.TabIndex = 13; + this.NUDCostMcoin.Name = "NUDCostMcoin"; + this.NUDCostMcoin.Size = new System.Drawing.Size(120, 23); + this.NUDCostMcoin.TabIndex = 13; // - // numericUpDown4 + // NUDCostScoin // - this.numericUpDown4.Location = new System.Drawing.Point(106, 267); - this.numericUpDown4.Maximum = new decimal(new int[] { + this.NUDCostScoin.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostScoin.Location = new System.Drawing.Point(119, 267); + this.NUDCostScoin.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown4.Name = "numericUpDown4"; - this.numericUpDown4.Size = new System.Drawing.Size(120, 23); - this.numericUpDown4.TabIndex = 12; + this.NUDCostScoin.Name = "NUDCostScoin"; + this.NUDCostScoin.Size = new System.Drawing.Size(120, 23); + this.NUDCostScoin.TabIndex = 12; // - // numericUpDown3 + // NUDCostHcoin // - this.numericUpDown3.Location = new System.Drawing.Point(106, 238); - this.numericUpDown3.Maximum = new decimal(new int[] { + this.NUDCostHcoin.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostHcoin.Location = new System.Drawing.Point(119, 238); + this.NUDCostHcoin.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown3.Name = "numericUpDown3"; - this.numericUpDown3.Size = new System.Drawing.Size(120, 23); - this.numericUpDown3.TabIndex = 11; + this.NUDCostHcoin.Name = "NUDCostHcoin"; + this.NUDCostHcoin.Size = new System.Drawing.Size(120, 23); + this.NUDCostHcoin.TabIndex = 11; // - // numericUpDown2 + // NUDBuyLimit // - this.numericUpDown2.Location = new System.Drawing.Point(106, 90); - this.numericUpDown2.Maximum = new decimal(new int[] { + this.NUDBuyLimit.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDBuyLimit.Location = new System.Drawing.Point(119, 90); + this.NUDBuyLimit.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown2.Minimum = new decimal(new int[] { + this.NUDBuyLimit.Minimum = new decimal(new int[] { 1, 0, 0, 0}); - this.numericUpDown2.Name = "numericUpDown2"; - this.numericUpDown2.Size = new System.Drawing.Size(120, 23); - this.numericUpDown2.TabIndex = 4; - this.numericUpDown2.Value = new decimal(new int[] { + this.NUDBuyLimit.Name = "NUDBuyLimit"; + this.NUDBuyLimit.Size = new System.Drawing.Size(120, 23); + this.NUDBuyLimit.TabIndex = 4; + this.NUDBuyLimit.Value = new decimal(new int[] { 100, 0, 0, 0}); // - // numericUpDown1 + // NUDCostItem4Count // - this.numericUpDown1.Location = new System.Drawing.Point(244, 61); - this.numericUpDown1.Maximum = new decimal(new int[] { + this.NUDCostItem4Count.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem4Count.Location = new System.Drawing.Point(219, 412); + this.NUDCostItem4Count.Maximum = new decimal(new int[] { 2147483647, 0, 0, 0}); - this.numericUpDown1.Minimum = new decimal(new int[] { + this.NUDCostItem4Count.Name = "NUDCostItem4Count"; + this.NUDCostItem4Count.Size = new System.Drawing.Size(60, 23); + this.NUDCostItem4Count.TabIndex = 21; + // + // NUDCostItem3Count + // + this.NUDCostItem3Count.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem3Count.Location = new System.Drawing.Point(219, 383); + this.NUDCostItem3Count.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDCostItem3Count.Name = "NUDCostItem3Count"; + this.NUDCostItem3Count.Size = new System.Drawing.Size(60, 23); + this.NUDCostItem3Count.TabIndex = 19; + // + // NUDCostItem2Count + // + this.NUDCostItem2Count.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem2Count.Location = new System.Drawing.Point(219, 354); + this.NUDCostItem2Count.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDCostItem2Count.Name = "NUDCostItem2Count"; + this.NUDCostItem2Count.Size = new System.Drawing.Size(60, 23); + this.NUDCostItem2Count.TabIndex = 17; + // + // NUDCostItem1Count + // + this.NUDCostItem1Count.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDCostItem1Count.Location = new System.Drawing.Point(219, 325); + this.NUDCostItem1Count.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDCostItem1Count.Name = "NUDCostItem1Count"; + this.NUDCostItem1Count.Size = new System.Drawing.Size(60, 23); + this.NUDCostItem1Count.TabIndex = 15; + // + // NUDGoodsItemCount + // + this.NUDGoodsItemCount.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.NUDGoodsItemCount.Location = new System.Drawing.Point(257, 61); + this.NUDGoodsItemCount.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDGoodsItemCount.Minimum = new decimal(new int[] { 1, 0, 0, 0}); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(50, 23); - this.numericUpDown1.TabIndex = 3; - this.numericUpDown1.Value = new decimal(new int[] { + this.NUDGoodsItemCount.Name = "NUDGoodsItemCount"; + this.NUDGoodsItemCount.Size = new System.Drawing.Size(70, 23); + this.NUDGoodsItemCount.TabIndex = 3; + this.NUDGoodsItemCount.Value = new decimal(new int[] { 1, 0, 0, 0}); // + // TxtGoodsItem + // + this.TxtGoodsItem.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.TxtGoodsItem.Location = new System.Drawing.Point(95, 61); + this.TxtGoodsItem.Name = "TxtGoodsItem"; + this.TxtGoodsItem.Size = new System.Drawing.Size(144, 23); + this.TxtGoodsItem.TabIndex = 2; + // + // LblRefreshModeLabel + // + this.LblRefreshModeLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblRefreshModeLabel.AutoSize = true; + this.LblRefreshModeLabel.Location = new System.Drawing.Point(45, 211); + this.LblRefreshModeLabel.Name = "LblRefreshModeLabel"; + this.LblRefreshModeLabel.Size = new System.Drawing.Size(68, 17); + this.LblRefreshModeLabel.TabIndex = 15; + this.LblRefreshModeLabel.Text = "刷新方式:"; + // + // LblBuyLevelLabel + // + this.LblBuyLevelLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblBuyLevelLabel.AutoSize = true; + this.LblBuyLevelLabel.Location = new System.Drawing.Point(45, 125); + this.LblBuyLevelLabel.Name = "LblBuyLevelLabel"; + this.LblBuyLevelLabel.Size = new System.Drawing.Size(68, 17); + this.LblBuyLevelLabel.TabIndex = 12; + this.LblBuyLevelLabel.Text = "限购等级:"; + // + // LblEndTimeLabel + // + this.LblEndTimeLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblEndTimeLabel.AutoSize = true; + this.LblEndTimeLabel.Location = new System.Drawing.Point(45, 185); + this.LblEndTimeLabel.Name = "LblEndTimeLabel"; + this.LblEndTimeLabel.Size = new System.Drawing.Size(68, 17); + this.LblEndTimeLabel.TabIndex = 9; + this.LblEndTimeLabel.Text = "下架时间:"; + // + // LblBeginTimeLabel + // + this.LblBeginTimeLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblBeginTimeLabel.AutoSize = true; + this.LblBeginTimeLabel.Location = new System.Drawing.Point(45, 156); + this.LblBeginTimeLabel.Name = "LblBeginTimeLabel"; + this.LblBeginTimeLabel.Size = new System.Drawing.Size(68, 17); + this.LblBeginTimeLabel.TabIndex = 8; + this.LblBeginTimeLabel.Text = "上架时间:"; + // + // LblCostItem4Label + // + this.LblCostItem4Label.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostItem4Label.AutoSize = true; + this.LblCostItem4Label.Location = new System.Drawing.Point(38, 412); + this.LblCostItem4Label.Name = "LblCostItem4Label"; + this.LblCostItem4Label.Size = new System.Drawing.Size(75, 17); + this.LblCostItem4Label.TabIndex = 7; + this.LblCostItem4Label.Text = "消耗物品4:"; + // + // LblCostItem3Label + // + this.LblCostItem3Label.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostItem3Label.AutoSize = true; + this.LblCostItem3Label.Location = new System.Drawing.Point(38, 383); + this.LblCostItem3Label.Name = "LblCostItem3Label"; + this.LblCostItem3Label.Size = new System.Drawing.Size(75, 17); + this.LblCostItem3Label.TabIndex = 7; + this.LblCostItem3Label.Text = "消耗物品3:"; + // + // LblCostItem2Label + // + this.LblCostItem2Label.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostItem2Label.AutoSize = true; + this.LblCostItem2Label.Location = new System.Drawing.Point(38, 356); + this.LblCostItem2Label.Name = "LblCostItem2Label"; + this.LblCostItem2Label.Size = new System.Drawing.Size(75, 17); + this.LblCostItem2Label.TabIndex = 7; + this.LblCostItem2Label.Text = "消耗物品2:"; + // + // LblCostItem1Label + // + this.LblCostItem1Label.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostItem1Label.AutoSize = true; + this.LblCostItem1Label.Location = new System.Drawing.Point(38, 327); + this.LblCostItem1Label.Name = "LblCostItem1Label"; + this.LblCostItem1Label.Size = new System.Drawing.Size(75, 17); + this.LblCostItem1Label.TabIndex = 7; + this.LblCostItem1Label.Text = "消耗物品1:"; + // + // LblCostMcoinLabel + // + this.LblCostMcoinLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostMcoinLabel.AutoSize = true; + this.LblCostMcoinLabel.Location = new System.Drawing.Point(21, 298); + this.LblCostMcoinLabel.Name = "LblCostMcoinLabel"; + this.LblCostMcoinLabel.Size = new System.Drawing.Size(92, 17); + this.LblCostMcoinLabel.TabIndex = 7; + this.LblCostMcoinLabel.Text = "消耗创世结晶:"; + // + // LblCostScoinLabel + // + this.LblCostScoinLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostScoinLabel.AutoSize = true; + this.LblCostScoinLabel.Location = new System.Drawing.Point(45, 269); + this.LblCostScoinLabel.Name = "LblCostScoinLabel"; + this.LblCostScoinLabel.Size = new System.Drawing.Size(68, 17); + this.LblCostScoinLabel.TabIndex = 7; + this.LblCostScoinLabel.Text = "消耗摩拉:"; + // + // LblCostHcoinLabel + // + this.LblCostHcoinLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblCostHcoinLabel.AutoSize = true; + this.LblCostHcoinLabel.Location = new System.Drawing.Point(45, 240); + this.LblCostHcoinLabel.Name = "LblCostHcoinLabel"; + this.LblCostHcoinLabel.Size = new System.Drawing.Size(68, 17); + this.LblCostHcoinLabel.TabIndex = 7; + this.LblCostHcoinLabel.Text = "消耗原石:"; + // + // LblBuyLimitLabel + // + this.LblBuyLimitLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblBuyLimitLabel.AutoSize = true; + this.LblBuyLimitLabel.Location = new System.Drawing.Point(45, 92); + this.LblBuyLimitLabel.Name = "LblBuyLimitLabel"; + this.LblBuyLimitLabel.Size = new System.Drawing.Size(68, 17); + this.LblBuyLimitLabel.TabIndex = 6; + this.LblBuyLimitLabel.Text = "限购数量:"; + // + // LblGoodsIdLabel + // + this.LblGoodsIdLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblGoodsIdLabel.AutoSize = true; + this.LblGoodsIdLabel.Location = new System.Drawing.Point(56, 34); + this.LblGoodsIdLabel.Name = "LblGoodsIdLabel"; + this.LblGoodsIdLabel.Size = new System.Drawing.Size(57, 17); + this.LblGoodsIdLabel.TabIndex = 4; + this.LblGoodsIdLabel.Text = "商品ID:"; + // + // LblGoodsItemLabel + // + this.LblGoodsItemLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LblGoodsItemLabel.AutoSize = true; + this.LblGoodsItemLabel.Location = new System.Drawing.Point(45, 64); + this.LblGoodsItemLabel.Name = "LblGoodsItemLabel"; + this.LblGoodsItemLabel.Size = new System.Drawing.Size(44, 17); + this.LblGoodsItemLabel.TabIndex = 0; + this.LblGoodsItemLabel.Text = "商品:"; + // + // label13 + // + this.label13.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(207, 386); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(14, 17); + this.label13.TabIndex = 2; + this.label13.Text = "x"; + // + // label12 + // + this.label12.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(207, 357); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(14, 17); + this.label12.TabIndex = 2; + this.label12.Text = "x"; + // + // label11 + // + this.label11.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(207, 328); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(14, 17); + this.label11.TabIndex = 2; + this.label11.Text = "x"; + // + // label14 + // + this.label14.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(207, 415); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(14, 17); + this.label14.TabIndex = 2; + this.label14.Text = "x"; + // + // LnkGenGoodsId + // + this.LnkGenGoodsId.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.LnkGenGoodsId.AutoSize = true; + this.LnkGenGoodsId.Location = new System.Drawing.Point(247, 34); + this.LnkGenGoodsId.Name = "LnkGenGoodsId"; + this.LnkGenGoodsId.Size = new System.Drawing.Size(45, 17); + this.LnkGenGoodsId.TabIndex = 1; + this.LnkGenGoodsId.TabStop = true; + this.LnkGenGoodsId.Text = "生成ID"; + this.LnkGenGoodsId.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LnkGenGoodsId_LinkClicked); + // + // label18 + // + this.label18.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(175, 124); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(17, 17); + this.label18.TabIndex = 13; + this.label18.Text = "~"; + // // label1 // + this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(232, 64); + this.label1.Location = new System.Drawing.Point(245, 64); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(14, 17); this.label1.TabIndex = 2; this.label1.Text = "x"; // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(106, 61); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(120, 23); - this.textBox1.TabIndex = 2; - // - // LblItemLabel - // - this.LblItemLabel.AutoSize = true; - this.LblItemLabel.Location = new System.Drawing.Point(56, 64); - this.LblItemLabel.Name = "LblItemLabel"; - this.LblItemLabel.Size = new System.Drawing.Size(44, 17); - this.LblItemLabel.TabIndex = 0; - this.LblItemLabel.Text = "商品:"; - // // BtnSave // this.BtnSave.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -420,6 +758,7 @@ this.BtnSave.TabIndex = 2; this.BtnSave.Text = "保存"; this.BtnSave.UseVisualStyleBackColor = true; + this.BtnSave.Click += new System.EventHandler(this.BtnSave_Click); // // BtnLoad // @@ -430,6 +769,7 @@ this.BtnLoad.TabIndex = 1; this.BtnLoad.Text = "加载"; this.BtnLoad.UseVisualStyleBackColor = true; + this.BtnLoad.Click += new System.EventHandler(this.BtnLoad_Click); // // TxtShopJsonPath // @@ -448,331 +788,19 @@ this.LblShopPathLabel.TabIndex = 7; this.LblShopPathLabel.Text = "Shop.json 路径:"; // - // label2 + // TxtItemFilter // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(43, 34); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(57, 17); - this.label2.TabIndex = 4; - this.label2.Text = "商品ID:"; - // - // NUDGoodsId - // - this.NUDGoodsId.Location = new System.Drawing.Point(106, 32); - this.NUDGoodsId.Maximum = new decimal(new int[] { - 2147483647, - 0, - 0, - 0}); - this.NUDGoodsId.Name = "NUDGoodsId"; - this.NUDGoodsId.Size = new System.Drawing.Size(120, 23); - this.NUDGoodsId.TabIndex = 0; - this.NUDGoodsId.Value = new decimal(new int[] { - 101001, - 0, - 0, - 0}); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(32, 92); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(68, 17); - this.label3.TabIndex = 6; - this.label3.Text = "限购数量:"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(32, 240); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(68, 17); - this.label4.TabIndex = 7; - this.label4.Text = "消耗金币:"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(32, 269); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(68, 17); - this.label5.TabIndex = 7; - this.label5.Text = "消耗水晶:"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(8, 298); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(92, 17); - this.label6.TabIndex = 7; - this.label6.Text = "消耗创世结晶:"; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(25, 327); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(75, 17); - this.label7.TabIndex = 7; - this.label7.Text = "消耗物品1:"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(25, 356); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(75, 17); - this.label8.TabIndex = 7; - this.label8.Text = "消耗物品2:"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(25, 383); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(75, 17); - this.label9.TabIndex = 7; - this.label9.Text = "消耗物品3:"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(25, 412); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(75, 17); - this.label10.TabIndex = 7; - this.label10.Text = "消耗物品4:"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(232, 328); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(14, 17); - this.label11.TabIndex = 2; - this.label11.Text = "x"; - // - // numericUpDown12 - // - this.numericUpDown12.Location = new System.Drawing.Point(244, 325); - this.numericUpDown12.Maximum = new decimal(new int[] { - 2147483647, - 0, - 0, - 0}); - this.numericUpDown12.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown12.Name = "numericUpDown12"; - this.numericUpDown12.Size = new System.Drawing.Size(50, 23); - this.numericUpDown12.TabIndex = 15; - this.numericUpDown12.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(232, 357); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(14, 17); - this.label12.TabIndex = 2; - this.label12.Text = "x"; - // - // numericUpDown13 - // - this.numericUpDown13.Location = new System.Drawing.Point(244, 354); - this.numericUpDown13.Maximum = new decimal(new int[] { - 2147483647, - 0, - 0, - 0}); - this.numericUpDown13.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown13.Name = "numericUpDown13"; - this.numericUpDown13.Size = new System.Drawing.Size(50, 23); - this.numericUpDown13.TabIndex = 17; - this.numericUpDown13.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(232, 386); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(14, 17); - this.label13.TabIndex = 2; - this.label13.Text = "x"; - // - // numericUpDown14 - // - this.numericUpDown14.Location = new System.Drawing.Point(244, 383); - this.numericUpDown14.Maximum = new decimal(new int[] { - 2147483647, - 0, - 0, - 0}); - this.numericUpDown14.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown14.Name = "numericUpDown14"; - this.numericUpDown14.Size = new System.Drawing.Size(50, 23); - this.numericUpDown14.TabIndex = 19; - this.numericUpDown14.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(232, 415); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(14, 17); - this.label14.TabIndex = 2; - this.label14.Text = "x"; - // - // numericUpDown15 - // - this.numericUpDown15.Location = new System.Drawing.Point(244, 412); - this.numericUpDown15.Maximum = new decimal(new int[] { - 2147483647, - 0, - 0, - 0}); - this.numericUpDown15.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown15.Name = "numericUpDown15"; - this.numericUpDown15.Size = new System.Drawing.Size(50, 23); - this.numericUpDown15.TabIndex = 21; - this.numericUpDown15.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(32, 156); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(68, 17); - this.label15.TabIndex = 8; - this.label15.Text = "上架时间:"; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(32, 185); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(68, 17); - this.label16.TabIndex = 9; - this.label16.Text = "下架时间:"; - // - // DTPBeginTime - // - this.DTPBeginTime.CustomFormat = "yyyy\'/\'MM\'/\'dd HH\':\'mm\':\'ss"; - this.DTPBeginTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.DTPBeginTime.Location = new System.Drawing.Point(106, 151); - this.DTPBeginTime.Name = "DTPBeginTime"; - this.DTPBeginTime.Size = new System.Drawing.Size(160, 23); - this.DTPBeginTime.TabIndex = 7; - // - // dateTimePicker2 - // - this.dateTimePicker2.CustomFormat = "yyyy\'/\'MM\'/\'dd HH\':\'mm\':\'ss"; - this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dateTimePicker2.Location = new System.Drawing.Point(106, 180); - this.dateTimePicker2.Name = "dateTimePicker2"; - this.dateTimePicker2.Size = new System.Drawing.Size(160, 23); - this.dateTimePicker2.TabIndex = 8; - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(32, 125); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(68, 17); - this.label17.TabIndex = 12; - this.label17.Text = "限购等级:"; - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(162, 124); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(17, 17); - this.label18.TabIndex = 13; - this.label18.Text = "~"; - // - // linkLabel1 - // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Location = new System.Drawing.Point(234, 34); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(32, 17); - this.linkLabel1.TabIndex = 1; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "生成"; - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(32, 211); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(68, 17); - this.label19.TabIndex = 15; - this.label19.Text = "刷新方式:"; - // - // NUDRefreshParm - // - this.NUDRefreshParm.Location = new System.Drawing.Point(106, 209); - this.NUDRefreshParm.Name = "NUDRefreshParm"; - this.NUDRefreshParm.Size = new System.Drawing.Size(50, 23); - this.NUDRefreshParm.TabIndex = 9; - // - // CmdRefreshType - // - this.CmdRefreshType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CmdRefreshType.FormattingEnabled = true; - this.CmdRefreshType.Location = new System.Drawing.Point(162, 207); - this.CmdRefreshType.Name = "CmdRefreshType"; - this.CmdRefreshType.Size = new System.Drawing.Size(104, 25); - this.CmdRefreshType.TabIndex = 10; - // - // BtnSaveGoods - // - this.BtnSaveGoods.Location = new System.Drawing.Point(91, 472); - this.BtnSaveGoods.Name = "BtnSaveGoods"; - this.BtnSaveGoods.Size = new System.Drawing.Size(120, 30); - this.BtnSaveGoods.TabIndex = 30; - this.BtnSaveGoods.Text = "√ 保存"; - this.BtnSaveGoods.UseVisualStyleBackColor = true; + this.TxtItemFilter.Location = new System.Drawing.Point(6, 22); + this.TxtItemFilter.Name = "TxtItemFilter"; + this.TxtItemFilter.Size = new System.Drawing.Size(238, 23); + this.TxtItemFilter.TabIndex = 3; + this.TxtItemFilter.TextChanged += new System.EventHandler(this.TxtItemFilter_TextChanged); // // FormShopEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(839, 561); + this.ClientSize = new System.Drawing.Size(884, 561); this.Controls.Add(this.BtnSave); this.Controls.Add(this.BtnLoad); this.Controls.Add(this.TxtShopJsonPath); @@ -783,31 +811,33 @@ this.Controls.Add(this.GrpShopList); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Margin = new System.Windows.Forms.Padding(4); - this.MinimumSize = new System.Drawing.Size(855, 600); + this.MinimumSize = new System.Drawing.Size(900, 600); this.Name = "FormShopEditor"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Shop.json Editor"; this.GrpShopList.ResumeLayout(false); this.GrpGoodsList.ResumeLayout(false); this.GrpItems.ResumeLayout(false); + this.GrpItems.PerformLayout(); this.GrpGoodsInfo.ResumeLayout(false); this.GrpGoodsInfo.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown11)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown10)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown9)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUDGoodsId)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown12)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown13)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown14)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown15)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDRefreshParm)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDGoodsId)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDMaxLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDMinLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostMcoin)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostScoin)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostHcoin)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDBuyLimit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem4Count)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem3Count)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem2Count)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDCostItem1Count)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDGoodsItemCount)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -826,48 +856,49 @@ private System.Windows.Forms.Button BtnLoad; private System.Windows.Forms.TextBox TxtShopJsonPath; private System.Windows.Forms.Label LblShopPathLabel; - private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.NumericUpDown NUDGoodsItemCount; private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.Label LblItemLabel; - private System.Windows.Forms.NumericUpDown numericUpDown8; - private System.Windows.Forms.NumericUpDown numericUpDown7; - private System.Windows.Forms.NumericUpDown numericUpDown6; - private System.Windows.Forms.NumericUpDown numericUpDown5; - private System.Windows.Forms.NumericUpDown numericUpDown4; - private System.Windows.Forms.NumericUpDown numericUpDown3; - private System.Windows.Forms.NumericUpDown numericUpDown2; - private System.Windows.Forms.NumericUpDown numericUpDown11; - private System.Windows.Forms.NumericUpDown numericUpDown10; - private System.Windows.Forms.NumericUpDown numericUpDown9; - private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox TxtGoodsItem; + private System.Windows.Forms.Label LblGoodsItemLabel; + private System.Windows.Forms.NumericUpDown NUDCostItem3; + private System.Windows.Forms.NumericUpDown NUDCostItem2; + private System.Windows.Forms.NumericUpDown NUDCostItem1; + private System.Windows.Forms.NumericUpDown NUDCostMcoin; + private System.Windows.Forms.NumericUpDown NUDCostScoin; + private System.Windows.Forms.NumericUpDown NUDCostHcoin; + private System.Windows.Forms.NumericUpDown NUDBuyLimit; + private System.Windows.Forms.NumericUpDown NUDMaxLevel; + private System.Windows.Forms.NumericUpDown NUDMinLevel; + private System.Windows.Forms.NumericUpDown NUDCostItem4; + private System.Windows.Forms.Label LblGoodsIdLabel; private System.Windows.Forms.NumericUpDown NUDGoodsId; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.NumericUpDown numericUpDown15; + private System.Windows.Forms.Label LblBuyLimitLabel; + private System.Windows.Forms.Label LblCostItem4Label; + private System.Windows.Forms.Label LblCostItem3Label; + private System.Windows.Forms.Label LblCostItem2Label; + private System.Windows.Forms.Label LblCostItem1Label; + private System.Windows.Forms.Label LblCostMcoinLabel; + private System.Windows.Forms.Label LblCostScoinLabel; + private System.Windows.Forms.Label LblCostHcoinLabel; + private System.Windows.Forms.NumericUpDown NUDCostItem4Count; private System.Windows.Forms.Label label14; - private System.Windows.Forms.NumericUpDown numericUpDown14; + private System.Windows.Forms.NumericUpDown NUDCostItem3Count; private System.Windows.Forms.Label label13; - private System.Windows.Forms.NumericUpDown numericUpDown13; + private System.Windows.Forms.NumericUpDown NUDCostItem2Count; private System.Windows.Forms.Label label12; - private System.Windows.Forms.NumericUpDown numericUpDown12; + private System.Windows.Forms.NumericUpDown NUDCostItem1Count; private System.Windows.Forms.Label label11; - private System.Windows.Forms.DateTimePicker dateTimePicker2; + private System.Windows.Forms.DateTimePicker DTPEndTime; private System.Windows.Forms.DateTimePicker DTPBeginTime; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label LblEndTimeLabel; + private System.Windows.Forms.Label LblBeginTimeLabel; + private System.Windows.Forms.Label LblBuyLevelLabel; private System.Windows.Forms.Label label18; - private System.Windows.Forms.LinkLabel linkLabel1; - private System.Windows.Forms.ComboBox CmdRefreshType; + private System.Windows.Forms.LinkLabel LnkGenGoodsId; + private System.Windows.Forms.ComboBox CmbRefreshType; private System.Windows.Forms.NumericUpDown NUDRefreshParm; - private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label LblRefreshModeLabel; private System.Windows.Forms.Button BtnSaveGoods; + private System.Windows.Forms.TextBox TxtItemFilter; } } \ No newline at end of file diff --git a/Source/GrasscutterTools/Forms/FormShopEditor.cs b/Source/GrasscutterTools/Forms/FormShopEditor.cs index fe970c2..692873a 100644 --- a/Source/GrasscutterTools/Forms/FormShopEditor.cs +++ b/Source/GrasscutterTools/Forms/FormShopEditor.cs @@ -1,24 +1,281 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; +using System.IO; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; +using GrasscutterTools.Game; +using GrasscutterTools.Game.Shop; using GrasscutterTools.Properties; +using GrasscutterTools.Utils; + +using Newtonsoft.Json; namespace GrasscutterTools.Forms { public partial class FormShopEditor : Form { + #region - 成员 - + + private Dictionary> Shops = new Dictionary>(); + + private List SelectedShop = new List(); + + #endregion + + #region - 构造与窗体事件 - + public FormShopEditor() { InitializeComponent(); Icon = Resources.IconGrasscutter; + + ListShop.Items.AddRange(GameData.ShopType.Lines); + ListItems.Items.AddRange(GameData.Items.Lines); } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + try + { + // 加载文件路径 + var path = Settings.Default.ShopJsonPath; + TxtShopJsonPath.Text = path; + if (!string.IsNullOrEmpty(path) && File.Exists(path)) + LoadShops(path); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + protected override void OnFormClosed(FormClosedEventArgs e) + { + Settings.Default.ShopJsonPath = TxtShopJsonPath.Text; + Settings.Default.Save(); + + base.OnFormClosed(e); + } + + #endregion - 构造与窗体事件 - + + #region - Shop.json 文件相关 - + + /// + /// 点击加载Shop.json按钮时触发 + /// + private void BtnLoad_Click(object sender, EventArgs e) + { + try + { + var path = TxtShopJsonPath.Text.Trim(); + if (path == string.Empty) + { + var dialog = new OpenFileDialog + { + FileName = "Shop.json", + Filter = "Shop.Json (*.json)|*.json|All files (*.*)|*.*", + }; + var result = dialog.ShowDialog(); + if (result == DialogResult.OK) + path = TxtShopJsonPath.Text = dialog.FileName; + else + return; + } + + // 反序列化 + LoadShops(path); + MessageBox.Show("OK", Resources.Tips, MessageBoxButtons.OK); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + /// + /// 加载商店 + /// + /// + private void LoadShops(string path) + { + // 反序列化 + var banners = JsonConvert.DeserializeObject>(File.ReadAllText(path)); + Shops = new Dictionary>(banners.Count); + foreach (var item in banners) + Shops.Add(item.ShopType, item.Items); + } + + /// + /// 点击保存Shop.json按钮时触发 + /// + private void BtnSave_Click(object sender, EventArgs e) + { + try + { + var path = TxtShopJsonPath.Text.Trim(); + if (path == string.Empty) + { + var dialog = new SaveFileDialog + { + FileName = "Shop.json", + Filter = "Shop.json (*.json)|*.json|All files (*.*)|*.*", + }; + var result = dialog.ShowDialog(); + if (result == DialogResult.OK) + path = TxtShopJsonPath.Text = dialog.FileName; + else + return; + } + + // 序列化 + var banners = new List(Shops.Count); + foreach (var shop in Shops) + { + banners.Add(new ShopTable + { + ShopType = shop.Key, + Items = shop.Value, + }); + } + File.WriteAllText(path, JsonConvert.SerializeObject(banners)); + MessageBox.Show("OK", Resources.Tips, MessageBoxButtons.OK); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + #endregion - Shop.json 文件相关 - + + #region - 商店列表 - + + /// + /// 商店列表选中项改变时触发 + /// + private void ListShop_SelectedIndexChanged(object sender, EventArgs e) + { + if (ListShop.SelectedIndex == -1) return; + var shopType = ItemMap.ToId(ListShop.SelectedItem as string); + SelectedShop.Clear(); + if (Shops.TryGetValue(shopType, out var items)) + SelectedShop.AddRange(items); + ShowGoodsList(SelectedShop); + } + + #endregion - 商店列表 - + + #region - 商品列表 - + + /// + /// 显示商品列表 + /// + private void ShowGoodsList(List banner) + { + ListGoods.BeginUpdate(); + ListGoods.Items.Clear(); + if (banner.Count > 0) + { + ListGoods.Items.AddRange(banner.Select(it => it.ToString()).ToArray()); + ListGoods.SelectedIndex = 0; + } + ListGoods.EndUpdate(); + } + + /// + /// 商品列表选中项改变时触发 + /// + private void ListGoods_SelectedIndexChanged(object sender, EventArgs e) + { + if (ListGoods.SelectedIndex == -1) return; + ShowGoods(SelectedShop[ListGoods.SelectedIndex]); + } + + #endregion - 商品列表 - + + #region - 商品信息 - + + /// + /// 显示商品 + /// + /// + private void ShowGoods(ShopInfo goods) + { + NUDGoodsId.Value = goods.GoodsId; + TxtGoodsItem.Text = $"{goods.GoodsItem.Id}:{GameData.Items[goods.GoodsItem.Id]}"; + NUDGoodsItemCount.Value = goods.GoodsItem.Count; + NUDBuyLimit.Value = goods.BuyLimit; + NUDMinLevel.Value = goods.MinLevel; + NUDMaxLevel.Value = goods.MaxLevel; + DTPBeginTime.Value = DateTimeOffset.FromUnixTimeSeconds(goods.BeginTime).DateTime; + DTPEndTime.Value = DateTimeOffset.FromUnixTimeSeconds(goods.EndTime).DateTime; + NUDRefreshParm.Value = goods.ShopRefreshParam; + CmbRefreshType.SelectedIndex = (int)goods.RefreshType; + NUDCostHcoin.Value = goods.HCoin; + NUDCostScoin.Value = goods.SCoin; + NUDCostMcoin.Value = goods.MCoin; + var items = new ItemParamData[4]; + goods.CostItemList?.CopyTo(items, 0); + NUDCostItem1.Value = items[0].Id; + NUDCostItem1Count.Value = items[0].Count; + NUDCostItem2.Value = items[1].Id; + NUDCostItem2Count.Value = items[1].Count; + NUDCostItem3.Value = items[2].Id; + NUDCostItem3Count.Value = items[2].Count; + NUDCostItem4.Value = items[3].Id; + NUDCostItem4Count.Value = items[3].Count; + } + + /// + /// 点击生成商品ID链接标签时触发 + /// + private void LnkGenGoodsId_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + } + + /// + /// 刷新类型选中项改变时触发 + /// + private void CmbRefreshType_SelectedIndexChanged(object sender, EventArgs e) + { + NUDRefreshParm.Enabled = CmbRefreshType.SelectedIndex > 0; + } + + /// + /// 点击保存商品按钮时触发 + /// + /// + /// + private void BtnSaveGoods_Click(object sender, EventArgs e) + { + } + + #endregion - 商品信息 - + + #region - 物品列表 - + + /// + /// 物品列表过滤框输入改变事件 + /// + private void TxtItemFilter_TextChanged(object sender, EventArgs e) + { + UIUtil.ListBoxFilter(ListItems, GameData.Items.Lines, TxtItemFilter.Text); + } + + /// + /// 物品列表选中项改变时触发 + /// + private void ListItems_SelectedIndexChanged(object sender, EventArgs e) + { + if (ListItems.SelectedIndex == -1) return; + TxtGoodsItem.Text = ListItems.SelectedItem as string; + } + + #endregion - 物品列表 - + } -} +} \ No newline at end of file diff --git a/Source/GrasscutterTools/Game/Shop/ShopInfo.cs b/Source/GrasscutterTools/Game/Shop/ShopInfo.cs index f4bf26b..7b54392 100644 --- a/Source/GrasscutterTools/Game/Shop/ShopInfo.cs +++ b/Source/GrasscutterTools/Game/Shop/ShopInfo.cs @@ -66,8 +66,19 @@ namespace GrasscutterTools.Game.Shop [JsonProperty("disableType")] public int DisableType { get; set; } - [JsonProperty("secondarySheetId")] public int SecondarySheetId { get; set; } + + [JsonProperty("refreshType")] + public ShopRefreshType RefreshType { get; set; } + + [JsonProperty("shopRefreshParam")] + public int ShopRefreshParam { get; set; } + + + public override string ToString() + { + return $"{GoodsId}:{GameData.Items[GoodsItem.Id]} x{GoodsItem.Count}"; + } } } diff --git a/Source/GrasscutterTools/Game/Shop/ShopRefreshType.cs b/Source/GrasscutterTools/Game/Shop/ShopRefreshType.cs new file mode 100644 index 0000000..98b320b --- /dev/null +++ b/Source/GrasscutterTools/Game/Shop/ShopRefreshType.cs @@ -0,0 +1,34 @@ +using Newtonsoft.Json; + +namespace GrasscutterTools.Game.Shop +{ + /// + /// 商品刷新类型 + /// + public enum ShopRefreshType + { + /// + /// 不刷新 + /// + [JsonProperty("NONE")] + None, + + /// + /// 按天刷新 + /// + [JsonProperty("SHOP_REFRESH_DAILY")] + Daily, + + /// + /// 按周刷新 + /// + [JsonProperty("SHOP_REFRESH_WEEKLY")] + Weekly, + + /// + /// 按月刷新 + /// + [JsonProperty("SHOP_REFRESH_MONTHLY")] + Monthly, + } +} diff --git a/Source/GrasscutterTools/GrasscutterTools.csproj b/Source/GrasscutterTools/GrasscutterTools.csproj index fb66c0e..eafbc12 100644 --- a/Source/GrasscutterTools/GrasscutterTools.csproj +++ b/Source/GrasscutterTools/GrasscutterTools.csproj @@ -142,6 +142,7 @@ + diff --git a/Source/GrasscutterTools/Properties/Settings.Designer.cs b/Source/GrasscutterTools/Properties/Settings.Designer.cs index 4298652..98b6ef1 100644 --- a/Source/GrasscutterTools/Properties/Settings.Designer.cs +++ b/Source/GrasscutterTools/Properties/Settings.Designer.cs @@ -178,5 +178,17 @@ namespace GrasscutterTools.Properties { this["DefaultMailSender"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string ShopJsonPath { + get { + return ((string)(this["ShopJsonPath"])); + } + set { + this["ShopJsonPath"] = value; + } + } } } diff --git a/Source/GrasscutterTools/Properties/Settings.settings b/Source/GrasscutterTools/Properties/Settings.settings index 470f68f..d5bcfdd 100644 --- a/Source/GrasscutterTools/Properties/Settings.settings +++ b/Source/GrasscutterTools/Properties/Settings.settings @@ -41,5 +41,8 @@ GrasscutterTools + + + \ No newline at end of file