private void frmLoad_Shown(object sender, EventArgs e) { progressBar1.Value = 10; if (VerificaProgramaEmExecucao()) { MessageBox.Show("Programa ja em execucao, verifique a bandeja de sistema", "Erro"); Application.Exit(); } progressBar1.Value = 80; if (Properties.Settings.Default.hostIP.Equals("Undefined") || Properties.Settings.Default.senha.Equals("Undefined")) { progressBar1.Value = 100; StatCfg frmConfigLoad = new StatCfg(0); frmConfigLoad.Show(); this.Visible = false; } else { Maincs frmMainLoad = new Maincs(); frmMainLoad.Show(); this.Visible = false; } }
private void button1_Click(object sender, EventArgs e) { StatCfg frmConfigLoad = new StatCfg(1); frmConfigLoad.Show(); this.Dispose(); }