UITimePicker添加鼠标滚轮选择时间功能
This commit is contained in:
parent
6327f936a7
commit
7b6986d542
@ -60,30 +60,30 @@ namespace Sunny.UI
|
||||
{
|
||||
if (e.Delta < 0)
|
||||
{
|
||||
if (new Rectangle(hc.Location, h1.Size).Contains(e.X, e.Y))
|
||||
if (new Rectangle(hc.Location, hc.Size).Contains(e.X, e.Y))
|
||||
{
|
||||
h1_Click(null, null);
|
||||
}
|
||||
else if (new Rectangle(mc.Location, m1.Size).Contains(e.X, e.Y))
|
||||
else if (new Rectangle(mc.Location, mc.Size).Contains(e.X, e.Y))
|
||||
{
|
||||
m1_Click(null, null);
|
||||
}
|
||||
else if (new Rectangle(sc.Location, s1.Size).Contains(e.X, e.Y))
|
||||
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, h1.Size).Contains(e.X, e.Y))
|
||||
if (new Rectangle(hc.Location, hc.Size).Contains(e.X, e.Y))
|
||||
{
|
||||
h2_Click(null, null);
|
||||
}
|
||||
else if (new Rectangle(mc.Location, m1.Size).Contains(e.X, e.Y))
|
||||
else if (new Rectangle(mc.Location, hc.Size).Contains(e.X, e.Y))
|
||||
{
|
||||
m2_Click(null, null);
|
||||
}
|
||||
else if (new Rectangle(sc.Location, s1.Size).Contains(e.X, e.Y))
|
||||
else if (new Rectangle(sc.Location, sc.Size).Contains(e.X, e.Y))
|
||||
{
|
||||
s2_Click(null, null);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user