Browse Source

bug

master
yibo 7 years ago
parent
commit
7977cc5527
1 changed files with 4 additions and 9 deletions
  1. +4
    -9
      WinFormControl/UWeightControl.cs

+ 4
- 9
WinFormControl/UWeightControl.cs View File

@ -34,7 +34,6 @@ namespace WinFormControl
public UWeightControl() public UWeightControl()
{ {
InitializeComponent(); InitializeComponent();
weightSwitch.FlatAppearance.BorderColor = Color.FromArgb(45, 155, 214);
} }
[Browsable(false)] [Browsable(false)]
@ -92,22 +91,18 @@ namespace WinFormControl
ChangeWeightBtnState(); ChangeWeightBtnState();
throw; throw;
} }
finally
{
this.Focus();
}
} }
void ChangeWeightBtnState() void ChangeWeightBtnState()
{ {
if (switchOn) if (switchOn)
{
weightSwitch.BackgroundImage = Resources.onclickBtn;
weightSwitch.ForeColor = Color.White;
weightSwitch.Text = "停止称重"; weightSwitch.Text = "停止称重";
}
else else
{
weightSwitch.BackgroundImage = Resources.simpleBtn;
weightSwitch.ForeColor = Color.Black;
weightSwitch.Text = "启用称重"; weightSwitch.Text = "启用称重";
}
} }
void OpenSerialPort() void OpenSerialPort()


Loading…
Cancel
Save