private void button_Color_All_Click(object sender, EventArgs e) { if (drawlingObject == DrawlingObject.Rect) { drawlingObject = DrawlingObject.Zalivka; SolidBrush solidBrush = new SolidBrush(button_color.BackColor); graphics.FillRectangle(solidBrush, x, y, w, h); } else { pictureBox1.BackColor = button_color.BackColor; } }
private void button_Rectangle_Click(object sender, EventArgs e) { drawlingObject = DrawlingObject.Rect; }
private void button_Text_Click(object sender, EventArgs e) { drawlingObject = DrawlingObject.text; }
private void button_Pen_Click(object sender, EventArgs e) { pen.Color = button_color.BackColor; drawlingObject = DrawlingObject.Pen; }
private void button_triangle_Click(object sender, EventArgs e) { drawlingObject = DrawlingObject.triengle; }
private void button_line_Click(object sender, EventArgs e) { drawlingObject = DrawlingObject.Line; }
private void button_circle_Click(object sender, EventArgs e) { drawlingObject = DrawlingObject.Circle; }