Ejemplo n.º 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();
     });
 }
Ejemplo n.º 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());
        }