Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lich426 committed Jan 18, 2021
1 parent c1b31dd commit 0e61863
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 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.3.0.0</ApplicationVersion>
<ApplicationVersion>1.3.1.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
10 changes: 10 additions & 0 deletions FanCtrl/Controller/HidUSBController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class HidUSBController : USBController
{
// HidDevice
private HidStream mHidStream = null;
private bool mIsOpen = false;

private delegate void RecvDelegate();
private delegate void SendDelegate();
Expand Down Expand Up @@ -69,6 +70,7 @@ public override bool start(uint index)
this.stop();
return false;
}
mIsOpen = true;
break;
}
i++;
Expand All @@ -90,6 +92,7 @@ public override void stop()
{
try
{
mIsOpen = false;
if (mHidStream != null)
{
mHidStream.Close();
Expand Down Expand Up @@ -139,6 +142,9 @@ private async void readAsync()

private void read()
{
if (mIsOpen == false)
return;

try
{
if (mHidStream != null && mHidStream.CanRead == true)
Expand All @@ -147,6 +153,10 @@ private void read()
this.onRecv(buffer, buffer.Length);
this.readAsync();
}
else
{
this.readAsync();
}
}
catch { }
}
Expand Down
2 changes: 1 addition & 1 deletion OptionForm.Designer.cs

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

12 changes: 12 additions & 0 deletions OptionForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ public OptionForm()
InitializeComponent();
this.localizeComponent();

if (Screen.PrimaryScreen.WorkingArea.Height < this.Height)
{
this.AutoScroll = true;
this.AutoSizeMode = AutoSizeMode.GrowOnly;
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Width = this.Width + 10;
this.Height = this.Height - 100;

this.MinimumSize = new Size(this.Width, 300);
this.MaximumSize = new Size(this.Width, Int32.MaxValue);
}

mToolTip.SetToolTip(mIntervalTextBox, "100 ≤ value ≤ 5000");
mToolTip.SetToolTip(mStartupDelayTextBox, "0 ≤ value ≤ 59");

Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
[assembly: AssemblyVersion("1.3.0")]
[assembly: AssemblyFileVersion("1.3.0")]
[assembly: AssemblyInformationalVersion("1.3.0")]
[assembly: AssemblyVersion("1.3.1")]
[assembly: AssemblyFileVersion("1.3.1")]
[assembly: AssemblyInformationalVersion("1.3.1")]
Binary file modified dll/LibreHardwareMonitorLib.dll
Binary file not shown.
Binary file modified dll/OpenHardwareMonitorLib.dll
Binary file not shown.

0 comments on commit 0e61863

Please sign in to comment.