示例#1
0
文件: TrayPanel.cs 项目: licanwen/op
 private void label_Click(object sender, EventArgs e)
 {
     if (bFlag && !bShowModel)
     {
         Button btn = (Button)sender;
         //btn.BackColor = System.Drawing.SystemColors.InactiveCaption;
         //btn.BackgroundImage = null;
         SetBtnColor(btn, backColor);
         t.AddEmptyPos(btn.Name);
     }
     if (bRemoveFlag && !bShowModel)
     {
         Button btn = (Button)sender;
         //btn.BackgroundImage = Properties.Resources.ball_blue_b;
         SetBtnColor(btn, Color.Blue);
         t.RemoveEmptyPos(btn.Name);
     }
 }
示例#2
0
        private void label_Click(object sender, EventArgs e)
        {
            var btn    = (uButton)sender;
            var str    = btn.Name.Split('_');
            var locate = new Coordinate();

            locate.Row    = int.Parse(str[0]);
            locate.Column = int.Parse(str[1]);
            Locate        = locate;
            if (bFlag && !bShowModel)
            {
                SetBtnColor(btn, backColor);
                t.AddEmptyPos(btn.Name);
            }
            if (bRemoveFlag && !bShowModel)
            {
                SetBtnColor(btn, Color.Blue);
                t.RemoveEmptyPos(btn.Name);
            }
        }