private bool CompileGame() { string projectFile = $@"{ProjectPath}\Empty.sln -flp:logfile=MyProjectOutput.log;verbosity=diagnostic"; string projectExe = $@"{ProjectPath}\Empty\bin\Debug\Empty.exe"; string strCmdText = $@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe {projectFile} -t:go -fl -flp:logfile=MyProjectOutput.log;verbosity=diagnostic"; try { File.Delete(projectExe); } catch { } var p = new Process(); p.StartInfo = new ProcessStartInfo(@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"); p.StartInfo.Arguments = string.Format(projectFile); p.Start(); p.WaitForExit(); try { Process.Start(projectExe); } catch { MessageBox.Show("An error is occuperd, please check your code!"); LogViewer logViewer = new LogViewer(); logViewer.Text = $"Log View for {ProjectPath}"; logViewer.Show(); return(false); } return(true); }
public static void Open() { var logViewer = new LogViewer(); logViewer.Show(); // Avoid the log viewer blocking the main window logViewer.Owner = null; logViewer.ShowInTaskbar = true; }
private void OpenIssues(object sender, RoutedEventArgs e) { MetroButton senderButton = (MetroButton)sender; AssemblyGenerationResult assemblyGenerationResult = (AssemblyGenerationResult)senderButton.Tag; LogViewer viewer = new LogViewer(); viewer.Log = assemblyGenerationResult.Log.LogData; viewer.Owner = App.MainWindow; viewer.Show(); }
private void OpenIssues(object sender, RoutedEventArgs e) { MetroButton senderButton = (MetroButton)sender; ImportTranslationResult importTranslationResult = (ImportTranslationResult)senderButton.Tag; string log = CreateLogFromResult(importTranslationResult.Log); LogViewer viewer = new LogViewer(); viewer.Title = StringUtils.String("ImportTranslationLogIssue", importTranslationResult.RelativeFileName); viewer.Log = log; viewer.Owner = App.MainWindow; viewer.Show(); }
public void ShowLogs(params Tuple <Log, string>[] logs) { if (!Application.Current.Dispatcher.CheckAccess()) { Application.Current.Dispatcher.Invoke(() => ShowLogs(logs)); return; // Important to leave the culprit thread } if (logs == null) { throw new ArgumentException("This method should only be called using an Log array"); } foreach (Tuple <Log, string> tup in logs) { var l = tup.Item1; var view = new LogViewer(l.vert, l.steps, tup.Item2); view.Show(); } }
public void ShowLog() { logView.Show(); }
public void InitializeButtonList(Form form) { Font font = new Font("Arial Narrow", 20.25F, FontStyle.Regular, GraphicsUnit.Point, 0); Button sendNotificationsButton = new Button { Font = font, Location = new Point(10, 12), Name = "sendNotificationsButton", Size = new Size(220, 42), Text = "Send &Notifications", UseVisualStyleBackColor = true }; sendNotificationsButton.Click += (sender, e) => { if (form is NotificationSender) { return; } notificationSender.Show(); notificationSender.Story2_Load(null, null); form.Hide(); }; form.Controls.Add(sendNotificationsButton); Button viewLogsButton = new Button { Font = font, Location = new Point(235, 12), Name = "viewLogsButton", Size = new Size(220, 42), Text = "&View Logs", UseVisualStyleBackColor = true }; viewLogsButton.Click += (sender, e) => { if (form is LogViewer) { return; } logViewer.Show(); form.Hide(); }; form.Controls.Add(viewLogsButton); if (account.Role == Role.Manager) { Button createTemplateButton = new Button { Font = font, Location = new Point(460, 12), Name = "generateTemplateButton", Size = new Size(220, 42), Text = "&Generate Template", UseVisualStyleBackColor = true }; createTemplateButton.Click += (sender, e) => { if (form is TemplateCreator) { return; } templateCreator.Show(); form.Hide(); }; form.Controls.Add(createTemplateButton); } Label nameLabel = new Label { Font = font, Location = account.Role == Role.Manager ? new Point(700, 16) : new Point(460, 16), Name = "nameLabel", Size = new Size(400, 42), Text = account.Role.ToString() + ", " + account.Name }; form.Controls.Add(nameLabel); }
private void ShowLogViewer() { LogViewer.Show("Log", GetLogPath(), this); }
private void ShowLogViewer() { LogViewer.Show("Log", GetLogPath(), Window.GetWindow(this)); }