diff --git a/FanCtrl.csproj b/FanCtrl.csproj
index a4939b9..7e5a078 100644
--- a/FanCtrl.csproj
+++ b/FanCtrl.csproj
@@ -28,7 +28,7 @@
Lich
FanCtrl
0
- 1.5.9.0
+ 1.6.0.0
false
true
true
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index b2537fc..601e18a 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
-[assembly: AssemblyVersion("1.5.9")]
-[assembly: AssemblyFileVersion("1.5.9")]
-[assembly: AssemblyInformationalVersion("1.5.9")]
+[assembly: AssemblyVersion("1.6.0")]
+[assembly: AssemblyFileVersion("1.6.0")]
+[assembly: AssemblyInformationalVersion("1.6.0")]
diff --git a/dll/LibreHardwareMonitorLib.dll b/dll/LibreHardwareMonitorLib.dll
index dff2b91..54b68ce 100644
Binary files a/dll/LibreHardwareMonitorLib.dll and b/dll/LibreHardwareMonitorLib.dll differ
diff --git a/src/UI/ControlForm.Designer.cs b/src/UI/ControlForm.Designer.cs
index 05c9046..7543351 100644
--- a/src/UI/ControlForm.Designer.cs
+++ b/src/UI/ControlForm.Designer.cs
@@ -33,36 +33,36 @@ private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlForm));
- this.mEnableCheckBox = new DarkCheckBox();
- this.mTempGroupBox = new DarkGroupBox();
- this.mTempComboBox = new DarkComboBox();
- this.mFanGroupBox = new DarkGroupBox();
- this.mRemoveButton = new DarkButton();
- this.mAddButton = new DarkButton();
- this.mFanListView = new ThemeListView();
- this.mFanComboBox = new DarkComboBox();
- this.mGraphGroupBox = new DarkGroupBox();
- this.mPresetLabel = new DarkLabel();
- this.mUnitLabel = new DarkLabel();
- this.mHysLabel = new DarkLabel();
- this.mStepCheckBox = new DarkCheckBox();
+ this.mEnableCheckBox = new DarkUI.Controls.DarkCheckBox();
+ this.mTempGroupBox = new DarkUI.Controls.DarkGroupBox();
+ this.mAddTempListView = new FanCtrl.ThemeListView();
+ this.mFanGroupBox = new DarkUI.Controls.DarkGroupBox();
+ this.mFanListView = new FanCtrl.ThemeListView();
+ this.mAddFanListView = new FanCtrl.ThemeListView();
+ this.mRemoveButton = new DarkUI.Controls.DarkButton();
+ this.mAddButton = new DarkUI.Controls.DarkButton();
+ this.mGraphGroupBox = new DarkUI.Controls.DarkGroupBox();
+ this.mPresetLabel = new DarkUI.Controls.DarkLabel();
+ this.mUnitLabel = new DarkUI.Controls.DarkLabel();
+ this.mHysLabel = new DarkUI.Controls.DarkLabel();
+ this.mStepCheckBox = new DarkUI.Controls.DarkCheckBox();
this.mGraph = new ZedGraph.ZedGraphControl();
- this.mOKButton = new DarkButton();
- this.mApplyButton = new DarkButton();
- this.mHysNumericUpDown = new DarkNumericUpDown();
- this.mModeGroupBox = new DarkGroupBox();
- this.mGameRadioButton = new DarkRadioButton();
- this.mPerformanceRadioButton = new DarkRadioButton();
- this.mSilenceRadioButton = new DarkRadioButton();
- this.mNormalRadioButton = new DarkRadioButton();
- this.mUnitComboBox = new DarkComboBox();
- this.mPresetLoadButton = new DarkButton();
- this.mPresetSaveButton = new DarkButton();
- this.mAutoNumericUpDown = new DarkNumericUpDown();
- this.mAutoLabel = new DarkLabel();
- this.mDelayLabel = new DarkLabel();
- this.mDelayNumericUpDown = new DarkNumericUpDown();
- this.mDelayLabel2 = new DarkLabel();
+ this.mOKButton = new DarkUI.Controls.DarkButton();
+ this.mApplyButton = new DarkUI.Controls.DarkButton();
+ this.mHysNumericUpDown = new DarkUI.Controls.DarkNumericUpDown();
+ this.mModeGroupBox = new DarkUI.Controls.DarkGroupBox();
+ this.mGameRadioButton = new DarkUI.Controls.DarkRadioButton();
+ this.mPerformanceRadioButton = new DarkUI.Controls.DarkRadioButton();
+ this.mSilenceRadioButton = new DarkUI.Controls.DarkRadioButton();
+ this.mNormalRadioButton = new DarkUI.Controls.DarkRadioButton();
+ this.mUnitComboBox = new DarkUI.Controls.DarkComboBox();
+ this.mPresetLoadButton = new DarkUI.Controls.DarkButton();
+ this.mPresetSaveButton = new DarkUI.Controls.DarkButton();
+ this.mAutoNumericUpDown = new DarkUI.Controls.DarkNumericUpDown();
+ this.mAutoLabel = new DarkUI.Controls.DarkLabel();
+ this.mDelayLabel = new DarkUI.Controls.DarkLabel();
+ this.mDelayNumericUpDown = new DarkUI.Controls.DarkNumericUpDown();
+ this.mDelayLabel2 = new DarkUI.Controls.DarkLabel();
this.mTempGroupBox.SuspendLayout();
this.mFanGroupBox.SuspendLayout();
this.mGraphGroupBox.SuspendLayout();
@@ -83,75 +83,86 @@ private void InitializeComponent()
//
// mTempGroupBox
//
- this.mTempGroupBox.Controls.Add(this.mTempComboBox);
+ this.mTempGroupBox.Controls.Add(this.mAddTempListView);
this.mTempGroupBox.Location = new System.Drawing.Point(12, 61);
this.mTempGroupBox.Name = "mTempGroupBox";
- this.mTempGroupBox.Size = new System.Drawing.Size(208, 51);
+ this.mTempGroupBox.Size = new System.Drawing.Size(305, 211);
this.mTempGroupBox.TabIndex = 1;
this.mTempGroupBox.TabStop = false;
this.mTempGroupBox.Text = "Temperature Sensor";
//
- // mTempComboBox
+ // mAddTempListView
//
- this.mTempComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
- this.mTempComboBox.FormattingEnabled = true;
- this.mTempComboBox.Location = new System.Drawing.Point(7, 21);
- this.mTempComboBox.Name = "mTempComboBox";
- this.mTempComboBox.Size = new System.Drawing.Size(195, 20);
- this.mTempComboBox.TabIndex = 1;
+ this.mAddTempListView.FullRowSelect = true;
+ this.mAddTempListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+ this.mAddTempListView.HideSelection = false;
+ this.mAddTempListView.Location = new System.Drawing.Point(6, 20);
+ this.mAddTempListView.MultiSelect = false;
+ this.mAddTempListView.Name = "mAddTempListView";
+ this.mAddTempListView.Size = new System.Drawing.Size(293, 185);
+ this.mAddTempListView.TabIndex = 5;
+ this.mAddTempListView.UseCompatibleStateImageBehavior = false;
+ this.mAddTempListView.View = System.Windows.Forms.View.Details;
//
// mFanGroupBox
//
+ this.mFanGroupBox.Controls.Add(this.mFanListView);
+ this.mFanGroupBox.Controls.Add(this.mAddFanListView);
this.mFanGroupBox.Controls.Add(this.mRemoveButton);
this.mFanGroupBox.Controls.Add(this.mAddButton);
- this.mFanGroupBox.Controls.Add(this.mFanListView);
- this.mFanGroupBox.Controls.Add(this.mFanComboBox);
- this.mFanGroupBox.Location = new System.Drawing.Point(12, 118);
+ this.mFanGroupBox.Location = new System.Drawing.Point(12, 278);
this.mFanGroupBox.Name = "mFanGroupBox";
- this.mFanGroupBox.Size = new System.Drawing.Size(208, 401);
+ this.mFanGroupBox.Size = new System.Drawing.Size(305, 416);
this.mFanGroupBox.TabIndex = 2;
this.mFanGroupBox.TabStop = false;
this.mFanGroupBox.Text = "Fan";
//
+ // mFanListView
+ //
+ this.mFanListView.FullRowSelect = true;
+ this.mFanListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+ this.mFanListView.HideSelection = false;
+ this.mFanListView.Location = new System.Drawing.Point(5, 181);
+ this.mFanListView.MultiSelect = false;
+ this.mFanListView.Name = "mFanListView";
+ this.mFanListView.Size = new System.Drawing.Size(292, 192);
+ this.mFanListView.TabIndex = 7;
+ this.mFanListView.UseCompatibleStateImageBehavior = false;
+ this.mFanListView.View = System.Windows.Forms.View.Details;
+ //
+ // mAddFanListView
+ //
+ this.mAddFanListView.FullRowSelect = true;
+ this.mAddFanListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+ this.mAddFanListView.HideSelection = false;
+ this.mAddFanListView.Location = new System.Drawing.Point(5, 20);
+ this.mAddFanListView.MultiSelect = false;
+ this.mAddFanListView.Name = "mAddFanListView";
+ this.mAddFanListView.Size = new System.Drawing.Size(231, 155);
+ this.mAddFanListView.TabIndex = 6;
+ this.mAddFanListView.UseCompatibleStateImageBehavior = false;
+ this.mAddFanListView.View = System.Windows.Forms.View.Details;
+ //
// mRemoveButton
//
- this.mRemoveButton.Location = new System.Drawing.Point(7, 337);
+ this.mRemoveButton.Location = new System.Drawing.Point(6, 379);
this.mRemoveButton.Name = "mRemoveButton";
- this.mRemoveButton.Size = new System.Drawing.Size(195, 58);
+ this.mRemoveButton.Padding = new System.Windows.Forms.Padding(1);
+ this.mRemoveButton.Size = new System.Drawing.Size(292, 31);
this.mRemoveButton.TabIndex = 4;
this.mRemoveButton.Text = "Remove";
this.mRemoveButton.Click += new System.EventHandler(this.onRemoveButtonClick);
//
// mAddButton
//
- this.mAddButton.Location = new System.Drawing.Point(135, 15);
+ this.mAddButton.Location = new System.Drawing.Point(242, 20);
this.mAddButton.Name = "mAddButton";
- this.mAddButton.Size = new System.Drawing.Size(67, 28);
+ this.mAddButton.Padding = new System.Windows.Forms.Padding(1);
+ this.mAddButton.Size = new System.Drawing.Size(55, 155);
this.mAddButton.TabIndex = 3;
this.mAddButton.Text = "Add";
this.mAddButton.Click += new System.EventHandler(this.onAddButtonClick);
//
- // mFanListView
- //
- this.mFanListView.FullRowSelect = true;
- this.mFanListView.HideSelection = false;
- this.mFanListView.Location = new System.Drawing.Point(7, 49);
- this.mFanListView.MultiSelect = false;
- this.mFanListView.Name = "mFanListView";
- this.mFanListView.Size = new System.Drawing.Size(195, 282);
- this.mFanListView.TabIndex = 2;
- this.mFanListView.UseCompatibleStateImageBehavior = false;
- this.mFanListView.View = System.Windows.Forms.View.List;
- //
- // mFanComboBox
- //
- this.mFanComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
- this.mFanComboBox.FormattingEnabled = true;
- this.mFanComboBox.Location = new System.Drawing.Point(7, 20);
- this.mFanComboBox.Name = "mFanComboBox";
- this.mFanComboBox.Size = new System.Drawing.Size(125, 20);
- this.mFanComboBox.TabIndex = 2;
- //
// mGraphGroupBox
//
this.mGraphGroupBox.Controls.Add(this.mPresetLabel);
@@ -159,9 +170,9 @@ private void InitializeComponent()
this.mGraphGroupBox.Controls.Add(this.mHysLabel);
this.mGraphGroupBox.Controls.Add(this.mStepCheckBox);
this.mGraphGroupBox.Controls.Add(this.mGraph);
- this.mGraphGroupBox.Location = new System.Drawing.Point(227, 61);
+ this.mGraphGroupBox.Location = new System.Drawing.Point(323, 61);
this.mGraphGroupBox.Name = "mGraphGroupBox";
- this.mGraphGroupBox.Size = new System.Drawing.Size(870, 458);
+ this.mGraphGroupBox.Size = new System.Drawing.Size(870, 633);
this.mGraphGroupBox.TabIndex = 4;
this.mGraphGroupBox.TabStop = false;
this.mGraphGroupBox.Text = "Graph";
@@ -218,14 +229,15 @@ private void InitializeComponent()
this.mGraph.ScrollMinX = 0D;
this.mGraph.ScrollMinY = 0D;
this.mGraph.ScrollMinY2 = 0D;
- this.mGraph.Size = new System.Drawing.Size(857, 429);
+ this.mGraph.Size = new System.Drawing.Size(857, 604);
this.mGraph.TabIndex = 4;
this.mGraph.ZoomButtons = System.Windows.Forms.MouseButtons.None;
//
// mOKButton
//
- this.mOKButton.Location = new System.Drawing.Point(916, 525);
+ this.mOKButton.Location = new System.Drawing.Point(1012, 700);
this.mOKButton.Name = "mOKButton";
+ this.mOKButton.Padding = new System.Windows.Forms.Padding(1);
this.mOKButton.Size = new System.Drawing.Size(181, 47);
this.mOKButton.TabIndex = 17;
this.mOKButton.Text = "OK";
@@ -233,8 +245,9 @@ private void InitializeComponent()
//
// mApplyButton
//
- this.mApplyButton.Location = new System.Drawing.Point(729, 525);
+ this.mApplyButton.Location = new System.Drawing.Point(825, 700);
this.mApplyButton.Name = "mApplyButton";
+ this.mApplyButton.Padding = new System.Windows.Forms.Padding(1);
this.mApplyButton.Size = new System.Drawing.Size(181, 47);
this.mApplyButton.TabIndex = 16;
this.mApplyButton.Text = "Apply";
@@ -242,7 +255,7 @@ private void InitializeComponent()
//
// mHysNumericUpDown
//
- this.mHysNumericUpDown.Location = new System.Drawing.Point(736, 59);
+ this.mHysNumericUpDown.Location = new System.Drawing.Point(832, 59);
this.mHysNumericUpDown.Name = "mHysNumericUpDown";
this.mHysNumericUpDown.ReadOnly = true;
this.mHysNumericUpDown.Size = new System.Drawing.Size(38, 21);
@@ -255,7 +268,7 @@ private void InitializeComponent()
this.mModeGroupBox.Controls.Add(this.mPerformanceRadioButton);
this.mModeGroupBox.Controls.Add(this.mSilenceRadioButton);
this.mModeGroupBox.Controls.Add(this.mNormalRadioButton);
- this.mModeGroupBox.Location = new System.Drawing.Point(227, 9);
+ this.mModeGroupBox.Location = new System.Drawing.Point(323, 9);
this.mModeGroupBox.Name = "mModeGroupBox";
this.mModeGroupBox.Size = new System.Drawing.Size(870, 43);
this.mModeGroupBox.TabIndex = 3;
@@ -304,17 +317,18 @@ private void InitializeComponent()
//
// mUnitComboBox
//
- this.mUnitComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
+ this.mUnitComboBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
this.mUnitComboBox.FormattingEnabled = true;
- this.mUnitComboBox.Location = new System.Drawing.Point(593, 58);
+ this.mUnitComboBox.Location = new System.Drawing.Point(689, 58);
this.mUnitComboBox.Name = "mUnitComboBox";
- this.mUnitComboBox.Size = new System.Drawing.Size(44, 20);
+ this.mUnitComboBox.Size = new System.Drawing.Size(44, 22);
this.mUnitComboBox.TabIndex = 11;
//
// mPresetLoadButton
//
- this.mPresetLoadButton.Location = new System.Drawing.Point(424, 56);
+ this.mPresetLoadButton.Location = new System.Drawing.Point(520, 56);
this.mPresetLoadButton.Name = "mPresetLoadButton";
+ this.mPresetLoadButton.Padding = new System.Windows.Forms.Padding(1);
this.mPresetLoadButton.Size = new System.Drawing.Size(57, 23);
this.mPresetLoadButton.TabIndex = 9;
this.mPresetLoadButton.Text = "Load";
@@ -322,8 +336,9 @@ private void InitializeComponent()
//
// mPresetSaveButton
//
- this.mPresetSaveButton.Location = new System.Drawing.Point(483, 56);
+ this.mPresetSaveButton.Location = new System.Drawing.Point(579, 56);
this.mPresetSaveButton.Name = "mPresetSaveButton";
+ this.mPresetSaveButton.Padding = new System.Windows.Forms.Padding(1);
this.mPresetSaveButton.Size = new System.Drawing.Size(57, 23);
this.mPresetSaveButton.TabIndex = 10;
this.mPresetSaveButton.Text = "Save";
@@ -337,7 +352,7 @@ private void InitializeComponent()
0,
0,
0});
- this.mAutoNumericUpDown.Location = new System.Drawing.Point(902, 59);
+ this.mAutoNumericUpDown.Location = new System.Drawing.Point(998, 59);
this.mAutoNumericUpDown.Name = "mAutoNumericUpDown";
this.mAutoNumericUpDown.ReadOnly = true;
this.mAutoNumericUpDown.Size = new System.Drawing.Size(41, 21);
@@ -347,7 +362,7 @@ private void InitializeComponent()
// mAutoLabel
//
this.mAutoLabel.AutoSize = true;
- this.mAutoLabel.Location = new System.Drawing.Point(861, 62);
+ this.mAutoLabel.Location = new System.Drawing.Point(957, 62);
this.mAutoLabel.Name = "mAutoLabel";
this.mAutoLabel.Size = new System.Drawing.Size(38, 12);
this.mAutoLabel.TabIndex = 6;
@@ -357,7 +372,7 @@ private void InitializeComponent()
// mDelayLabel
//
this.mDelayLabel.AutoSize = true;
- this.mDelayLabel.Location = new System.Drawing.Point(965, 62);
+ this.mDelayLabel.Location = new System.Drawing.Point(1061, 62);
this.mDelayLabel.Name = "mDelayLabel";
this.mDelayLabel.Size = new System.Drawing.Size(45, 12);
this.mDelayLabel.TabIndex = 8;
@@ -366,7 +381,7 @@ private void InitializeComponent()
//
// mDelayNumericUpDown
//
- this.mDelayNumericUpDown.Location = new System.Drawing.Point(1013, 58);
+ this.mDelayNumericUpDown.Location = new System.Drawing.Point(1109, 58);
this.mDelayNumericUpDown.Maximum = new decimal(new int[] {
9999,
0,
@@ -380,7 +395,7 @@ private void InitializeComponent()
// mDelayLabel2
//
this.mDelayLabel2.AutoSize = true;
- this.mDelayLabel2.Location = new System.Drawing.Point(1065, 61);
+ this.mDelayLabel2.Location = new System.Drawing.Point(1161, 61);
this.mDelayLabel2.Name = "mDelayLabel2";
this.mDelayLabel2.Size = new System.Drawing.Size(23, 12);
this.mDelayLabel2.TabIndex = 18;
@@ -390,7 +405,7 @@ private void InitializeComponent()
// ControlForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.ClientSize = new System.Drawing.Size(1108, 584);
+ this.ClientSize = new System.Drawing.Size(1203, 757);
this.Controls.Add(this.mDelayLabel2);
this.Controls.Add(this.mDelayLabel);
this.Controls.Add(this.mDelayNumericUpDown);
@@ -408,8 +423,9 @@ private void InitializeComponent()
this.Controls.Add(this.mTempGroupBox);
this.Controls.Add(this.mEnableCheckBox);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Location = new System.Drawing.Point(0, 0);
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(1124, 623);
+ this.MinimumSize = new System.Drawing.Size(1219, 796);
this.Name = "ControlForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "FanCtrl";
@@ -431,10 +447,7 @@ private void InitializeComponent()
private DarkCheckBox mEnableCheckBox;
private DarkGroupBox mTempGroupBox;
- private DarkComboBox mTempComboBox;
private DarkGroupBox mFanGroupBox;
- private ThemeListView mFanListView;
- private DarkComboBox mFanComboBox;
private DarkButton mRemoveButton;
private DarkButton mAddButton;
private DarkGroupBox mGraphGroupBox;
@@ -459,5 +472,8 @@ private void InitializeComponent()
private DarkLabel mDelayLabel;
private DarkNumericUpDown mDelayNumericUpDown;
private DarkLabel mDelayLabel2;
+ private ThemeListView mAddTempListView;
+ private ThemeListView mAddFanListView;
+ private ThemeListView mFanListView;
}
}
\ No newline at end of file
diff --git a/src/UI/ControlForm.cs b/src/UI/ControlForm.cs
index 9592da0..8b63551 100644
--- a/src/UI/ControlForm.cs
+++ b/src/UI/ControlForm.cs
@@ -1,6 +1,7 @@
using DarkUI.Config;
using DarkUI.Forms;
using FanCtrl.Resources;
+using HidSharp;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -20,8 +21,8 @@ namespace FanCtrl
{
public partial class ControlForm : ThemeForm
{
- private Size mLastSize = new Size(1124, 623);
- private Size mNormalLastSize = new Size(1124, 623);
+ private Size mLastSize = new Size(1219, 796);
+ private Size mNormalLastSize = new Size(1219, 796);
private bool mIsUpdateGraph = true;
private bool mIsResize = false;
@@ -243,14 +244,15 @@ private void initControl()
mPerformanceRadioButton.Click += onRadioButtonClick;
mGameRadioButton.Click += onRadioButtonClick;
- mTempComboBox.SelectedIndexChanged += onTempComboBoxIndexChanged;
+ //this.mAddTempListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Clickable;
+ mAddTempListView.Columns.Add("MyColumn", 260, HorizontalAlignment.Center);
+ mAddTempListView.SelectedIndexChanged += onAddTempListViewIndexChanged;
- mTempComboBox.DropDownHeight = 500;
- mFanComboBox.DropDownHeight = 500;
+ //this.mAddFanListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Clickable;
+ mAddFanListView.Columns.Add("MyColumn", 210, HorizontalAlignment.Center);
- mFanListView.Columns.Add("MyColumn", -2, HorizontalAlignment.Center);
- mFanListView.AutoResizeColumn(0, ColumnHeaderAutoResizeStyle.ColumnContent);
- mFanListView.GridLines = true;
+ //this.mFanListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Clickable;
+ mFanListView.Columns.Add("MyColumn", 260, HorizontalAlignment.Center);
mFanListView.SelectedIndexChanged += onFanListViewIndexChanged;
mUnitComboBox.Items.Add("1");
@@ -270,23 +272,12 @@ private void initControl()
for (int i = 0; i < tempBaseList.Count; i++)
{
- mTempComboBox.Items.Add(tempBaseList[i].Name);
+ mAddTempListView.Items.Add(tempBaseList[i].Name);
}
for (int i = 0; i < controlBaseList.Count; i++)
{
- mFanComboBox.Items.Add(controlBaseList[i].Name);
- }
-
- if (mTempComboBox.Items.Count > 0)
- {
- mTempComboBox.SelectedIndex = 0;
- mSelectedTempIndex = 0;
- }
-
- if (mFanComboBox.Items.Count > 0)
- {
- mFanComboBox.SelectedIndex = 0;
+ mAddFanListView.Items.Add(controlBaseList[i].Name);
}
}
@@ -459,11 +450,17 @@ private void onRadioButtonClick(object sender, EventArgs e)
mPerformanceRadioButton.Checked = (mModeType == MODE_TYPE.PERFORMANCE);
mGameRadioButton.Checked = (mModeType == MODE_TYPE.GAME);
- this.onTempComboBoxIndexChanged(null, EventArgs.Empty);
+ this.onAddTempListViewIndexChanged(null, EventArgs.Empty);
}
- private void onTempComboBoxIndexChanged(object sender, EventArgs e)
+ private void onAddTempListViewIndexChanged(object sender, EventArgs e)
{
+ if (mAddTempListView.SelectedItems.Count == 0)
+ {
+ Console.WriteLine("mAddTempListView.SelectedItems.Count : {0}", mAddTempListView.SelectedItems.Count);
+ return;
+ }
+
mPresetLabel.Visible = false;
mPresetLoadButton.Visible = false;
mPresetSaveButton.Visible = false;
@@ -481,14 +478,14 @@ private void onTempComboBoxIndexChanged(object sender, EventArgs e)
mSelectedFanData = null;
mListViewBaseControlList.Clear();
- mFanListView.BeginUpdate();
- mFanListView.Clear();
+ mFanListView.Items.Clear();
+
+ mSelectedTempIndex = mAddTempListView.SelectedItems[0].Index;
+ Console.WriteLine("mAddTempListView.SelectedItems[0].Index : {0}", mSelectedTempIndex);
- mSelectedTempIndex = mTempComboBox.SelectedIndex;
var controlData = this.getControlData(mSelectedTempIndex);
if(controlData == null)
{
- mFanListView.EndUpdate();
return;
}
@@ -507,7 +504,6 @@ private void onTempComboBoxIndexChanged(object sender, EventArgs e)
mListViewBaseControlList.Add(device);
mFanListView.Items.Add(device.Name);
}
- mFanListView.EndUpdate();
}
private void onStepCheckBoxCheckedChanged(object sender, EventArgs e)
@@ -607,9 +603,9 @@ private void setPoint(double y)
public void onUpdateTimer()
{
- if (mTempComboBox.Items.Count == 0 ||
+ if (mAddTempListView.Items.Count == 0 ||
mSelectedTempIndex == -1 ||
- mFanComboBox.Items.Count == 0 ||
+ mAddFanListView.Items.Count == 0 ||
mSelectedFanData == null ||
mNowPoint == null ||
mIsUpdateGraph == false)
@@ -826,12 +822,12 @@ private void onDelayTimeUpDownValueChanged(object sender, EventArgs e)
private void onAddButtonClick(object sender, EventArgs e)
{
- if (mTempComboBox.Items.Count == 0 || mFanComboBox.Items.Count == 0)
+ if (mAddTempListView.SelectedItems.Count == 0 || mAddFanListView.SelectedItems.Count == 0)
return;
int modeIndex = (int)mModeType;
int tempIndex = mSelectedTempIndex;
- int fanIndex = mFanComboBox.SelectedIndex;
+ int fanIndex = mAddFanListView.SelectedItems[0].Index;
var tempBaseList = HardwareManager.getInstance().TempBaseList;
var controlBaseList = HardwareManager.getInstance().ControlBaseList;
@@ -849,8 +845,6 @@ private void onAddButtonClick(object sender, EventArgs e)
mControlDataList[modeIndex].Add(controlData);
}
- mFanListView.BeginUpdate();
-
var fanData = this.getFanData(tempIndex, controlDevice.ID);
if(fanData == null)
{
@@ -858,10 +852,9 @@ private void onAddButtonClick(object sender, EventArgs e)
controlData.FanDataList.Add(fanData);
mListViewBaseControlList.Add(controlDevice);
- mFanListView.Items.Add(controlDevice.Name);
+ var item = mFanListView.Items.Add(controlDevice.Name);
+ item.SubItems.Add(controlDevice.Name);
}
-
- mFanListView.EndUpdate();
}
private void onRemoveButtonClick(object sender, EventArgs e)
@@ -880,9 +873,7 @@ private void onRemoveButtonClick(object sender, EventArgs e)
controlData.FanDataList.RemoveAt(itemIndex);
mSelectedFanData = null;
- mFanListView.BeginUpdate();
mFanListView.Items.Remove(item);
- mFanListView.EndUpdate();
}
private void onPresetLoadButtonClick(object sender, EventArgs e)
diff --git a/src/UI/MainForm.Designer.cs b/src/UI/MainForm.Designer.cs
index 701b062..856cd52 100644
--- a/src/UI/MainForm.Designer.cs
+++ b/src/UI/MainForm.Designer.cs
@@ -74,7 +74,6 @@ private void InitializeComponent()
//
// mTempGroupBox
//
- this.mTempGroupBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
this.mTempGroupBox.Controls.Add(this.mTempPanel);
this.mTempGroupBox.Location = new System.Drawing.Point(12, 12);
this.mTempGroupBox.Name = "mTempGroupBox";
@@ -93,7 +92,6 @@ private void InitializeComponent()
//
// mFanGroupBox
//
- this.mFanGroupBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
this.mFanGroupBox.Controls.Add(this.mFanPanel);
this.mFanGroupBox.Location = new System.Drawing.Point(290, 12);
this.mFanGroupBox.Name = "mFanGroupBox";
@@ -112,7 +110,6 @@ private void InitializeComponent()
//
// mControlGroupBox
//
- this.mControlGroupBox.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
this.mControlGroupBox.Controls.Add(this.mControlPanel);
this.mControlGroupBox.Location = new System.Drawing.Point(568, 12);
this.mControlGroupBox.Name = "mControlGroupBox";
@@ -250,7 +247,6 @@ private void InitializeComponent()
// mMadeLabel1
//
this.mMadeLabel1.AutoSize = true;
- this.mMadeLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.mMadeLabel1.Location = new System.Drawing.Point(17, 82);
this.mMadeLabel1.Name = "mMadeLabel1";
this.mMadeLabel1.Size = new System.Drawing.Size(83, 12);
@@ -260,7 +256,6 @@ private void InitializeComponent()
// mMadeLabel2
//
this.mMadeLabel2.AutoSize = true;
- this.mMadeLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.mMadeLabel2.Location = new System.Drawing.Point(15, 99);
this.mMadeLabel2.Name = "mMadeLabel2";
this.mMadeLabel2.Size = new System.Drawing.Size(125, 12);
@@ -288,7 +283,6 @@ private void InitializeComponent()
// label1
//
this.label1.AutoSize = true;
- this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.label1.Location = new System.Drawing.Point(403, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(62, 12);
diff --git a/src/UI/Theme/ThemePanel.cs b/src/UI/Theme/ThemePanel.cs
index fb9454a..6becdd7 100644
--- a/src/UI/Theme/ThemePanel.cs
+++ b/src/UI/Theme/ThemePanel.cs
@@ -9,7 +9,6 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace FanCtrl
{