Example #1
0
 private void menuButton1_Click(object sender, EventArgs e)
 {
     var activeForm = this;
     using (var dlg = new mainForm())
     {
         dlg.FormClosing += delegate { activeForm.Show(); };
         //activeForm.Hide();
     }
     Form3 settingsForm = new Form3();
     settingsForm.ShowDialog(this);
 }
Example #2
0
        private void updateForm_Shown(object sender, EventArgs e)
        {
            //read local settings
            settingsFile.Read();

            if (settingsFile.wowPath() == "null")
            {
                Form3 wowPathForm = new Form3();
                wowPathForm.ShowDialog(this);
            }

            //check server status
            bool serverReply = PingHost(settingsFile.serverAddress());
            if (serverReply == false)
            {
                MessageBox.Show("ERROR: {0} or Your internet connectionis down. Exiting ...", settingsFile.serverAddress());
                Environment.Exit(0);
            }
            statusLabel.Text = "checking for update";
            this.Refresh();

            //check for update
            updateLabelLoopWorker.RunWorkerAsync();
            updateBackgroundDownloader.RunWorkerAsync();
        }