From 9864e46d5f4d263840669496a5764256accb5a7f Mon Sep 17 00:00:00 2001 From: mjjo53 Date: Tue, 4 Dec 2018 23:24:24 +0900 Subject: [PATCH] update --- CodeList.cs | 7 +++++++ ConfigForm.Designer.cs | 2 +- NewsForm.Designer.cs | 14 ++++++++++++++ NewsForm.cs | 7 +++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CodeList.cs b/CodeList.cs index 2f9a050..26c8739 100644 --- a/CodeList.cs +++ b/CodeList.cs @@ -157,6 +157,13 @@ namespace NewsCrawler LoadCodeType(strPath, CODE_TYPE.DENIAL); } + public void ClearDuplicatedList() + { + string strPath = Util.GetConfigPath() + "/code-duplicated.txt"; + File.WriteAllBytes(strPath, new byte[] { }); + LoadCodeType(strPath, CODE_TYPE.DUPLICATED); + } + public void LoadDuplicatedList() { string strPath = Util.GetConfigPath()+"/code-duplicated.txt"; diff --git a/ConfigForm.Designer.cs b/ConfigForm.Designer.cs index 8e1c5b4..a56c314 100644 --- a/ConfigForm.Designer.cs +++ b/ConfigForm.Designer.cs @@ -658,7 +658,7 @@ this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(132, 12); this.label9.TabIndex = 20; - this.label9.Text = "Version : 2018.01.04.12"; + this.label9.Text = "Version : 2018.12.04.13"; // // cbMockTrading // diff --git a/NewsForm.Designer.cs b/NewsForm.Designer.cs index 4b99649..78b7ef9 100644 --- a/NewsForm.Designer.cs +++ b/NewsForm.Designer.cs @@ -58,6 +58,7 @@ this.chBuy = new System.Windows.Forms.CheckBox(); this.cbPriceCheck = new System.Windows.Forms.CheckBox(); this.btnManualBuy = new System.Windows.Forms.Button(); + this.btClearDuplicate = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -317,11 +318,23 @@ this.btnManualBuy.UseVisualStyleBackColor = true; this.btnManualBuy.Click += new System.EventHandler(this.btnManualBuy_Click); // + // btClearDuplicate + // + this.btClearDuplicate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btClearDuplicate.Location = new System.Drawing.Point(864, 3); + this.btClearDuplicate.Name = "btClearDuplicate"; + this.btClearDuplicate.Size = new System.Drawing.Size(91, 23); + this.btClearDuplicate.TabIndex = 12; + this.btClearDuplicate.Text = "중복종목 삭제"; + this.btClearDuplicate.UseVisualStyleBackColor = true; + this.btClearDuplicate.Click += new System.EventHandler(this.btClearDuplicate_Click); + // // NewsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1040, 649); + this.Controls.Add(this.btClearDuplicate); this.Controls.Add(this.btnManualBuy); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.cbPriceCheck); @@ -378,6 +391,7 @@ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel4; private System.Windows.Forms.ColumnHeader chCodeName; private System.Windows.Forms.Button btnManualBuy; + private System.Windows.Forms.Button btClearDuplicate; } } diff --git a/NewsForm.cs b/NewsForm.cs index 3e48a46..3fe7637 100644 --- a/NewsForm.cs +++ b/NewsForm.cs @@ -1007,6 +1007,13 @@ namespace NewsCrawler { Config.SetAccount(strAccount, strAccountSub); } + + private void btClearDuplicate_Click(object sender, EventArgs e) + { + DialogResult dialogResult = MessageBox.Show("중복 종목을 삭제합니다", "확인", MessageBoxButtons.YesNo); + if(dialogResult == DialogResult.Yes) + m_CodeList.ClearDuplicatedList(); + } }