Exemplo n.º 1
0
        private void numAlpha_ValueChanged(object sender, EventArgs e)
        {
            if (_lock)
            {
                return;
            }

            CurrentColor = Color.FromArgb((int)numAlpha.Value, CurrentColor);
            if (CurrentDrawObject != null)
            {
                CurrentDrawObject.UpdateColor(CurrentColor);
                redraw(true);
            }
            if (chkErase.Checked)
            {
                EraseColor = CurrentColor;
            }
            else if (chkHighlight.Checked)
            {
                HighlightColor = CurrentColor;
            }
            else
            {
                DrawColor = CurrentColor;
            }
        }
Exemplo n.º 2
0
 private void btnColor_Click(object sender, EventArgs e)
 {
     dlgColor.Color = CurrentColor;
     if (dlgColor.ShowDialog() == DialogResult.OK)
     {
         CurrentColor = Color.FromArgb((int)numAlpha.Value, dlgColor.Color);
         if (CurrentDrawObject != null)
         {
             CurrentDrawObject.UpdateColor(CurrentColor);
             redraw(true);
         }
         if (chkErase.Checked)
         {
             EraseColor = CurrentColor;
         }
         else if (chkHighlight.Checked)
         {
             HighlightColor = CurrentColor;
         }
         else
         {
             DrawColor = CurrentColor;
         }
     }
 }