Example #1
0
 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;
     }
 }
Example #2
0
        private void btnSalvar_Click(object sender, EventArgs e)
        {
            Maincs frmMain = new Maincs();

            frmMain.refreshQR();
            salvarPrefs();
        }
Example #3
0
        private void salvarPrefs()
        {
            Properties.Settings.Default.hostIP = ipCmBx.SelectedItem.ToString();
            Properties.Settings.Default.port   = Convert.ToInt32(txtPort.Text);
            Properties.Settings.Default.senha  = txtPass.Text;
            Properties.Settings.Default.Save();
            Maincs frmMainLoad = new Maincs();

            frmMainLoad.Show();
            this.Visible = false;
            this.Dispose();
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            switch (whatsCalling)
            {
            case 0:
                Application.Exit();
                break;

            case 1:
                Maincs frmMain = new Maincs();
                frmMain.Show();
                this.Visible = false;
                this.Dispose();
                break;
            }
        }