Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
lich426 committed Jun 13, 2020
1 parent 04a8a7e commit 057a0f9
Show file tree
Hide file tree
Showing 12 changed files with 248 additions and 18 deletions.
20 changes: 17 additions & 3 deletions FanCtrl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PublisherName>Lich</PublisherName>
<SuiteName>FanCtrl</SuiteName>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.1.5.0</ApplicationVersion>
<ApplicationVersion>1.1.6.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down Expand Up @@ -114,9 +114,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\Gigabyte.GraphicsCard.Common.dll</HintPath>
</Reference>
<Reference Include="HidLibrary, Version=3.2.46.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="HidSharp, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\HidLibrary.dll</HintPath>
<HintPath>dll\HidSharp.dll</HintPath>
</Reference>
<Reference Include="LibreHardwareMonitorLib, Version=0.8.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -164,12 +164,16 @@
<DependentUpon>ControlForm.cs</DependentUpon>
</Compile>
<Compile Include="FanCtrl\Controller\HidUSBController.cs" />
<Compile Include="FanCtrl\Controller\OSDController.cs" />
<Compile Include="FanCtrl\Controller\SiUSBController.cs" />
<Compile Include="FanCtrl\Controller\SiUSBXp.cs" />
<Compile Include="FanCtrl\Controller\WinUSBController.cs" />
<Compile Include="FanCtrl\Data\Control\ControlManager.cs" />
<Compile Include="FanCtrl\Data\Control\FanData.cs" />
<Compile Include="FanCtrl\Data\Control\ControlData.cs" />
<Compile Include="FanCtrl\Data\OSD\OSDGroup.cs" />
<Compile Include="FanCtrl\Data\OSD\OSDItem.cs" />
<Compile Include="FanCtrl\Data\OSD\OSDManager.cs" />
<Compile Include="FanCtrl\Hardware\CLC.cs" />
<Compile Include="FanCtrl\Hardware\Control\BaseControl.cs" />
<Compile Include="FanCtrl\Hardware\Control\CLCFanControl.cs" />
Expand Down Expand Up @@ -211,6 +215,7 @@
<Compile Include="FanCtrl\Data\Option\StartupControl.cs" />
<Compile Include="FanCtrl\Controller\SMBusController.cs" />
<Compile Include="FanCtrl\Controller\USBController.cs" />
<Compile Include="FanCtrl\Util\MessageBoxEx.cs" />
<Compile Include="FanCtrl\Util\Util.cs" />
<Compile Include="LightingForm.cs">
<SubType>Form</SubType>
Expand All @@ -230,6 +235,12 @@
<Compile Include="OptionForm.Designer.cs">
<DependentUpon>OptionForm.cs</DependentUpon>
</Compile>
<Compile Include="OSDForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OSDForm.Designer.cs">
<DependentUpon>OSDForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StringLib.Designer.cs">
Expand All @@ -254,6 +265,9 @@
<EmbeddedResource Include="OptionForm.resx">
<DependentUpon>OptionForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OSDForm.resx">
<DependentUpon>OSDForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Expand Down
56 changes: 56 additions & 0 deletions FanCtrl/Hardware/HardwareManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Security.Principal;
using NvAPIWrapper;
using NvAPIWrapper.GPU;
using System.Text;

namespace FanCtrl
{
Expand Down Expand Up @@ -342,6 +343,9 @@ public void stop()
mPCIMutex.Close();
mPCIMutex = null;
}

OSDController.releaseOSD();

Monitor.Exit(mLock);
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -911,6 +917,56 @@ private void onUpdateThread()
// onUpdateCallback
onUpdateCallback();

var osdManager = OSDManager.getInstance();
if (osdManager.IsEnable == true)
{
var osdString = new StringBuilder();
osdString.Append("<A0=-5>");
osdString.Append("<A1=5>");
osdString.Append("<S0=50>");
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);
}
}
Expand Down
43 changes: 37 additions & 6 deletions MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 27 additions & 3 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public MainForm()

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

var hardwareManager = HardwareManager.getInstance();
var controlManager = ControlManager.getInstance();

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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&currency_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();
}


}
}
Binary file added Portable/FanCtrl_v1.1.6.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Graph : [ZedGraph][8]<br>
- Not all types of hardware are supported.<br>

## 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&currency_code=USD&source=url)
Expand All @@ -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
Loading

0 comments on commit 057a0f9

Please sign in to comment.