private void ShowNotification(string alarmString) { Notify.ClearUserNotification(this.timerNotificationHandle); FormEngine.BringWindowToTop(this); if (this.notificationAlarm != null) { this.notificationAlarm.Dispose(); } this.notificationAlarm = new Microsoft.WindowsCE.Forms.Notification(); this.notificationAlarm.Caption = this.Text; this.notificationAlarm.Critical = false; this.notificationAlarm.InitialDuration = 60; this.notificationAlarm.BalloonChanged += new Microsoft.WindowsCE.Forms.BalloonChangedEventHandler(notificationAlarm_BalloonChanged); this.notificationAlarm.ResponseSubmitted += new Microsoft.WindowsCE.Forms.ResponseSubmittedEventHandler(notificationAlarm_ResponseSubmitted); int minute = this.timeRemaining.Minutes; if (this.timeRemaining.Seconds > 0) { minute++; } this.notificationAlarm.Text = string.Format(alarmString, minute); this.notificationAlarm.Critical = true; //this.notificationAlarm.Icon = global::AnattaTimer.Properties.Resources.AlarmIcon; this.notificationAlarm.Visible = true; }
protected void LoadMainForm() { if (this.IsDeployed && this.GetType().Name == "MainForm") { string mainWindowName = "Anatta Main"; if (this.Text != mainWindowName) { string application = Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName; string mainApp = Path.GetDirectoryName(application) + "\\AnattaMainPpc.exe"; FormEngine.BringWindowToTop(mainWindowName, mainApp); } } }