예제 #1
0
        public void Dispose()
        {
            _notificationRegister.UnRegisterNotifications(_consoleNotificationWindow.Handle);
            _consoleNotificationWindow.Stop();

            _notificationRegister      = null;
            _consoleNotificationWindow = null;
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        public void Dispose()
        {
            _notificationRegister.UnRegisterNotifications(_consoleNotificationWindow.Handle);
            _consoleNotificationWindow.Stop();

            _notificationRegister = null;
            _consoleNotificationWindow = null;
        }