Пример #1
0
        private void Form2_MouseUp(object sender, MouseEventArgs e)
        {
            this.selectedTool = ((Form1)this.MdiParent).selectedTool;

            switch (this.selectedTool)
            {
            case Tool.TOOL.PENCIL:
            case Tool.TOOL.BRUSH:
                Pencil_Up();
                isRecord = false;
                break;

            case Tool.TOOL.LINE:
            case Tool.TOOL.SQUARE:
            case Tool.TOOL.OVAL:
                Shape_Up();
                break;

            case Tool.TOOL.WIDTH:
                break;

            case Tool.TOOL.FILL:
                break;
            }
            drawAllUp();
            this.panel1.Update();
        }
Пример #2
0
        private void Form2_MouseMove(object sender, MouseEventArgs e)
        {
            if (!isRecord)
            {
                return;
            }

            this.selectedTool = ((Form1)this.MdiParent).selectedTool;
            switch (this.selectedTool)
            {
            case Tool.TOOL.PENCIL:
            case Tool.TOOL.BRUSH:
                Pencil_Move();
                break;

            case Tool.TOOL.LINE:
            case Tool.TOOL.SQUARE:
            case Tool.TOOL.OVAL:
                Shape_Move();
                break;

            case Tool.TOOL.WIDTH:
                break;

            case Tool.TOOL.FILL:
                break;
            }
            this.panel1.Update();
        }
Пример #3
0
        private void Form2_MouseDown(object sender, MouseEventArgs e)
        {
            this.selectedTool = ((Form1)this.MdiParent).selectedTool;
            isRecord          = true;
            switch (this.selectedTool)
            {
            case Tool.TOOL.PENCIL:
            case Tool.TOOL.BRUSH:
                Pencil_Start();
                break;

            case Tool.TOOL.LINE:
            case Tool.TOOL.SQUARE:
            case Tool.TOOL.OVAL:
                Shape_Start();
                break;

            case Tool.TOOL.WIDTH:
                break;

            case Tool.TOOL.FILL:
                break;
            }
        }
Пример #4
0
 public Form1()
 {
     InitializeComponent();
     this.toolStrip_colordialog.BackColor = Color.Black;
     this.selectedTool = Tool.TOOL.EMPTY;
 }
Пример #5
0
 private void toolStrip_oval_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.OVAL;
 }
Пример #6
0
 private void toolStrip_square_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.SQUARE;
 }
Пример #7
0
 private void toolStrip_line_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.LINE;
 }
Пример #8
0
 private void toolStrip_brush_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.BRUSH;
 }
Пример #9
0
 private void toolStrip_pencil_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.PENCIL;
 }