Example #1
0
        private async void LoadForm(object sender)
        {
            SplashScreenManager.CloseForm(false);
            SplashScreenManager.ShowForm(typeof(LoadingForm));

            IDeveloverFormChild form = await GetForm(sender);

            if (form == null)
            {
                SplashScreenManager.CloseForm(false);
                return;
            }

            if (!DeveloverOptions.StatusLogins.StatusLogin)
            {
                return;
            }

            for (int i = 0; i < MdiChildren.Length; i++)
            {
                IDeveloverFormChild f = (IDeveloverFormChild)MdiChildren[i];
                if (f.GetType().FullName == form.GetType().FullName)
                {
                    SplashScreenManager.CloseForm(false);
                    f.Activate();
                    return;
                }
            }

            form.MdiParent = this;
            form.Show();
            SplashScreenManager.CloseForm(false);
        }
Example #2
0
 public void ShowFormChildren(bool show)
 {
     foreach (Form form in MdiChildren)
     {
         DeveloverOptions.StatusLogins.StatusLogin = show;
         IDeveloverFormChild f = (IDeveloverFormChild)form;
         if (show)
         {
             f.Show();
         }
         else
         {
             f.Hide();
         }
     }
 }