계좌 선택 기능 추가

This commit is contained in:
2016-12-20 09:16:28 +09:00
parent 034c061a1b
commit a93faf9eb5
7 changed files with 156 additions and 29 deletions

View File

@@ -2,6 +2,7 @@
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Linq;
namespace NewsCrawler
{
@@ -19,6 +20,12 @@ namespace NewsCrawler
{
tbVolume.Text = Config.GetManualPrice().ToString();
tbBuyPrice.Text = Config.GetBuyPrice().ToString();
cbAccount.Items.Clear();
string[] Accounts = m_Listener.GetAccounts();
cbAccount.Items.AddRange(Accounts);
if(Config.GetAccount() != "" && Accounts.Contains(Config.GetAccount()))
cbAccount.SelectedItem = Config.GetAccount();
}
private void OpenFile(string strName)
@@ -124,5 +131,15 @@ namespace NewsCrawler
Config.SetBuyPrice(iPrice);
}
#endregion
private void btnAccountApply_Click(object sender, EventArgs e)
{
m_Listener.ApplyAccount(cbAccount.SelectedItem as string, tbAccountSub.Text);
}
private void ConfigForm_FormClosing(object sender, FormClosingEventArgs e)
{
m_Listener.OnConfigFormClosing();
}
}
}