Пример #1
0
        public void ToggleConsoleWindow()
        {
            var response = new LauncherResponse()
            {
                Action = LauncherAction.ToggleConsole,
            };

            SendResponse(response);
        }
Пример #2
0
        private void UpdateActiveHandles()
        {
            var response = new LauncherResponse()
            {
                Action        = LauncherAction.UpdateHandles,
                ActiveHandles = GetActiveHandles().Select(h => h.ToInt64()).ToList(),
            };

            SendResponse(response);
        }
Пример #3
0
        public void SendLogToConsole(string message)
        {
            var response = new LauncherResponse()
            {
                Action  = LauncherAction.Log,
                Message = message,
            };

            SendResponse(response);
        }
Пример #4
0
        public void Quit()
        {
            var response = new LauncherResponse()
            {
                Action = LauncherAction.Quit,
            };

            SendResponse(response);

            CleanupAndExit();
        }
Пример #5
0
        public void Restart()
        {
            SaveState();
            var response = new LauncherResponse()
            {
                Action = LauncherAction.Restart,
            };

            SendResponse(response);

            CleanupAndExit();
        }
Пример #6
0
        private void HandleDisplaySettingsChanged(object sender, EventArgs e)
        {
            SaveState();
            var response = new LauncherResponse()
            {
                Action  = LauncherAction.RestartWithMessage,
                Message = "A display settings change has been detected, which has automatically disabled workspacer. Press 'restart' when ready.",
            };

            SendResponse(response);

            CleanupAndExit();
        }
Пример #7
0
        public void QuitWithException(Exception e)
        {
            var message  = e.ToString();
            var response = new LauncherResponse()
            {
                Action  = LauncherAction.QuitWithException,
                Message = message,
            };

            SendResponse(response);

            CleanupAndExit();
        }
Пример #8
0
        private void SendResponse(LauncherResponse response)
        {
            var str = JsonConvert.SerializeObject(response);

            _pipeServer.SendResponse(str);
        }