Exemplo n.º 1
0
        public bool Initialize()
        {
            logger.Debug("SystemManager::Initialize() " + Initialized);
            if (!Initialized)
            {
                try
                {
                    SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;
                    SystemEvents.SessionSwitch          += SystemEvents_SessionSwitch;

                    notifyWindow = new NotifyWindow(this);

                    notifyWindow.CreateWindow();

                    var hWnd = notifyWindow.Handle;
                    Debug.Assert(hWnd != IntPtr.Zero, "hWnd != IntPtr.Zero");

                    RegisterNotification(hWnd, UsbCategory.VideoCamera);

                    RegisterNotification(hWnd, UsbCategory.Audio);

                    Initialized = true;
                }
                catch (Exception ex)
                {
                    logger.Error(ex.Message);
                    Shutdown();
                }
            }

            return(Initialized);
        }
Exemplo n.º 2
0
        public void Init()
        {
            if (nativeWindow == null)
            {
                nativeWindow = new NotifyWindow(this);
                nativeWindow.CreateWindow();
            }

            if (ShowMainWindowMessage == 0)
            {
                ShowMainWindowMessage = NativeMethods.RegisterWindowMessage(SHOW_POLYWALL_STREAMER_MAIN_WINDOW);
            }
        }
Exemplo n.º 3
0
        public bool Init()
        {
            logger.Debug("WTSSessionManager::Init()");

            if (nativeWindow == null)
            {
                nativeWindow = new NotifyWindow(this);
                nativeWindow.CreateWindow();
            }

            var hWnd = nativeWindow.Handle;

            return(RegisterNotification(hWnd));
        }
Exemplo n.º 4
0
        public bool Init(Guid classGuid)
        {
            logger.Debug("UsbDeviceManager::Init()");

            if (nativeWindow == null)
            {
                nativeWindow = new NotifyWindow(this);
                nativeWindow.CreateWindow();
            }

            var hWnd = nativeWindow.Handle;

            var handle = RegisterNotification(hWnd, classGuid);

            return(handle != IntPtr.Zero);
        }