Exemplo n.º 1
0
        public void Execute()
        {
            Helpers.AssertOnUiThread();
            var viewer = new LogViewer(string.Join("\n", Log.History.Select(l => l.ToString())));

            viewer.ShowDialog();
        }
Exemplo n.º 2
0
        private void OnLogViewer(object sender, EventArgs e)
        {
            LogViewer logViewer = new LogViewer();

            logViewer.ShowDialog();
            logViewer.Close();
            logViewer.Dispose();
        }
Exemplo n.º 3
0
        private void ShowLogViewer()
        {
            ILogReader         reader = LoggerFactory.MakeTextReader(_logWriter.Path);
            LogViewerViewModel vm     = new LogViewerViewModel(reader);
            LogViewer          viewer = new LogViewer();

            viewer.DataContext = vm;
            viewer.ShowDialog();
        }
Exemplo n.º 4
0
        private void ExecuteOpenLogCommand(bool isStartScript)
        {
            LogViewerViewModel vm = new LogViewerViewModel();

            if (isStartScript)
            {
                vm.Log        = LastStartScriptExecutionStatus.Log;
                vm.Title      = "Last StartScript execution log";
                vm.WasSuccess = LastStartScriptExecutionStatus.WasSuccess;
            }
            else
            {
                vm.Log        = LastStopScriptExecutionStatus.Log;
                vm.Title      = "Last StopScript execution log";
                vm.WasSuccess = LastStopScriptExecutionStatus.WasSuccess;
            }

            var window = new LogViewer();

            window.DataContext = vm;
            window.ShowDialog();
        }