/// <summary>
///离开4个按钮时的状态变化
/// </summary>
/// <param></param>
/// <param></param>
private void pxControl_MouseMove(object sender, MouseEventArgs e)
{
if (gpRealTime.IsVisible(e.Location))
{
if (FlageMouseDownRealTime)
{
using (Image imgTemp = Image.FromFile(strWineRealStatusDownPath))
{
dc.DrawImage(imgTemp, BtnLocation[0, 0], BtnLocation[0, 1], BtnSize.Width, BtnSize.Height);
}
}
}
else
{
if (FlageMouseDownRealTime)
{
using (Image imgTemp = Image.FromFile(strWineRealStatusUpPath))
{
dc.DrawImage(imgTemp, BtnLocation[0, 0], BtnLocation[0, 1], BtnSize.Width, BtnSize.Height);
}
FlageMouseDownRealTime = false;
}
}
if (gpWinePos.IsVisible(e.Location))
{
if (FlageMouseDownWinePos)
{
using (Image imgTemp = Image.FromFile(strWinePosQueryDownPath))
{
dc.DrawImage(imgTemp, BtnLocation[1, 0], BtnLocation[1, 1], BtnSize.Width, BtnSize.Height);
}
}
}
else
{
if (FlageMouseDownWinePos)
{
using (Image imgTemp = Image.FromFile(strWinePosQueryUpPath))
{
dc.DrawImage(imgTemp, BtnLocation[1, 0], BtnLocation[1, 1], BtnSize.Width, BtnSize.Height);
}
FlageMouseDownWinePos = false;
}
}
if (gpCupIntrol.IsVisible(e.Location))
{
if (FlageMouseDownCupIntrol)
{
using (Image imgTemp = Image.FromFile(strWineCupIntroDownPath))
{
dc.DrawImage(imgTemp, BtnLocation[2, 0], BtnLocation[2, 1], BtnSize.Width, BtnSize.Height);
}
}
}
else
{
if (FlageMouseDownCupIntrol)
{
using (Image imgTemp = Image.FromFile(strWineCupIntroUpPath))
{
dc.DrawImage(imgTemp, BtnLocation[2, 0], BtnLocation[2, 1], BtnSize.Width, BtnSize.Height);
}
FlageMouseDownCupIntrol = false;
}
}
if (gpNetPurchase.IsVisible(e.Location))
{
if (FlageMouseDownNetPurchase)
{
using (Image imgTemp = Image.FromFile(strWinePurchaseDownPath))
{
dc.DrawImage(imgTemp, BtnLocation[3, 0], BtnLocation[3, 1], BtnSize.Width, BtnSize.Height);
}
}
}
else
{
if (FlageMouseDownNetPurchase)
{
using (Image imgTemp = Image.FromFile(strWinePurchaseUpPath))
{
dc.DrawImage(imgTemp, BtnLocation[3, 0], BtnLocation[3, 1], BtnSize.Width, BtnSize.Height);
}
FlageMouseDownNetPurchase = false;
}
}
}
C# 在winform画面上点击某个区域造成按钮按下效果(3)
内容版权声明:除非注明,否则皆为本站原创文章。