C# 在winform画面上点击某个区域造成按钮按下效果(4)

/// <summary>
    ///松开4个按钮时的状态变化
    /// </summary>
    /// <param></param>
    /// <param></param>
    private void pxControl_MouseUp(object sender, MouseEventArgs e)
    {
        if (gpRealTime.IsVisible(e.Location))
        {
            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))
        {
            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))
        {
            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))
        {
            using (Image imgTemp = Image.FromFile(strWinePurchaseUpPath))
            {
                dc.DrawImage(imgTemp, BtnLocation[3, 0], BtnLocation[3, 1], BtnSize.Width, BtnSize.Height);
                FlageMouseDownNetPurchase = false;
            }
        }
    }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyjwwy.html