Bugfix and Asrock B450 Mainboards (#139)

Bugfix: Parameter Form data binding is not working
Asrock B450 Mainboards
This commit is contained in:
sebastian-dev
2019-10-01 14:28:42 +02:00
committed by Phyxion
parent 61454e1ae2
commit 963ab50dda
9 changed files with 793 additions and 730 deletions
+61 -61
View File
@@ -1,38 +1,38 @@
/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2009-2017 Michael Möller <mmoeller@openhardwaremonitor.org>
*/
// Mozilla Public License 2.0
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyright (C) LibreHardwareMonitor and Contributors
// All Rights Reserved
namespace LibreHardwareMonitor.UI {
sealed partial class AboutBox {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
namespace LibreHardwareMonitor.UI
{
sealed partial class AboutBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
this.okButton = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
@@ -44,9 +44,9 @@ namespace LibreHardwareMonitor.UI {
this.licenseLinkLabel = new System.Windows.Forms.LinkLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
//
// okButton
//
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(269, 79);
@@ -55,9 +55,9 @@ namespace LibreHardwareMonitor.UI {
this.okButton.TabIndex = 0;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
//
//
// pictureBox1
//
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(10, 11);
this.pictureBox1.Name = "pictureBox1";
@@ -65,9 +65,9 @@ namespace LibreHardwareMonitor.UI {
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(74, 12);
this.label1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
@@ -75,9 +75,9 @@ namespace LibreHardwareMonitor.UI {
this.label1.Size = new System.Drawing.Size(117, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Libre Hardware Monitor";
//
//
// label2
//
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(74, 46);
this.label2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
@@ -85,9 +85,9 @@ namespace LibreHardwareMonitor.UI {
this.label2.Size = new System.Drawing.Size(250, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Copyright © LibreHardwareMonitor and Contributors";
//
//
// label3
//
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(74, 29);
this.label3.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
@@ -95,9 +95,9 @@ namespace LibreHardwareMonitor.UI {
this.label3.Size = new System.Drawing.Size(127, 13);
this.label3.TabIndex = 4;
this.label3.Text = "Version 9.0.30729.1 Beta";
//
//
// projectLinkLabel
//
//
this.projectLinkLabel.AutoSize = true;
this.projectLinkLabel.Location = new System.Drawing.Point(164, 80);
this.projectLinkLabel.Margin = new System.Windows.Forms.Padding(0);
@@ -107,9 +107,9 @@ namespace LibreHardwareMonitor.UI {
this.projectLinkLabel.TabStop = true;
this.projectLinkLabel.Text = "Project Website";
this.projectLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel_LinkClicked);
//
//
// flowLayoutPanel1
//
//
this.flowLayoutPanel1.AutoSize = true;
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel1.Location = new System.Drawing.Point(10, 100);
@@ -117,9 +117,9 @@ namespace LibreHardwareMonitor.UI {
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(0, 0);
this.flowLayoutPanel1.TabIndex = 8;
//
//
// licenseLinkLabel
//
//
this.licenseLinkLabel.AutoSize = true;
this.licenseLinkLabel.Location = new System.Drawing.Point(25, 80);
this.licenseLinkLabel.Margin = new System.Windows.Forms.Padding(0);
@@ -129,9 +129,9 @@ namespace LibreHardwareMonitor.UI {
this.licenseLinkLabel.TabStop = true;
this.licenseLinkLabel.Text = "Licensing Information";
this.licenseLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel_LinkClicked);
//
//
// AboutBox
//
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
@@ -156,17 +156,17 @@ namespace LibreHardwareMonitor.UI {
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.LinkLabel projectLinkLabel;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.LinkLabel licenseLinkLabel;
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.LinkLabel projectLinkLabel;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.LinkLabel licenseLinkLabel;
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ namespace LibreHardwareMonitor.UI
projectLinkLabel.Links.Remove(projectLinkLabel.Links[0]);
projectLinkLabel.Links.Add(0, projectLinkLabel.Text.Length, "https://github.com/LibreHardwareMonitor/LibreHardwareMonitor");
licenseLinkLabel.Links.Remove(licenseLinkLabel.Links[0]);
licenseLinkLabel.Links.Add(0, licenseLinkLabel.Text.Length, "https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/blob/master/LICENSE");
licenseLinkLabel.Links.Add(0, licenseLinkLabel.Text.Length, "https://www.mozilla.org/en-US/MPL/2.0/");
}
private void LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
File diff suppressed because it is too large Load Diff
+192 -191
View File
@@ -1,200 +1,201 @@
/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2009-2010 Michael Möller <mmoeller@openhardwaremonitor.org>
*/
// Mozilla Public License 2.0
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyright (C) LibreHardwareMonitor and Contributors
// All Rights Reserved
namespace LibreHardwareMonitor.UI {
partial class ParameterForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
namespace LibreHardwareMonitor.UI
{
partial class ParameterForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.captionLabel = new System.Windows.Forms.Label();
this.dataGridView = new System.Windows.Forms.DataGridView();
this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Default = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.ValueColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
this.descriptionLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
this.SuspendLayout();
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(186, 213);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 2;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButton_Click);
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(267, 213);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 3;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
//
// captionLabel
//
this.captionLabel.AutoSize = true;
this.captionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.captionLabel.Location = new System.Drawing.Point(12, 9);
this.captionLabel.Name = "captionLabel";
this.captionLabel.Size = new System.Drawing.Size(80, 13);
this.captionLabel.TabIndex = 4;
this.captionLabel.Text = "captionLabel";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.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.dataGridView.AutoGenerateColumns = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.captionLabel = new System.Windows.Forms.Label();
this.dataGridView = new System.Windows.Forms.DataGridView();
this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Default = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.ValueColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
this.descriptionLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
this.SuspendLayout();
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(186, 213);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 2;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButton_Click);
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(267, 213);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 3;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
//
// captionLabel
//
this.captionLabel.AutoSize = true;
this.captionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.captionLabel.Location = new System.Drawing.Point(12, 9);
this.captionLabel.Name = "captionLabel";
this.captionLabel.Size = new System.Drawing.Size(80, 13);
this.captionLabel.TabIndex = 4;
this.captionLabel.Text = "captionLabel";
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.AllowUserToDeleteRows = false;
this.dataGridView.AllowUserToResizeRows = false;
this.dataGridView.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.dataGridView.AutoGenerateColumns = false;
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.NameColumn,
this.Default,
this.ValueColumn});
this.dataGridView.DataSource = this.bindingSource;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView.DefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView.Location = new System.Drawing.Point(15, 30);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.ShowRowErrors = false;
this.dataGridView.Size = new System.Drawing.Size(327, 121);
this.dataGridView.TabIndex = 0;
this.dataGridView.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_RowEnter);
this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.DataGridView_CellValidating);
this.dataGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellEndEdit);
this.dataGridView.CurrentCellDirtyStateChanged += new System.EventHandler(this.DataGridView_CurrentCellDirtyStateChanged);
//
// NameColumn
//
this.NameColumn.DataPropertyName = "Name";
this.NameColumn.HeaderText = "Name";
this.NameColumn.Name = "NameColumn";
this.NameColumn.ReadOnly = true;
this.NameColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Default
//
this.Default.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
this.Default.DataPropertyName = "Default";
this.Default.HeaderText = "Default";
this.Default.Name = "Default";
this.Default.Width = 47;
//
// ValueColumn
//
this.ValueColumn.DataPropertyName = "Value";
this.ValueColumn.HeaderText = "Value";
this.ValueColumn.Name = "ValueColumn";
this.ValueColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// bindingSource
//
this.bindingSource.AllowNew = false;
//
// descriptionLabel
//
this.descriptionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.descriptionLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.descriptionLabel.Location = new System.Drawing.Point(15, 154);
this.descriptionLabel.Name = "descriptionLabel";
this.descriptionLabel.Padding = new System.Windows.Forms.Padding(2);
this.descriptionLabel.Size = new System.Drawing.Size(327, 50);
this.descriptionLabel.TabIndex = 6;
this.descriptionLabel.Text = "descriptionLabel";
//
// ParameterForm
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(354, 248);
this.Controls.Add(this.descriptionLabel);
this.Controls.Add(this.dataGridView);
this.Controls.Add(this.captionLabel);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ParameterForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Parameters";
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.dataGridView.DataSource = this.bindingSource;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView.Location = new System.Drawing.Point(15, 30);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.ShowRowErrors = false;
this.dataGridView.Size = new System.Drawing.Size(327, 121);
this.dataGridView.TabIndex = 0;
this.dataGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellEndEdit);
this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.DataGridView_CellValidating);
this.dataGridView.CurrentCellDirtyStateChanged += new System.EventHandler(this.DataGridView_CurrentCellDirtyStateChanged);
this.dataGridView.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_RowEnter);
//
// NameColumn
//
this.NameColumn.DataPropertyName = "Name";
this.NameColumn.HeaderText = "Name";
this.NameColumn.Name = "NameColumn";
this.NameColumn.ReadOnly = true;
this.NameColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Default
//
this.Default.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
this.Default.DataPropertyName = "Default";
this.Default.HeaderText = "Default";
this.Default.Name = "Default";
this.Default.Width = 47;
//
// ValueColumn
//
this.ValueColumn.DataPropertyName = "Value";
this.ValueColumn.HeaderText = "Value";
this.ValueColumn.Name = "ValueColumn";
this.ValueColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// bindingSource
//
this.bindingSource.AllowNew = false;
//
// descriptionLabel
//
this.descriptionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.descriptionLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.descriptionLabel.Location = new System.Drawing.Point(15, 154);
this.descriptionLabel.Name = "descriptionLabel";
this.descriptionLabel.Padding = new System.Windows.Forms.Padding(2);
this.descriptionLabel.Size = new System.Drawing.Size(327, 50);
this.descriptionLabel.TabIndex = 6;
this.descriptionLabel.Text = "descriptionLabel";
//
// ParameterForm
//
this.AcceptButton = this.okButton;
this.AccessibleName = "";
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(354, 248);
this.Controls.Add(this.descriptionLabel);
this.Controls.Add(this.dataGridView);
this.Controls.Add(this.captionLabel);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ParameterForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Parameters";
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
public System.Windows.Forms.Label captionLabel;
private System.Windows.Forms.DataGridView dataGridView;
private System.Windows.Forms.Label descriptionLabel;
private System.Windows.Forms.BindingSource bindingSource;
private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn;
private System.Windows.Forms.DataGridViewCheckBoxColumn Default;
private System.Windows.Forms.DataGridViewTextBoxColumn ValueColumn;
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
public System.Windows.Forms.Label captionLabel;
private System.Windows.Forms.DataGridView dataGridView;
private System.Windows.Forms.Label descriptionLabel;
private System.Windows.Forms.BindingSource bindingSource;
private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn;
private System.Windows.Forms.DataGridViewCheckBoxColumn Default;
private System.Windows.Forms.DataGridViewTextBoxColumn ValueColumn;
}
}
}
+38 -2
View File
@@ -33,7 +33,9 @@ namespace LibreHardwareMonitor.UI
_parameterRows = new BindingList<ParameterRow>();
foreach (IParameter parameter in _parameters)
{
_parameterRows.Add(new ParameterRow(parameter));
}
bindingSource.DataSource = _parameterRows;
}
@@ -42,9 +44,17 @@ namespace LibreHardwareMonitor.UI
private class ParameterRow : INotifyPropertyChanged
{
public readonly IParameter Parameter;
private float _value = float.NaN;
private bool _default = true;
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String propertyName)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
public ParameterRow(IParameter parameter)
{
Parameter = parameter;
@@ -52,9 +62,35 @@ namespace LibreHardwareMonitor.UI
Default = parameter.IsDefault;
}
public float Value { get; }
public string Name
{
get { return Parameter.Name; }
}
public bool Default { get; }
public float Value
{
get { return _value; }
set
{
_default = false;
_value = value;
NotifyPropertyChanged(nameof(Default));
NotifyPropertyChanged(nameof(Value));
}
}
public bool Default
{
get { return _default; }
set
{
_default = value;
if (_default)
_value = Parameter.DefaultValue;
NotifyPropertyChanged(nameof(Default));
NotifyPropertyChanged(nameof(Value));
}
}
}
private void DataGridView_RowEnter(object sender, DataGridViewCellEventArgs e)
+173 -163
View File
@@ -1,180 +1,190 @@
namespace LibreHardwareMonitor.UI {
partial class PortForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
// Mozilla Public License 2.0
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyright (C) LibreHardwareMonitor and Contributors
// All Rights Reserved
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
namespace LibreHardwareMonitor.UI
{
partial class PortForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
#region Windows Form Designer generated code
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.portOKButton = new System.Windows.Forms.Button();
this.portCancelButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.webServerLinkLabel = new System.Windows.Forms.LinkLabel();
this.portNumericUpDn = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.portNumericUpDn)).BeginInit();
this.SuspendLayout();
//
// portOKButton
//
this.portOKButton.Location = new System.Drawing.Point(244, 137);
this.portOKButton.Name = "portOKButton";
this.portOKButton.Size = new System.Drawing.Size(75, 23);
this.portOKButton.TabIndex = 0;
this.portOKButton.Text = "OK";
this.portOKButton.UseVisualStyleBackColor = true;
this.portOKButton.Click += new System.EventHandler(this.PortOKButton_Click);
//
// portCancelButton
//
this.portCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.portCancelButton.Location = new System.Drawing.Point(162, 137);
this.portCancelButton.Name = "portCancelButton";
this.portCancelButton.Size = new System.Drawing.Size(75, 23);
this.portCancelButton.TabIndex = 1;
this.portCancelButton.Text = "Cancel";
this.portCancelButton.UseVisualStyleBackColor = true;
this.portCancelButton.Click += new System.EventHandler(this.PortCancelButton_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 106);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(377, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Note: You will need to open the port in firewall settings of the operating system" +
".";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(193, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Port number for the remote web server:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 39);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(443, 13);
this.label3.TabIndex = 5;
this.label3.Text = "If the web server is running then it will need to be restarted for the port chang" +
"e to take effect.";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(13, 62);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(262, 13);
this.label4.TabIndex = 6;
this.label4.Text = "The web server will be accessible from the browser at ";
//
// webServerLinkLabel
//
this.webServerLinkLabel.AutoSize = true;
this.webServerLinkLabel.Location = new System.Drawing.Point(269, 62);
this.webServerLinkLabel.Name = "webServerLinkLabel";
this.webServerLinkLabel.Size = new System.Drawing.Size(55, 13);
this.webServerLinkLabel.TabIndex = 7;
this.webServerLinkLabel.TabStop = true;
this.webServerLinkLabel.Text = "linkLabel1";
this.webServerLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.WebServerLinkLabel_LinkClicked);
//
// portNumericUpDn
//
this.portNumericUpDn.Location = new System.Drawing.Point(208, 7);
this.portNumericUpDn.Maximum = new decimal(new int[] {
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.portOKButton = new System.Windows.Forms.Button();
this.portCancelButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.webServerLinkLabel = new System.Windows.Forms.LinkLabel();
this.portNumericUpDn = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.portNumericUpDn)).BeginInit();
this.SuspendLayout();
//
// portOKButton
//
this.portOKButton.Location = new System.Drawing.Point(244, 137);
this.portOKButton.Name = "portOKButton";
this.portOKButton.Size = new System.Drawing.Size(75, 23);
this.portOKButton.TabIndex = 0;
this.portOKButton.Text = "OK";
this.portOKButton.UseVisualStyleBackColor = true;
this.portOKButton.Click += new System.EventHandler(this.PortOKButton_Click);
//
// portCancelButton
//
this.portCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.portCancelButton.Location = new System.Drawing.Point(162, 137);
this.portCancelButton.Name = "portCancelButton";
this.portCancelButton.Size = new System.Drawing.Size(75, 23);
this.portCancelButton.TabIndex = 1;
this.portCancelButton.Text = "Cancel";
this.portCancelButton.UseVisualStyleBackColor = true;
this.portCancelButton.Click += new System.EventHandler(this.PortCancelButton_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 106);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(377, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Note: You will need to open the port in firewall settings of the operating system" +
".";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(193, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Port number for the remote web server:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 39);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(443, 13);
this.label3.TabIndex = 5;
this.label3.Text = "If the web server is running then it will need to be restarted for the port chang" +
"e to take effect.";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(13, 62);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(262, 13);
this.label4.TabIndex = 6;
this.label4.Text = "The web server will be accessible from the browser at ";
//
// webServerLinkLabel
//
this.webServerLinkLabel.AutoSize = true;
this.webServerLinkLabel.Location = new System.Drawing.Point(269, 62);
this.webServerLinkLabel.Name = "webServerLinkLabel";
this.webServerLinkLabel.Size = new System.Drawing.Size(55, 13);
this.webServerLinkLabel.TabIndex = 7;
this.webServerLinkLabel.TabStop = true;
this.webServerLinkLabel.Text = "linkLabel1";
this.webServerLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.WebServerLinkLabel_LinkClicked);
//
// portNumericUpDn
//
this.portNumericUpDn.Location = new System.Drawing.Point(208, 7);
this.portNumericUpDn.Maximum = new decimal(new int[] {
20000,
0,
0,
0});
this.portNumericUpDn.Minimum = new decimal(new int[] {
this.portNumericUpDn.Minimum = new decimal(new int[] {
8080,
0,
0,
0});
this.portNumericUpDn.Name = "portNumericUpDn";
this.portNumericUpDn.Size = new System.Drawing.Size(75, 20);
this.portNumericUpDn.TabIndex = 8;
this.portNumericUpDn.Value = new decimal(new int[] {
this.portNumericUpDn.Name = "portNumericUpDn";
this.portNumericUpDn.Size = new System.Drawing.Size(75, 20);
this.portNumericUpDn.TabIndex = 8;
this.portNumericUpDn.Value = new decimal(new int[] {
8080,
0,
0,
0});
this.portNumericUpDn.ValueChanged += new System.EventHandler(this.PortNumericUpDn_ValueChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(13, 84);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(304, 13);
this.label5.TabIndex = 9;
this.label5.Text = "You will have to start the server by clicking Run from the menu.";
//
// PortForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.portCancelButton;
this.ClientSize = new System.Drawing.Size(466, 170);
this.Controls.Add(this.label5);
this.Controls.Add(this.portNumericUpDn);
this.Controls.Add(this.webServerLinkLabel);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.portCancelButton);
this.Controls.Add(this.portOKButton);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PortForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Set Port";
this.Load += new System.EventHandler(this.PortForm_Load);
((System.ComponentModel.ISupportInitialize)(this.portNumericUpDn)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.portNumericUpDn.ValueChanged += new System.EventHandler(this.PortNumericUpDn_ValueChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(13, 84);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(304, 13);
this.label5.TabIndex = 9;
this.label5.Text = "You will have to start the server by clicking Run from the menu.";
//
// PortForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.portCancelButton;
this.ClientSize = new System.Drawing.Size(466, 170);
this.Controls.Add(this.label5);
this.Controls.Add(this.portNumericUpDn);
this.Controls.Add(this.webServerLinkLabel);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.portCancelButton);
this.Controls.Add(this.portOKButton);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PortForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Set Port";
this.Load += new System.EventHandler(this.PortForm_Load);
((System.ComponentModel.ISupportInitialize)(this.portNumericUpDn)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button portOKButton;
private System.Windows.Forms.Button portCancelButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.LinkLabel webServerLinkLabel;
private System.Windows.Forms.NumericUpDown portNumericUpDn;
private System.Windows.Forms.Label label5;
}
#endregion
private System.Windows.Forms.Button portOKButton;
private System.Windows.Forms.Button portCancelButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.LinkLabel webServerLinkLabel;
private System.Windows.Forms.NumericUpDown portNumericUpDn;
private System.Windows.Forms.Label label5;
}
}
}