diff --git a/GUI/CrashReportForm.Designer.cs b/GUI/CrashForm.Designer.cs similarity index 97% rename from GUI/CrashReportForm.Designer.cs rename to GUI/CrashForm.Designer.cs index de9d7ed..638ff1c 100644 --- a/GUI/CrashReportForm.Designer.cs +++ b/GUI/CrashForm.Designer.cs @@ -36,7 +36,7 @@ */ namespace OpenHardwareMonitor.GUI { - partial class CrashReportForm { + partial class CrashForm { /// /// Required designer variable. /// diff --git a/GUI/CrashReportForm.cs b/GUI/CrashForm.cs similarity index 92% rename from GUI/CrashReportForm.cs rename to GUI/CrashForm.cs index 3a60816..8d7e011 100644 --- a/GUI/CrashReportForm.cs +++ b/GUI/CrashForm.cs @@ -46,11 +46,11 @@ using System.Web; using System.Windows.Forms; namespace OpenHardwareMonitor.GUI { - public partial class CrashReportForm : Form { + public partial class CrashForm : Form { private Exception exception; - public CrashReportForm() { + public CrashForm() { InitializeComponent(); } @@ -59,7 +59,7 @@ namespace OpenHardwareMonitor.GUI { set { exception = value; StringBuilder s = new StringBuilder(); - Version version = typeof(CrashReportForm).Assembly.GetName().Version; + Version version = typeof(CrashForm).Assembly.GetName().Version; s.Append("Version: "); s.AppendLine(version.ToString()); s.AppendLine(); s.AppendLine(exception.ToString()); @@ -80,7 +80,7 @@ namespace OpenHardwareMonitor.GUI { private void sendButton_Click(object sender, EventArgs e) { try { - Version version = typeof(CrashReportForm).Assembly.GetName().Version; + Version version = typeof(CrashForm).Assembly.GetName().Version; WebRequest request = WebRequest.Create( "http://openhardwaremonitor.org/report.php"); request.Method = "POST"; @@ -88,6 +88,7 @@ namespace OpenHardwareMonitor.GUI { request.ContentType = "application/x-www-form-urlencoded"; string report = + "type=crash&" + "version=" + HttpUtility.UrlEncode(version.ToString()) + "&" + "report=" + HttpUtility.UrlEncode(reportTextBox.Text) + "&" + "comment=" + HttpUtility.UrlEncode(commentTextBox.Text) + "&" + diff --git a/GUI/CrashReportForm.resx b/GUI/CrashForm.resx similarity index 100% rename from GUI/CrashReportForm.resx rename to GUI/CrashForm.resx diff --git a/GUI/MainForm.Designer.cs b/GUI/MainForm.Designer.cs index c583228..58296da 100644 --- a/GUI/MainForm.Designer.cs +++ b/GUI/MainForm.Designer.cs @@ -102,6 +102,8 @@ namespace OpenHardwareMonitor.GUI { this.sensorContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.timer = new System.Windows.Forms.Timer(this.components); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); + this.sumbitReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip.SuspendLayout(); this.splitContainer.Panel1.SuspendLayout(); this.splitContainer.Panel2.SuspendLayout(); @@ -227,6 +229,8 @@ namespace OpenHardwareMonitor.GUI { // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.saveReportToolStripMenuItem, + this.sumbitReportToolStripMenuItem, + this.toolStripMenuItem2, this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); @@ -235,14 +239,14 @@ namespace OpenHardwareMonitor.GUI { // saveReportToolStripMenuItem // this.saveReportToolStripMenuItem.Name = "saveReportToolStripMenuItem"; - this.saveReportToolStripMenuItem.Size = new System.Drawing.Size(145, 22); + this.saveReportToolStripMenuItem.Size = new System.Drawing.Size(159, 22); this.saveReportToolStripMenuItem.Text = "Save Report..."; this.saveReportToolStripMenuItem.Click += new System.EventHandler(this.saveReportToolStripMenuItem_Click); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(145, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(159, 22); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitClick); // @@ -296,7 +300,7 @@ namespace OpenHardwareMonitor.GUI { this.valueMenuItem.CheckOnClick = true; this.valueMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.valueMenuItem.Name = "valueMenuItem"; - this.valueMenuItem.Size = new System.Drawing.Size(152, 22); + this.valueMenuItem.Size = new System.Drawing.Size(103, 22); this.valueMenuItem.Text = "Value"; this.valueMenuItem.CheckedChanged += new System.EventHandler(this.valueMenuItem_CheckedChanged); // @@ -306,7 +310,7 @@ namespace OpenHardwareMonitor.GUI { this.minMenuItem.CheckOnClick = true; this.minMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.minMenuItem.Name = "minMenuItem"; - this.minMenuItem.Size = new System.Drawing.Size(152, 22); + this.minMenuItem.Size = new System.Drawing.Size(103, 22); this.minMenuItem.Text = "Min"; this.minMenuItem.CheckedChanged += new System.EventHandler(this.minMenuItem_CheckedChanged); // @@ -316,7 +320,7 @@ namespace OpenHardwareMonitor.GUI { this.maxMenuItem.CheckOnClick = true; this.maxMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.maxMenuItem.Name = "maxMenuItem"; - this.maxMenuItem.Size = new System.Drawing.Size(152, 22); + this.maxMenuItem.Size = new System.Drawing.Size(103, 22); this.maxMenuItem.Text = "Max"; this.maxMenuItem.CheckedChanged += new System.EventHandler(this.maxMenuItem_CheckedChanged); // @@ -460,6 +464,18 @@ namespace OpenHardwareMonitor.GUI { this.timer.Interval = 1000; this.timer.Tick += new System.EventHandler(this.timer_Tick); // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(156, 6); + // + // sumbitReportToolStripMenuItem + // + this.sumbitReportToolStripMenuItem.Name = "sumbitReportToolStripMenuItem"; + this.sumbitReportToolStripMenuItem.Size = new System.Drawing.Size(159, 22); + this.sumbitReportToolStripMenuItem.Text = "Submit Report..."; + this.sumbitReportToolStripMenuItem.Click += new System.EventHandler(this.sumbitReportToolStripMenuItem_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -525,6 +541,8 @@ namespace OpenHardwareMonitor.GUI { private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4; private System.Windows.Forms.ToolStripMenuItem celciusToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fahrenheitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem sumbitReportToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2; } } diff --git a/GUI/MainForm.cs b/GUI/MainForm.cs index a24d056..f933b96 100644 --- a/GUI/MainForm.cs +++ b/GUI/MainForm.cs @@ -455,5 +455,12 @@ namespace OpenHardwareMonitor.GUI { fahrenheitToolStripMenuItem.Checked = true; UnitManager.TemperatureUnit = TemperatureUnit.Fahrenheit; } + + private void sumbitReportToolStripMenuItem_Click(object sender, EventArgs e) + { + ReportForm form = new ReportForm(); + form.Report = computer.GetReport(); + form.ShowDialog(); + } } } diff --git a/GUI/ReportForm.Designer.cs b/GUI/ReportForm.Designer.cs new file mode 100644 index 0000000..bb165f8 --- /dev/null +++ b/GUI/ReportForm.Designer.cs @@ -0,0 +1,273 @@ +/* + + Version: MPL 1.1/GPL 2.0/LGPL 2.1 + + The contents of this file are subject to the Mozilla Public License Version + 1.1 (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the License. + + The Original Code is the Open Hardware Monitor code. + + The Initial Developer of the Original Code is + Michael Möller . + Portions created by the Initial Developer are Copyright (C) 2009-2010 + the Initial Developer. All Rights Reserved. + + Contributor(s): + + Alternatively, the contents of this file may be used under the terms of + either the GNU General Public License Version 2 or later (the "GPL"), or + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + in which case the provisions of the GPL or the LGPL are applicable instead + of those above. If you wish to allow use of your version of this file only + under the terms of either the GPL or the LGPL, and not to allow others to + use your version of this file under the terms of the MPL, indicate your + decision by deleting the provisions above and replace them with the notice + and other provisions required by the GPL or the LGPL. If you do not delete + the provisions above, a recipient may use your version of this file under + the terms of any one of the MPL, the GPL or the LGPL. + +*/ + +namespace OpenHardwareMonitor.GUI { + partial class ReportForm { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.sendButton = new System.Windows.Forms.Button(); + this.exitButton = new System.Windows.Forms.Button(); + this.commentTextBox = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.commentPanel = new System.Windows.Forms.Panel(); + this.reportPanel = new System.Windows.Forms.Panel(); + this.reportTextBox = new System.Windows.Forms.TextBox(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.emailTextBox = new System.Windows.Forms.TextBox(); + this.titleLabel = new System.Windows.Forms.Label(); + this.commentPanel.SuspendLayout(); + this.reportPanel.SuspendLayout(); + this.SuspendLayout(); + // + // sendButton + // + this.sendButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.sendButton.Location = new System.Drawing.Point(472, 627); + this.sendButton.Name = "sendButton"; + this.sendButton.Size = new System.Drawing.Size(75, 23); + this.sendButton.TabIndex = 2; + this.sendButton.Text = "Send"; + this.sendButton.UseVisualStyleBackColor = true; + this.sendButton.Click += new System.EventHandler(this.sendButton_Click); + // + // exitButton + // + this.exitButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.exitButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.exitButton.Location = new System.Drawing.Point(553, 627); + this.exitButton.Name = "exitButton"; + this.exitButton.Size = new System.Drawing.Size(75, 23); + this.exitButton.TabIndex = 3; + this.exitButton.Text = "Canel"; + this.exitButton.UseVisualStyleBackColor = true; + // + // commentTextBox + // + this.commentTextBox.AcceptsReturn = true; + this.commentTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.commentTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.commentTextBox.Location = new System.Drawing.Point(4, 4); + this.commentTextBox.Multiline = true; + this.commentTextBox.Name = "commentTextBox"; + this.commentTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.commentTextBox.Size = new System.Drawing.Size(609, 77); + this.commentTextBox.TabIndex = 1; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label3.AutoEllipsis = true; + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(9, 39); + this.label3.Margin = new System.Windows.Forms.Padding(3, 12, 3, 8); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(253, 13); + this.label3.TabIndex = 5; + this.label3.Text = "The following report has been created automatically:"; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.AutoEllipsis = true; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(9, 505); + this.label1.Margin = new System.Windows.Forms.Padding(3, 12, 3, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(279, 13); + this.label1.TabIndex = 6; + this.label1.Text = "You can add additional information to the report (optional):"; + // + // commentPanel + // + this.commentPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.commentPanel.BackColor = System.Drawing.SystemColors.Window; + this.commentPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.commentPanel.Controls.Add(this.commentTextBox); + this.commentPanel.Location = new System.Drawing.Point(12, 529); + this.commentPanel.Margin = new System.Windows.Forms.Padding(3, 3, 3, 8); + this.commentPanel.Name = "commentPanel"; + this.commentPanel.Padding = new System.Windows.Forms.Padding(4, 4, 1, 4); + this.commentPanel.Size = new System.Drawing.Size(616, 87); + this.commentPanel.TabIndex = 1; + this.commentPanel.TabStop = true; + // + // reportPanel + // + this.reportPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.reportPanel.BackColor = System.Drawing.SystemColors.Window; + this.reportPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.reportPanel.Controls.Add(this.reportTextBox); + this.reportPanel.Controls.Add(this.textBox1); + this.reportPanel.Location = new System.Drawing.Point(12, 63); + this.reportPanel.Name = "reportPanel"; + this.reportPanel.Padding = new System.Windows.Forms.Padding(4, 4, 1, 4); + this.reportPanel.Size = new System.Drawing.Size(616, 394); + this.reportPanel.TabIndex = 8; + // + // reportTextBox + // + this.reportTextBox.BackColor = System.Drawing.SystemColors.Window; + this.reportTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.reportTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.reportTextBox.Location = new System.Drawing.Point(4, 4); + this.reportTextBox.Multiline = true; + this.reportTextBox.Name = "reportTextBox"; + this.reportTextBox.ReadOnly = true; + this.reportTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.reportTextBox.Size = new System.Drawing.Size(609, 384); + this.reportTextBox.TabIndex = 9; + this.reportTextBox.TabStop = false; + // + // textBox1 + // + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBox1.Location = new System.Drawing.Point(4, 4); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(609, 384); + this.textBox1.TabIndex = 2; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoEllipsis = true; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 476); + this.label2.Margin = new System.Windows.Forms.Padding(3, 12, 3, 8); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(171, 13); + this.label2.TabIndex = 9; + this.label2.Text = "Enter your email address (optional):"; + // + // emailTextBox + // + this.emailTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.emailTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.emailTextBox.Location = new System.Drawing.Point(188, 473); + this.emailTextBox.Name = "emailTextBox"; + this.emailTextBox.Size = new System.Drawing.Size(440, 20); + this.emailTextBox.TabIndex = 0; + // + // titleLabel + // + this.titleLabel.AutoSize = true; + this.titleLabel.Location = new System.Drawing.Point(9, 14); + this.titleLabel.Name = "titleLabel"; + this.titleLabel.Size = new System.Drawing.Size(409, 13); + this.titleLabel.TabIndex = 10; + this.titleLabel.Text = "Help improve the Open Hardware Monitor by submitting a report about your hardware" + + "."; + // + // ReportForm + // + this.AcceptButton = this.sendButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.exitButton; + this.ClientSize = new System.Drawing.Size(640, 662); + this.ControlBox = false; + this.Controls.Add(this.titleLabel); + this.Controls.Add(this.emailTextBox); + this.Controls.Add(this.label2); + this.Controls.Add(this.reportPanel); + this.Controls.Add(this.commentPanel); + this.Controls.Add(this.label1); + this.Controls.Add(this.label3); + this.Controls.Add(this.exitButton); + this.Controls.Add(this.sendButton); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ReportForm"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Open Hardware Monitor"; + this.commentPanel.ResumeLayout(false); + this.commentPanel.PerformLayout(); + this.reportPanel.ResumeLayout(false); + this.reportPanel.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button sendButton; + private System.Windows.Forms.Button exitButton; + private System.Windows.Forms.TextBox commentTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel commentPanel; + private System.Windows.Forms.Panel reportPanel; + private System.Windows.Forms.TextBox reportTextBox; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox emailTextBox; + private System.Windows.Forms.Label titleLabel; + } +} \ No newline at end of file diff --git a/GUI/ReportForm.cs b/GUI/ReportForm.cs new file mode 100644 index 0000000..fd3a7b1 --- /dev/null +++ b/GUI/ReportForm.cs @@ -0,0 +1,107 @@ +/* + + Version: MPL 1.1/GPL 2.0/LGPL 2.1 + + The contents of this file are subject to the Mozilla Public License Version + 1.1 (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the License. + + The Original Code is the Open Hardware Monitor code. + + The Initial Developer of the Original Code is + Michael Möller . + Portions created by the Initial Developer are Copyright (C) 2009-2010 + the Initial Developer. All Rights Reserved. + + Contributor(s): + + Alternatively, the contents of this file may be used under the terms of + either the GNU General Public License Version 2 or later (the "GPL"), or + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + in which case the provisions of the GPL or the LGPL are applicable instead + of those above. If you wish to allow use of your version of this file only + under the terms of either the GPL or the LGPL, and not to allow others to + use your version of this file under the terms of the MPL, indicate your + decision by deleting the provisions above and replace them with the notice + and other provisions required by the GPL or the LGPL. If you do not delete + the provisions above, a recipient may use your version of this file under + the terms of any one of the MPL, the GPL or the LGPL. + +*/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.IO; +using System.Net; +using System.Text; +using System.Web; +using System.Windows.Forms; + +namespace OpenHardwareMonitor.GUI { + public partial class ReportForm : Form { + + private string report; + + public ReportForm() { + InitializeComponent(); + try { + titleLabel.Font = new Font(SystemFonts.DefaultFont, FontStyle.Bold); + reportTextBox.Font = new Font(FontFamily.GenericMonospace, + SystemFonts.DefaultFont.Size); + } catch { } + } + + public string Report { + get { return report; } + set { + report = value; + reportTextBox.Text = report; + } + } + + private void sendButton_Click(object sender, EventArgs e) { + Version version = typeof(CrashForm).Assembly.GetName().Version; + WebRequest request = WebRequest.Create( + "http://openhardwaremonitor.org/report.php"); + request.Method = "POST"; + request.Timeout = 5000; + request.ContentType = "application/x-www-form-urlencoded"; + + string report = + "type=hardware&" + + "version=" + HttpUtility.UrlEncode(version.ToString()) + "&" + + "report=" + HttpUtility.UrlEncode(reportTextBox.Text) + "&" + + "comment=" + HttpUtility.UrlEncode(commentTextBox.Text) + "&" + + "email=" + HttpUtility.UrlEncode(emailTextBox.Text); + byte[] byteArray = Encoding.UTF8.GetBytes(report); + request.ContentLength = byteArray.Length; + + try { + Stream dataStream = request.GetRequestStream(); + dataStream.Write(byteArray, 0, byteArray.Length); + dataStream.Close(); + + WebResponse response = request.GetResponse(); + dataStream = response.GetResponseStream(); + StreamReader reader = new StreamReader(dataStream); + string responseFromServer = reader.ReadToEnd(); + reader.Close(); + dataStream.Close(); + response.Close(); + + Close(); + } catch (WebException) { + MessageBox.Show("Sending the hardware report failed.", "Error", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } +} diff --git a/GUI/ReportForm.resx b/GUI/ReportForm.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/GUI/ReportForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/OpenHardwareMonitor.csproj b/OpenHardwareMonitor.csproj index 996940e..a2c10da 100644 --- a/OpenHardwareMonitor.csproj +++ b/OpenHardwareMonitor.csproj @@ -61,11 +61,17 @@ - + Form - - CrashReportForm.cs + + ReportForm.cs + + + Form + + + CrashForm.cs @@ -200,12 +206,15 @@ - - CrashReportForm.cs + + CrashForm.cs + + ReportForm.cs + diff --git a/Program.cs b/Program.cs index 0cec8c0..fffe047 100644 --- a/Program.cs +++ b/Program.cs @@ -102,7 +102,7 @@ namespace OpenHardwareMonitor { } private static void ReportException(Exception e) { - CrashReportForm form = new CrashReportForm(); + CrashForm form = new CrashForm(); form.Exception = e; form.ShowDialog(); }