Пример #1
0
 static void ShowSplashForm(Rectangle win, Rectangle target, Action done)
 {
     VgcApis.Misc.UI.Invoke(() =>
     {
         var qrSplash         = new QRCodeSplashForm();
         qrSplash.Location    = win.Location;
         qrSplash.Size        = win.Size;
         qrSplash.TargetRect  = target;
         qrSplash.FormClosed += (s, a) => done();
         qrSplash.Show();
     });
 }
Пример #2
0
        static void ShowSplashForm(Rectangle win, Rectangle target, Action done)
        {
            void ShowFormInBackground()
            {
                var qrSplash = new QRCodeSplashForm();

                qrSplash.Location    = win.Location;
                qrSplash.Size        = win.Size;
                qrSplash.TargetRect  = target;
                qrSplash.FormClosed += (s, a) => done();

                try
                {
                    qrSplash.Show();
                }
                catch { }
                Application.Run();
            }

            VgcApis.Misc.Utils.RunInBackground(() => ShowFormInBackground());
        }