private void btnFormStatus_Click(object sender, EventArgs e) { if (statusForm == null) { if (_asyncOpManager.Count != 0) { statusForm = new FormStatus(); statusForm.Show(); } } else { if (_asyncOpManager.Count != 0) { statusForm.Visible = true; statusForm.Activate(); } else { statusForm.Close(); } } }
public static void ActivateLoadingForm() { // verify ShowLoadingForm in app global settings. _appSettings = MyZillaSettingsDataSet.GetInstance(); TDSettings.GlobalSettingsRow appSettings = _appSettings.GetGlobalSettings(); if (appSettings.ShowLoadingForm) { // open form status if ((FormContainer as MainForm).statusForm == null) { FormStatus frm = new FormStatus(); frm.Show(); } else { (FormContainer as MainForm).statusForm.Show(); } } else { // no code here. } }