Contains mouse event data for the StdPaint.Painter.
Inheritance: System.EventArgs
示例#1
0
 static void Painter_MouseMove(object sender, PainterMouseEventArgs e)
 {
     if (click)
     {
         center = e.UnitLocation;
     }
 }
示例#2
0
 static void Painter_MouseMove(object sender, PainterMouseEventArgs e)
 {
     if (penOn)
     {
         Painter.ActiveBuffer.DrawLine(prevPos.X, prevPos.Y, e.UnitLocation.X, e.UnitLocation.Y, BufferColor.White);
     }
     prevPos = e.UnitLocation;
 }
示例#3
0
 static void Painter_MouseMove(object sender, PainterMouseEventArgs e)
 {
     rotation = (-(double)e.UnitLocation.X / Painter.BackBuffer.Width);
 }
示例#4
0
 static void Painter_LeftButtonUp(object sender, PainterMouseEventArgs e)
 {
     penOn = false;
 }
示例#5
0
 static void Painter_LeftButtonDown(object sender, PainterMouseEventArgs e)
 {
     penOn = true;
     Painter.ActiveBuffer.Buffer[e.UnitLocation.Y, e.UnitLocation.X].BackColor = BufferColor.White;
 }
示例#6
0
 static void Painter_RightButtonDown(object sender, PainterMouseEventArgs e)
 {
     Painter.BackBuffer.DrawCircle(e.UnitLocation.X, e.UnitLocation.Y, 16, new RandomColorBufferBrush(BufferColor.Identity, BufferColor.White));
 }
示例#7
0
 static void Painter_RightButtonDown(object sender, PainterMouseEventArgs e)
 {
     paintBuffer.FloodFill(e.UnitLocation.X, e.UnitLocation.Y, pallette[pen]);
 }
示例#8
0
 static void Painter_MouseMove(object sender, PainterMouseEventArgs e)
 {
     if (penOn)
     {
         paintBuffer.DrawLine(pLast.X, pLast.Y, e.UnitLocation.X, e.UnitLocation.Y, pallette[pen]);
     }
     pLast = e.UnitLocation;
 }
示例#9
0
        static void Painter_LeftButtonDown(object sender, PainterMouseEventArgs e)
        {
            pLast = e.UnitLocation;

            if (!penOn && e.UnitLocation.X < 10 && e.UnitLocation.Y < pallette.Length * 5 / 2)
            {
                pen = e.UnitLocation.Y / 5 + (e.UnitLocation.X / 5) * 8;
            }

            penOn = true;
            paintBuffer.SetUnitBackColor(e.UnitLocation.X, e.UnitLocation.Y, pallette[pen]);
        }
示例#10
0
 static void Painter_LeftButtonDown(object sender, PainterMouseEventArgs e)
 {
     click = true;
 }