diff --git a/FanCtrl.csproj b/FanCtrl.csproj
index 2357deb..550e391 100644
--- a/FanCtrl.csproj
+++ b/FanCtrl.csproj
@@ -28,7 +28,7 @@
Lich
FanCtrl
0
- 1.1.5.0
+ 1.1.6.0
false
true
true
@@ -114,9 +114,9 @@
False
dll\Gigabyte.GraphicsCard.Common.dll
-
+
False
- dll\HidLibrary.dll
+ dll\HidSharp.dll
False
@@ -164,12 +164,16 @@
ControlForm.cs
+
+
+
+
@@ -211,6 +215,7 @@
+
Form
@@ -230,6 +235,12 @@
OptionForm.cs
+
+ Form
+
+
+ OSDForm.cs
+
@@ -254,6 +265,9 @@
OptionForm.cs
+
+ OSDForm.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
diff --git a/FanCtrl/Hardware/HardwareManager.cs b/FanCtrl/Hardware/HardwareManager.cs
index 95c8587..faa3b70 100644
--- a/FanCtrl/Hardware/HardwareManager.cs
+++ b/FanCtrl/Hardware/HardwareManager.cs
@@ -5,6 +5,7 @@
using System.Security.Principal;
using NvAPIWrapper;
using NvAPIWrapper.GPU;
+using System.Text;
namespace FanCtrl
{
@@ -342,6 +343,9 @@ public void stop()
mPCIMutex.Close();
mPCIMutex = null;
}
+
+ OSDController.releaseOSD();
+
Monitor.Exit(mLock);
}
@@ -800,6 +804,8 @@ private void onSetNvApiControl(int index, int coolerID, int value)
this.unlockBus();
}
+ private byte mTest = 0x00;
+
private void onUpdateThread()
{
long startTime = Util.getNowMS();
@@ -911,6 +917,56 @@ private void onUpdateThread()
// onUpdateCallback
onUpdateCallback();
+ var osdManager = OSDManager.getInstance();
+ if (osdManager.IsEnable == true)
+ {
+ var osdString = new StringBuilder();
+ osdString.Append("");
+ osdString.Append("");
+ osdString.Append("");
+ osdString.Append("\r");
+
+ bool isOK = (osdManager.getGroupCount() > 0) ? true : false;
+ int maxNameLength = 0;
+ for (int i = 0; i < osdManager.getGroupCount(); i++)
+ {
+ var group = osdManager.getGroup(i);
+ if (group == null)
+ {
+ isOK = false;
+ break;
+ }
+
+ if (group.Name.Length > maxNameLength)
+ maxNameLength = group.Name.Length;
+ }
+
+ for (int i = 0; i < osdManager.getGroupCount(); i++)
+ {
+ var group = osdManager.getGroup(i);
+ if (group == null)
+ {
+ isOK = false;
+ break;
+ }
+ osdString.Append(group.getOSDString(maxNameLength));
+ }
+
+ if (isOK == true)
+ {
+ OSDController.updateOSD(osdString.ToString());
+ osdManager.IsUpdate = true;
+ }
+ }
+ else
+ {
+ if (osdManager.IsUpdate == true)
+ {
+ OSDController.releaseOSD();
+ osdManager.IsUpdate = false;
+ }
+ }
+
Monitor.Exit(mLock);
}
}
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index 7c43bac..04736de 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -51,6 +51,9 @@ private void InitializeComponent()
this.mMadeLabel2 = new System.Windows.Forms.Label();
this.mDonateQRPictureBox = new System.Windows.Forms.PictureBox();
this.mDonatePictureBox = new System.Windows.Forms.PictureBox();
+ this.mOSDButton = new System.Windows.Forms.Button();
+ this.mEnableOSDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.mTrayMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mDonateQRPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.mDonatePictureBox)).BeginInit();
@@ -85,9 +88,9 @@ private void InitializeComponent()
//
// mFanControlButton
//
- this.mFanControlButton.Location = new System.Drawing.Point(574, 75);
+ this.mFanControlButton.Location = new System.Drawing.Point(588, 75);
this.mFanControlButton.Name = "mFanControlButton";
- this.mFanControlButton.Size = new System.Drawing.Size(136, 38);
+ this.mFanControlButton.Size = new System.Drawing.Size(122, 38);
this.mFanControlButton.TabIndex = 5;
this.mFanControlButton.Text = "Auto Fan Control";
this.mFanControlButton.UseVisualStyleBackColor = true;
@@ -99,9 +102,9 @@ private void InitializeComponent()
//
// mOptionButton
//
- this.mOptionButton.Location = new System.Drawing.Point(432, 75);
+ this.mOptionButton.Location = new System.Drawing.Point(460, 75);
this.mOptionButton.Name = "mOptionButton";
- this.mOptionButton.Size = new System.Drawing.Size(136, 38);
+ this.mOptionButton.Size = new System.Drawing.Size(122, 38);
this.mOptionButton.TabIndex = 6;
this.mOptionButton.Text = "Option";
this.mOptionButton.UseVisualStyleBackColor = true;
@@ -118,6 +121,8 @@ private void InitializeComponent()
this.mTrayMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mEnableToolStripMenuItem,
this.toolStripSeparator1,
+ this.mEnableOSDToolStripMenuItem,
+ this.toolStripSeparator3,
this.mNormalToolStripMenuItem,
this.mSilenceToolStripMenuItem,
this.mPerformanceToolStripMenuItem,
@@ -126,7 +131,7 @@ private void InitializeComponent()
this.mShowToolStripMenuItem,
this.mExitToolStripMenuItem});
this.mTrayMenuStrip.Name = "mTrayMenuStrip";
- this.mTrayMenuStrip.Size = new System.Drawing.Size(231, 170);
+ this.mTrayMenuStrip.Size = new System.Drawing.Size(231, 220);
//
// mEnableToolStripMenuItem
//
@@ -227,17 +232,40 @@ private void InitializeComponent()
this.mDonatePictureBox.TabIndex = 12;
this.mDonatePictureBox.TabStop = false;
//
+ // mOSDButton
+ //
+ this.mOSDButton.Location = new System.Drawing.Point(332, 75);
+ this.mOSDButton.Name = "mOSDButton";
+ this.mOSDButton.Size = new System.Drawing.Size(122, 38);
+ this.mOSDButton.TabIndex = 13;
+ this.mOSDButton.Text = "OSD (RTSS)";
+ this.mOSDButton.UseVisualStyleBackColor = true;
+ this.mOSDButton.Click += new System.EventHandler(this.onOSDButtonClick);
+ //
+ // mEnableOSDToolStripMenuItem
+ //
+ this.mEnableOSDToolStripMenuItem.Name = "mEnableOSDToolStripMenuItem";
+ this.mEnableOSDToolStripMenuItem.Size = new System.Drawing.Size(230, 22);
+ this.mEnableOSDToolStripMenuItem.Text = "Enable OSD (RTSS)";
+ this.mEnableOSDToolStripMenuItem.Click += new System.EventHandler(this.onTrayManuEnableOSDClick);
+ //
+ // toolStripSeparator3
+ //
+ this.toolStripSeparator3.Name = "toolStripSeparator3";
+ this.toolStripSeparator3.Size = new System.Drawing.Size(227, 6);
+ //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(719, 122);
+ this.Controls.Add(this.mOSDButton);
+ this.Controls.Add(this.mOptionButton);
this.Controls.Add(this.mDonatePictureBox);
this.Controls.Add(this.mDonateQRPictureBox);
this.Controls.Add(this.mMadeLabel2);
this.Controls.Add(this.mMadeLabel1);
- this.Controls.Add(this.mOptionButton);
this.Controls.Add(this.mFanControlButton);
this.Controls.Add(this.mControlGroupBox);
this.Controls.Add(this.mFanGroupBox);
@@ -279,6 +307,9 @@ private void InitializeComponent()
private System.Windows.Forms.Label mMadeLabel2;
private System.Windows.Forms.PictureBox mDonateQRPictureBox;
private System.Windows.Forms.PictureBox mDonatePictureBox;
+ private System.Windows.Forms.Button mOSDButton;
+ private System.Windows.Forms.ToolStripMenuItem mEnableOSDToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
}
}
diff --git a/MainForm.cs b/MainForm.cs
index b9923b0..c94c3a5 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -79,6 +79,8 @@ public MainForm()
protected override void OnLoad(EventArgs e)
{
+ base.OnLoad(e);
+
var hardwareManager = HardwareManager.getInstance();
var controlManager = ControlManager.getInstance();
@@ -121,12 +123,16 @@ protected override void OnLoad(EventArgs e)
{
MessageBox.Show(StringLib.Not_Match);
}
- }
+ }
+
+ // OSDManager
+ OSDManager.getInstance().read();
this.createComponent();
this.ActiveControl = mFanControlButton;
mEnableToolStripMenuItem.Checked = controlManager.IsEnable;
+ mEnableOSDToolStripMenuItem.Checked = OSDManager.getInstance().IsEnable;
mNormalToolStripMenuItem.Checked = (controlManager.ModeIndex == 0);
mSilenceToolStripMenuItem.Checked = (controlManager.ModeIndex == 1);
mPerformanceToolStripMenuItem.Checked = (controlManager.ModeIndex == 2);
@@ -157,6 +163,7 @@ private void localizeComponent()
mMadeLabel2.Text = StringLib.Made2;
mEnableToolStripMenuItem.Text = StringLib.Enable_automatic_fan_control;
+ mEnableOSDToolStripMenuItem.Text = StringLib.Enable_OSD;
mNormalToolStripMenuItem.Text = StringLib.Normal;
mSilenceToolStripMenuItem.Text = StringLib.Silence;
mPerformanceToolStripMenuItem.Text = StringLib.Performance;
@@ -207,6 +214,13 @@ private void onTrayMenuEnableClick(object sender, EventArgs e)
ControlManager.getInstance().write();
}
+ private void onTrayManuEnableOSDClick(object sender, EventArgs e)
+ {
+ OSDManager.getInstance().IsEnable = !OSDManager.getInstance().IsEnable;
+ mEnableOSDToolStripMenuItem.Checked = OSDManager.getInstance().IsEnable;
+ OSDManager.getInstance().write();
+ }
+
private void onTrayMenuNormalClick(object sender, EventArgs e)
{
ControlManager.getInstance().ModeIndex = 0;
@@ -423,7 +437,8 @@ private void createComponent()
}
// position
- mOptionButton.Top = mFanGroupBox.Top + mFanGroupBox.Height + 10;
+ mOSDButton.Top = mFanGroupBox.Top + mFanGroupBox.Height + 10;
+ mOptionButton.Top = mFanGroupBox.Top + mFanGroupBox.Height + 10;
mFanControlButton.Top = mFanGroupBox.Top + mFanGroupBox.Height + 10;
mMadeLabel1.Top = mFanGroupBox.Top + mFanGroupBox.Height + 15;
mMadeLabel2.Top = mFanGroupBox.Top + mFanGroupBox.Height + 32;
@@ -614,7 +629,16 @@ private void onFanControlButtonClick(object sender, EventArgs e)
private void onDonatePictureBoxClick(object sender, MouseEventArgs e)
{
Console.WriteLine("MainForm.onDonatePictureBoxClick()");
- System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=AUCEJ8KGCNJTC¤cy_code=USD&source=url");
+ System.Diagnostics.Process.Start("https://bit.ly/3fLvB4L");
}
+
+ private void onOSDButtonClick(object sender, EventArgs e)
+ {
+ var form = new OSDForm();
+ form.ShowDialog();
+ form.Dispose();
+ }
+
+
}
}
diff --git a/Portable/FanCtrl_v1.1.6.zip b/Portable/FanCtrl_v1.1.6.zip
new file mode 100644
index 0000000..2b8349b
Binary files /dev/null and b/Portable/FanCtrl_v1.1.6.zip differ
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index e3b9bd6..b5de7e8 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -31,8 +31,8 @@
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
-[assembly: AssemblyVersion("1.1.5")]
-[assembly: AssemblyFileVersion("1.1.5")]
-[assembly: AssemblyInformationalVersion("1.1.5")]
+[assembly: AssemblyVersion("1.1.6")]
+[assembly: AssemblyFileVersion("1.1.6")]
+[assembly: AssemblyInformationalVersion("1.1.6")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/README.md b/README.md
index e749c54..9d6a741 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Graph : [ZedGraph][8]
- Not all types of hardware are supported.
## Portable
-Download : [FanCtrl_v1.1.5.zip][10]
+Download : [FanCtrl_v1.1.6.zip][10]
## Donate
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=AUCEJ8KGCNJTC¤cy_code=USD&source=url)
@@ -62,7 +62,7 @@ Download : [FanCtrl_v1.1.5.zip][10]
[7]: https://www.newtonsoft.com/json
[8]: http://zedgraph.sourceforge.net/samples.html
[9]: https://github.com/lich426/FanCtrl/blob/master/LICENSE
-[10]: https://github.com/lich426/FanCtrl/raw/master/Portable/FanCtrl_v1.1.5.zip
+[10]: https://github.com/lich426/FanCtrl/raw/master/Portable/FanCtrl_v1.1.6.zip
[11]: https://github.com/lich426/FanCtrl/blob/master/Packet/X2.txt
[12]: https://github.com/lich426/FanCtrl/blob/master/Packet/X3.txt
[13]: https://github.com/lich426/FanCtrl/blob/master/Packet/clc.txt
diff --git a/StringLib.Designer.cs b/StringLib.Designer.cs
index 5fce887..a16806e 100644
--- a/StringLib.Designer.cs
+++ b/StringLib.Designer.cs
@@ -96,6 +96,15 @@ internal static string Cancel {
}
}
+ ///
+ /// Do you want to change the color?과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Change_the_color {
+ get {
+ return ResourceManager.GetString("Change_the_color", resourceCulture);
+ }
+ }
+
///
/// CLC Lighting과(와) 유사한 지역화된 문자열을 찾습니다.
///
@@ -105,6 +114,15 @@ internal static string CLC_Lighting {
}
}
+ ///
+ /// Color과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Color {
+ get {
+ return ResourceManager.GetString("Color", resourceCulture);
+ }
+ }
+
///
/// Control과(와) 유사한 지역화된 문자열을 찾습니다.
///
@@ -114,6 +132,15 @@ internal static string Control {
}
}
+ ///
+ /// Default color과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Default_color {
+ get {
+ return ResourceManager.GetString("Default_color", resourceCulture);
+ }
+ }
+
///
/// Enable automatic fan control과(와) 유사한 지역화된 문자열을 찾습니다.
///
@@ -123,6 +150,15 @@ internal static string Enable_automatic_fan_control {
}
}
+ ///
+ /// Enable OSD (RTSS)과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Enable_OSD {
+ get {
+ return ResourceManager.GetString("Enable_OSD", resourceCulture);
+ }
+ }
+
///
/// Exit과(와) 유사한 지역화된 문자열을 찾습니다.
///
@@ -186,6 +222,15 @@ internal static string Graph {
}
}
+ ///
+ /// Groups과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Groups {
+ get {
+ return ResourceManager.GetString("Groups", resourceCulture);
+ }
+ }
+
///
/// Hysteresis : 과(와) 유사한 지역화된 문자열을 찾습니다.
///
@@ -204,6 +249,15 @@ internal static string Interval {
}
}
+ ///
+ /// Items과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Items {
+ get {
+ return ResourceManager.GetString("Items", resourceCulture);
+ }
+ }
+
///
/// Kraken Lighting과(와) 유사한 지역화된 문자열을 찾습니다.
///
@@ -330,6 +384,15 @@ internal static string Sensor {
}
}
+ ///
+ /// Set color과(와) 유사한 지역화된 문자열을 찾습니다.
+ ///
+ internal static string Set_color {
+ get {
+ return ResourceManager.GetString("Set_color", resourceCulture);
+ }
+ }
+
///
/// Show과(와) 유사한 지역화된 문자열을 찾습니다.
///
diff --git a/StringLib.ko.resx b/StringLib.ko.resx
index f3f34ea..e1569b7 100644
--- a/StringLib.ko.resx
+++ b/StringLib.ko.resx
@@ -129,15 +129,27 @@
취소
+
+ 색 변경을 하시겠습니까?
+
CLC 조명설정
+
+ 색 변경
+
제어
+
+ 기본 색
+
자동 팬 제어 활성화
+
+ OSD 활성화
+
종료
@@ -159,12 +171,18 @@
그래프
+
+ 그룹
+
이력 온도 :
주기 설정
+
+ 아이템
+
Kraken 조명 설정
@@ -187,7 +205,7 @@
일반
- 하드웨어와 저장된 설정 파일(Config.json) 내용이 일치하지 않습니다!
+ 하드웨어와 저장된 설정 파일(Control.json) 내용이 일치하지 않습니다!
확인
@@ -207,6 +225,9 @@
센서
+
+ 색 변경
+
열기
diff --git a/StringLib.resx b/StringLib.resx
index 535212b..12de65a 100644
--- a/StringLib.resx
+++ b/StringLib.resx
@@ -129,15 +129,27 @@
Cancel
+
+ Do you want to change the color?
+
CLC Lighting
+
+ Color
+
Control
+
+ Default color
+
Enable automatic fan control
+
+ Enable OSD (RTSS)
+
Exit
@@ -159,12 +171,18 @@
Graph
+
+ Groups
+
Hysteresis :
Interval
+
+ Items
+
Kraken Lighting
@@ -207,6 +225,9 @@
Sensor
+
+ Set color
+
Show
diff --git a/img/1.png b/img/1.png
index 2347b8f..138da27 100644
Binary files a/img/1.png and b/img/1.png differ
diff --git a/img/2.png b/img/2.png
index b992e5d..1612aa2 100644
Binary files a/img/2.png and b/img/2.png differ