Example #1
0
        private void StartUI()
        {
            window = new MainWindow();
            window.MainWindowHideEvent         += HandleMainWindowHideEvent;
            window.NodeMessageEvent            += HandleNodeMessageEvent;
            window.buttonVersion.Content = "v" + Version;
            window.gridProgress.Visibility = Visibility.Visible;
            window.Show();

            trayIcon = new TrayIconController();
            trayIcon.MainWindowHideEvent += HandleMainWindowHideEvent;
            trayIcon.MainWindowShowEvent += HandleMainWindowShowEvent;
            trayIcon.MainWindowToggleEvent  += HandleMainWindowToggleEvent;

            // has to be done before launching Node
            BeginExtractBundledResources(Application_ContinueStartupAfterExtraction);
        }
Example #2
0
 public void RestartBackend()
 {
     window.Hide();
     window = null;
     rpcRoot = null;
     nodeFoo.Dispose();
     nodeFoo = null;
     trayIcon.Dispose();
     trayIcon = null;
     StartUI();
 }