Пример #1
0
        public override async void Execute(object parameter)
        {
            var splash = new LoadingSplash();

            KillProcess.ByName(ExeName, true);

            if (await CopyOrigToTemp())
            {
                StartExeProcess(TempExePath);
            }

            UpdateVersionInfo();
            splash.Close();
        }
Пример #2
0
        public static void Launch(AppArguments args)
        {
            var now = DateTime.Now.Date;
            var bgn = new DateTime(now.Year, now.Month, 1);
            var end = args.Collections.LastPostedDate();

            if (!PopUpInput.TryGetDateRange
                    ("Dates covered by Collection Summary Report",
                    out (DateTime Start, DateTime End)rng, bgn, end))
            {
                return;
            }

            var splash = new LoadingSplash();

            new ColxnSummaryReport(rng.Start, rng.End, args).ToExcel();

            splash.Close();
        }
Пример #3
0
 private void DoneLoadingDelay(object sender, EventArgs e)
 {
     try
     {
         if (!IsLoading)
         {
             delayTimer.Stop();
             if (LoadingSplash.InvokeRequired)
             {
                 LoadingSplash.Invoke(new Action(() => LoadingSplash.Visible = false));
             }
             else
             {
                 LoadingSplash.Visible = false;
             }
         }
     }
     catch { }
 }
Пример #4
0
 private void ChromeBrowser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
 {
     if (e.IsLoading)
     {
         IsLoading = true;
         if (LoadingSplash.InvokeRequired)
         {
             LoadingSplash.Invoke(new Action(() => LoadingSplash.Visible = true));
         }
         else
         {
             LoadingSplash.Visible = true;
         }
     }
     else if (!e.IsLoading)
     {
         IsLoading  = false;
         delayTimer = new System.Windows.Forms.Timer {
             Interval = 500
         };
         delayTimer.Tick += DoneLoadingDelay;
         delayTimer.Start();
     }
 }