Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 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;
            }
        }
Esempio n. 4
0
 public Form1()
 {
     InitializeComponent();
     this.toolStrip_colordialog.BackColor = Color.Black;
     this.selectedTool = Tool.TOOL.EMPTY;
 }
Esempio n. 5
0
 private void toolStrip_oval_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.OVAL;
 }
Esempio n. 6
0
 private void toolStrip_square_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.SQUARE;
 }
Esempio n. 7
0
 private void toolStrip_line_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.LINE;
 }
Esempio n. 8
0
 private void toolStrip_brush_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.BRUSH;
 }
Esempio n. 9
0
 private void toolStrip_pencil_Click(object sender, EventArgs e)
 {
     this.selectedTool = Tool.TOOL.PENCIL;
 }