//+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ public CBalanceExampleDlg() { InitializeComponent(); m_manager = new CManager(); var lists = new List <string>(); using (FileStream fs = new FileStream(@"D:\MetaTrader5SDK\Examples\Manager\BalanceExample.NET\user.txt", FileMode.Open, FileAccess.Read)) { using (TextReader tr = new StreamReader(fs, Encoding.Default)) { string line; while ((line = tr.ReadLine()) != null) { lists.Add(line); } } } url = lists[0]; username = lists[1]; password = lists[2]; this.m_Server.Text = url; this.m_Loginname.Text = username; this.m_Password.Text = password; lists.Clear(); lists = null; }
//+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ public CBalanceExampleDlg() { InitializeComponent(); m_manager = new CManager(); }