This commit is contained in:
2018-12-04 23:24:24 +09:00
parent 6ca9067be0
commit 9864e46d5f
4 changed files with 29 additions and 1 deletions

View File

@@ -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";

View File

@@ -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
//

14
NewsForm.Designer.cs generated
View File

@@ -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;
}
}

View File

@@ -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();
}
}