private void MainForm_Load(object sender, EventArgs e) { chkFile = new com.echo.File.IniFile(Application.StartupPath + "\\chk.ini"); msgFile = new com.echo.File.IniFile(Application.StartupPath + "\\msg.ini"); OnCheckDB(); GetChk(); GetTopUnit(); MainForm.CheckForIllegalCrossThreadCalls = false; }
private void MainForm_Load(object sender, EventArgs e) { if (DateTime.Now.Month.ToString() == "1" || DateTime.Now.Month.ToString() == "2") { cbYear.SelectedIndex = cbYear.Items.IndexOf((DateTime.Now.Year - 1).ToString()); } else { cbYear.SelectedIndex = cbYear.Items.IndexOf(DateTime.Now.Year.ToString()); } chkFile = new com.echo.File.IniFile(Application.StartupPath + "\\chk.ini"); msgFile = new com.echo.File.IniFile(Application.StartupPath + "\\msg.ini"); OnCheckDB(); GetChk(); GetTopUnit(); MainForm.CheckForIllegalCrossThreadCalls = false; }