public void Handle(ViewStartPrintProgressCommand message) { mainView.Focus(); windowManager.ShowWindow(this.PrintWait); try { TaskbarManager.HideTaskbar(); } catch { } }
protected async override void OnViewLoaded(object view) { try { TaskbarManager.HideTaskbar(); } catch { } mainView = ((AppView)view); CancellationTokenSource ct = new CancellationTokenSource(); base.ActivateItem(this.Loading); if (!this.licenceProvider.hasAlreadyKey()) { base.ActivateItem(this.SelectVersion); this.SelectVersion.Parent = this; } else { string checkLicence = await this.licenceProvider.checkPcLicence(ct); this.log.Info("Invoking Action: Return from checkLicence is" + checkLicence); if (checkLicence == "1") { this.HandlerAndSettings(); base.ActivateItem(this.ScreenSaver); this.ScreenSaver.Parent = this; } else if (checkLicence == "error") { this.log.Info("Invoking Action: View An error occured. Return from checkLicence is: " + checkLicence); // System.Windows.MessageBox.Show("An error occured. Please check net connection or contact the administrator"); System.Windows.Application.Current.Shutdown(); } else if (checkLicence == "0") { this.log.Info("Invoking Action: View no valid licence. Return from checkLicence is: " + checkLicence); // System.Windows.MessageBox.Show("you have not a a used licence"); System.Windows.Application.Current.Shutdown(); } else { this.log.Info("Invoking Action: View An error occured. Return from checkLicence is: " + checkLicence); //System.Windows.MessageBox.Show("An error occured. Please check net connection or contact the administrator"); System.Windows.Application.Current.Shutdown(); } } base.OnViewLoaded(view); }
private void HideBarTimer_Tick(object sender, EventArgs e) { DispatcherTimer hideTimer = (DispatcherTimer)sender; try { TaskbarManager.HideTaskbar(); } catch { } hideTimer.Tick -= TimerTick; }