public void Dispose() { _notificationRegister.UnRegisterNotifications(_consoleNotificationWindow.Handle); _consoleNotificationWindow.Stop(); _notificationRegister = null; _consoleNotificationWindow = null; }
public ServiceContainer(ServiceBase service) { _service = service; Console.WriteLine("Starting Service Container"); if (_consoleNotificationWindow != null || _notificationRegister != null) { throw new ApplicationException("Unable to start twice"); } _notificationRegister = new Notifications.Notifications(); _consoleNotificationWindow = new ConsoleNotificationWindow<Notifications.NotificationDetail>(); _consoleNotificationWindow.TransformMessage = Notifications.Notifications.Transform; _consoleNotificationWindow.WndProc += new ConsoleNotificationWindow<NotificationDetail>.WndProcHandler(NotificationDetailHandler); _consoleNotificationWindow.Start(); _notificationRegister.RegisterNotifications(_consoleNotificationWindow.Handle, Notifications.Notifications.NotifyType.Window); }
public ServiceContainer(ServiceBase service) { _service = service; Console.WriteLine("Starting Service Container"); if (_consoleNotificationWindow != null || _notificationRegister != null) { throw new ApplicationException("Unable to start twice"); } _notificationRegister = new Notifications.Notifications(); _consoleNotificationWindow = new ConsoleNotificationWindow <Notifications.NotificationDetail>(); _consoleNotificationWindow.TransformMessage = Notifications.Notifications.Transform; _consoleNotificationWindow.WndProc += new ConsoleNotificationWindow <NotificationDetail> .WndProcHandler(NotificationDetailHandler); _consoleNotificationWindow.Start(); _notificationRegister.RegisterNotifications(_consoleNotificationWindow.Handle, Notifications.Notifications.NotifyType.Window); }