Exemplo n.º 1
0
        private void init()
        {
            if (Options.CheckUpdateAtStartup)
            {
                AppUpdater.CheckForUpdates(true, dra =>
                {
                    bool is3DRunning = this.Is3DActive;
                    if (is3DRunning)
                    {
                        this.Dispatcher.Invoke(() =>
                        {
                            this.Is3DActive    = false;
                            this.isAboutOpened = true;
                        });
                    }
                    dra?.Invoke();
                    if (is3DRunning)
                    {
                        this.Dispatcher.Invoke(() =>
                        {
                            this.isAboutOpened = false;
                            if (App.Current != null)
                            {
                                this.Is3DActive = true;
                            }
                        });
                    }
                });
            }
            if (!Options.HideAboutOnStartup)
            {
                AboutWindow.Instance.ShowDialog();
            }

            this.keyboardHook          = new GlobalKeyboardHook();
            this.keyboardHook.KeyDown += KeyboardHook_KeyDown;

            this.cursorSbS = new CursorSbS();

            this.backgroundWindow = new BackgroundWindow();

            this.Is3DActive = true;

            this.threadUpdateWindows = new Thread(asyncUpdateWindows);
            this.threadUpdateWindows.IsBackground = true;
            this.threadUpdateWindows.Start();
        }
Exemplo n.º 2
0
        private void init()
        {
            this.keyboardHook          = new GlobalKeyboardHook();
            this.keyboardHook.KeyDown += KeyboardHook_KeyDown;

            this.cursorSbS = new CursorSbS();

            if (!Options.HideAboutOnStartup)
            {
                AboutWindow.Instance.Show();
            }
            else
            {
                this.Is3DActive = true;
            }


            this.threadUpdateWindows = new Thread(asyncUpdateWindows);
            this.threadUpdateWindows.IsBackground = true;
            this.threadUpdateWindows.Start();
        }