Exemplo n.º 1
0
        public void Dispose()
        {
            _notificationRegister.UnRegisterNotifications(_consoleNotificationWindow.Handle);
            _consoleNotificationWindow.Stop();

            _notificationRegister      = null;
            _consoleNotificationWindow = null;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public void Dispose()
        {
            _notificationRegister.UnRegisterNotifications(_consoleNotificationWindow.Handle);
            _consoleNotificationWindow.Stop();

            _notificationRegister = null;
            _consoleNotificationWindow = null;
        }