/// <summary> /// Called when Configuration is clicked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void configurationToolStripMenuItem_Click(object sender, EventArgs e) { if (this.Visible) { FormForcefullyHidden = true; } HideAlert(); //if FormSubmit is shown dispose of it. if (FormSubmit != null) { FormSubmit.Dispose(); FormSubmit = null; } //If configuration form is already open place it on top again. if (FormConfiguration != null) { FormConfiguration.AnchorForm(); FormConfiguration.SendToTop(); FormConfiguration.Show(); } //If configuration form isn't open make a new one and show it. else { FormConfiguration = new FormConfiguration(); FormConfiguration.Initialize(this); FormConfiguration.Show(); } }
/// <summary> /// Called when form loads. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_Load(object sender, EventArgs e) { LoadConfiguration(); AnchorForm(); HideAlert(); if (ConfigurationIncomplete()) { MessageBox.Show("Program is not yet configured. You will be prompted to configure the program after clicking OK.", "Live Alert", MessageBoxButtons.OK); FormConfiguration = new FormConfiguration(); FormConfiguration.Initialize(this); FormConfiguration.Show(); return; } CheckForUpdate(); }