This commit is contained in:
Sunny 2020-05-30 21:31:43 +08:00
commit 459a342ab3
6 changed files with 649 additions and 463 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -53,6 +53,41 @@ namespace Sunny.UI
public UITimeItem() public UITimeItem()
{ {
InitializeComponent(); InitializeComponent();
this.MouseWheel += UITimeItem_MouseWheel;
}
private void UITimeItem_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Delta < 0)
{
if (new Rectangle(hc.Location, hc.Size).Contains(e.X, e.Y))
{
h1_Click(null, null);
}
else if (new Rectangle(mc.Location, mc.Size).Contains(e.X, e.Y))
{
m1_Click(null, null);
}
else if (new Rectangle(sc.Location, sc.Size).Contains(e.X, e.Y))
{
s1_Click(null, null);
}
}
else if (e.Delta > 0)
{
if (new Rectangle(hc.Location, hc.Size).Contains(e.X, e.Y))
{
h2_Click(null, null);
}
else if (new Rectangle(mc.Location, mc.Size).Contains(e.X, e.Y))
{
m2_Click(null, null);
}
else if (new Rectangle(sc.Location, sc.Size).Contains(e.X, e.Y))
{
s2_Click(null, null);
}
}
} }
private DateTime time; private DateTime time;

File diff suppressed because it is too large Load Diff