Reworked the tool selection

This commit is contained in:
2022-05-30 13:40:07 +02:00
parent 6141737d30
commit dc9e6daafa
6 changed files with 419 additions and 467 deletions

View File

@@ -1,4 +1,9 @@
using System;
/// file: DotPencil.cs
/// Author: Maxime Rohmer <maxluligames@gmail.com>
/// Brief: A variant of the default tool
/// Version: 0.1.0
/// Date: 25/05/2022
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -13,17 +18,21 @@ namespace Paint_2
private List<Color> _colors;
private List<int> _widths;
private Color _color;
private string _name;
private int _width;
public List<List<Point>> Drawings { get => _drawings; set => _drawings = value; }
public List<Color> Colors { get => _colors; set => _colors = value; }
public List<int> Widths { get => _widths; set => _widths = value; }
public Color Color { get => _color; set => _color = value; }
public int Width { get => _width; set => _width = value; }
public DotPencil()
public string Name { get => _name; set => _name = value; }
public DotPencil(string name)
{
Drawings = new List<List<Point>>();
Colors = new List<Color>();
Widths = new List<int>();
Name = name;
}
public void Add(Point point)
{
@@ -92,5 +101,9 @@ namespace Paint_2
}
return result;
}
public override string ToString()
{
return Name;
}
}
}

View File

@@ -37,39 +37,12 @@
this.btnResize = new System.Windows.Forms.Button();
this.nupHeight = new System.Windows.Forms.NumericUpDown();
this.nupWidth = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.btnColorHistory4 = new System.Windows.Forms.Button();
this.btnColorHistory3 = new System.Windows.Forms.Button();
this.btnColorHistory2 = new System.Windows.Forms.Button();
this.btnColorHistory1 = new System.Windows.Forms.Button();
this.lblSelectedColor = new System.Windows.Forms.Label();
this.btnImportImage = new System.Windows.Forms.Button();
this.tbxColorHex = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.nupRed = new System.Windows.Forms.NumericUpDown();
this.nupGreen = new System.Windows.Forms.NumericUpDown();
this.nupBlue = new System.Windows.Forms.NumericUpDown();
this.nupPencilWidth = new System.Windows.Forms.NumericUpDown();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.btnPencil = new System.Windows.Forms.Button();
this.btnDotTracer = new System.Windows.Forms.Button();
this.btnShapeCreator = new System.Windows.Forms.Button();
this.btnSpray = new System.Windows.Forms.Button();
this.btnRectangle = new System.Windows.Forms.Button();
this.btnCircle = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.btnFill = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.label10 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.label11 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.btnSetColor = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.btnSelectedColor = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
@@ -78,18 +51,40 @@
this.lblHoveringColor = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.tmrRefresh = new System.Windows.Forms.Timer(this.components);
this.nupGreen = new System.Windows.Forms.NumericUpDown();
this.nupBlue = new System.Windows.Forms.NumericUpDown();
this.nupRed = new System.Windows.Forms.NumericUpDown();
this.nupPencilWidth = new System.Windows.Forms.NumericUpDown();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnColorHistory4 = new System.Windows.Forms.Button();
this.btnColorHistory3 = new System.Windows.Forms.Button();
this.btnColorHistory2 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.btnColorHistory1 = new System.Windows.Forms.Button();
this.tbxColorHex = new System.Windows.Forms.TextBox();
this.btnClear = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.btnSetColor = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.lsbTools = new System.Windows.Forms.ListBox();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.canvas)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupHeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupWidth)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupRed)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupGreen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupBlue)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupPencilWidth)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nupGreen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupBlue)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupRed)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nupPencilWidth)).BeginInit();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// tbxProjectName
@@ -206,64 +201,6 @@
0,
0});
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(30, 73);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(90, 20);
this.label5.TabIndex = 9;
this.label5.Text = "Set color";
//
// btnColorHistory4
//
this.btnColorHistory4.BackColor = System.Drawing.Color.Red;
this.btnColorHistory4.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory4.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory4.Location = new System.Drawing.Point(107, 45);
this.btnColorHistory4.Name = "btnColorHistory4";
this.btnColorHistory4.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory4.TabIndex = 4;
this.btnColorHistory4.UseVisualStyleBackColor = false;
this.btnColorHistory4.Click += new System.EventHandler(this.BtnColor_Click);
//
// btnColorHistory3
//
this.btnColorHistory3.BackColor = System.Drawing.Color.Red;
this.btnColorHistory3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory3.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory3.Location = new System.Drawing.Point(76, 45);
this.btnColorHistory3.Name = "btnColorHistory3";
this.btnColorHistory3.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory3.TabIndex = 3;
this.btnColorHistory3.UseVisualStyleBackColor = false;
this.btnColorHistory3.Click += new System.EventHandler(this.BtnColor_Click);
//
// btnColorHistory2
//
this.btnColorHistory2.BackColor = System.Drawing.Color.Red;
this.btnColorHistory2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory2.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory2.Location = new System.Drawing.Point(45, 45);
this.btnColorHistory2.Name = "btnColorHistory2";
this.btnColorHistory2.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory2.TabIndex = 2;
this.btnColorHistory2.UseVisualStyleBackColor = false;
this.btnColorHistory2.Click += new System.EventHandler(this.BtnColor_Click);
//
// btnColorHistory1
//
this.btnColorHistory1.BackColor = System.Drawing.Color.Green;
this.btnColorHistory1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory1.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory1.Location = new System.Drawing.Point(14, 45);
this.btnColorHistory1.Name = "btnColorHistory1";
this.btnColorHistory1.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory1.TabIndex = 0;
this.btnColorHistory1.UseVisualStyleBackColor = false;
this.btnColorHistory1.Click += new System.EventHandler(this.BtnColor_Click);
//
// lblSelectedColor
//
this.lblSelectedColor.AutoSize = true;
@@ -286,250 +223,6 @@
this.btnImportImage.Text = "Import Image";
this.btnImportImage.UseVisualStyleBackColor = false;
//
// tbxColorHex
//
this.tbxColorHex.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.tbxColorHex.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxColorHex.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tbxColorHex.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.tbxColorHex.Location = new System.Drawing.Point(10, 116);
this.tbxColorHex.Name = "tbxColorHex";
this.tbxColorHex.Size = new System.Drawing.Size(85, 25);
this.tbxColorHex.TabIndex = 10;
this.tbxColorHex.Text = "#FFFFFF";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(10, 93);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(36, 20);
this.label6.TabIndex = 11;
this.label6.Text = "Hex";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(10, 144);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(36, 20);
this.label7.TabIndex = 12;
this.label7.Text = "RGB";
//
// nupRed
//
this.nupRed.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupRed.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupRed.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupRed.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupRed.Location = new System.Drawing.Point(10, 167);
this.nupRed.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupRed.Name = "nupRed";
this.nupRed.Size = new System.Drawing.Size(85, 21);
this.nupRed.TabIndex = 13;
this.nupRed.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// nupGreen
//
this.nupGreen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupGreen.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupGreen.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupGreen.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupGreen.Location = new System.Drawing.Point(10, 198);
this.nupGreen.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupGreen.Name = "nupGreen";
this.nupGreen.Size = new System.Drawing.Size(85, 21);
this.nupGreen.TabIndex = 14;
this.nupGreen.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// nupBlue
//
this.nupBlue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupBlue.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupBlue.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupBlue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupBlue.Location = new System.Drawing.Point(10, 229);
this.nupBlue.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupBlue.Name = "nupBlue";
this.nupBlue.Size = new System.Drawing.Size(85, 21);
this.nupBlue.TabIndex = 15;
this.nupBlue.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// nupPencilWidth
//
this.nupPencilWidth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupPencilWidth.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupPencilWidth.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupPencilWidth.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupPencilWidth.Location = new System.Drawing.Point(10, 309);
this.nupPencilWidth.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupPencilWidth.Name = "nupPencilWidth";
this.nupPencilWidth.Size = new System.Drawing.Size(141, 21);
this.nupPencilWidth.TabIndex = 17;
this.nupPencilWidth.Value = new decimal(new int[] {
10,
0,
0,
0});
this.nupPencilWidth.ValueChanged += new System.EventHandler(this.nupPencilWidth_ValueChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label8.Location = new System.Drawing.Point(30, 257);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(99, 20);
this.label8.TabIndex = 18;
this.label8.Text = "Set pencil";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(10, 286);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(54, 20);
this.label9.TabIndex = 19;
this.label9.Text = "Width";
//
// btnPencil
//
this.btnPencil.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnPencil.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnPencil.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPencil.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnPencil.Location = new System.Drawing.Point(10, 340);
this.btnPencil.Name = "btnPencil";
this.btnPencil.Size = new System.Drawing.Size(141, 31);
this.btnPencil.TabIndex = 20;
this.btnPencil.Text = "Pencil";
this.btnPencil.UseVisualStyleBackColor = false;
this.btnPencil.Click += new System.EventHandler(this.btnPencil_Click);
//
// btnDotTracer
//
this.btnDotTracer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnDotTracer.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnDotTracer.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDotTracer.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnDotTracer.Location = new System.Drawing.Point(10, 377);
this.btnDotTracer.Name = "btnDotTracer";
this.btnDotTracer.Size = new System.Drawing.Size(141, 31);
this.btnDotTracer.TabIndex = 21;
this.btnDotTracer.Text = "Dot tracer";
this.btnDotTracer.UseVisualStyleBackColor = false;
this.btnDotTracer.Click += new System.EventHandler(this.btnDotTracer_Click);
//
// btnShapeCreator
//
this.btnShapeCreator.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnShapeCreator.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnShapeCreator.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnShapeCreator.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnShapeCreator.Location = new System.Drawing.Point(10, 414);
this.btnShapeCreator.Name = "btnShapeCreator";
this.btnShapeCreator.Size = new System.Drawing.Size(141, 31);
this.btnShapeCreator.TabIndex = 22;
this.btnShapeCreator.Text = "Shape creator";
this.btnShapeCreator.UseVisualStyleBackColor = false;
//
// btnSpray
//
this.btnSpray.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnSpray.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSpray.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSpray.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnSpray.Location = new System.Drawing.Point(10, 451);
this.btnSpray.Name = "btnSpray";
this.btnSpray.Size = new System.Drawing.Size(141, 31);
this.btnSpray.TabIndex = 23;
this.btnSpray.Text = "Spray";
this.btnSpray.UseVisualStyleBackColor = false;
//
// btnRectangle
//
this.btnRectangle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnRectangle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnRectangle.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRectangle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnRectangle.Location = new System.Drawing.Point(11, 488);
this.btnRectangle.Name = "btnRectangle";
this.btnRectangle.Size = new System.Drawing.Size(140, 31);
this.btnRectangle.TabIndex = 24;
this.btnRectangle.Text = "Rectangle";
this.btnRectangle.UseVisualStyleBackColor = false;
//
// btnCircle
//
this.btnCircle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnCircle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCircle.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCircle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnCircle.Location = new System.Drawing.Point(11, 562);
this.btnCircle.Name = "btnCircle";
this.btnCircle.Size = new System.Drawing.Size(140, 31);
this.btnCircle.TabIndex = 26;
this.btnCircle.Text = "Circle";
this.btnCircle.UseVisualStyleBackColor = false;
//
// btnClear
//
this.btnClear.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnClear.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnClear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnClear.Location = new System.Drawing.Point(10, 599);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(141, 31);
this.btnClear.TabIndex = 27;
this.btnClear.Text = "Clear";
this.btnClear.UseVisualStyleBackColor = false;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// btnFill
//
this.btnFill.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnFill.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnFill.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnFill.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnFill.Location = new System.Drawing.Point(11, 525);
this.btnFill.Name = "btnFill";
this.btnFill.Size = new System.Drawing.Size(140, 31);
this.btnFill.TabIndex = 28;
this.btnFill.Text = "Fill";
this.btnFill.UseVisualStyleBackColor = false;
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
@@ -552,16 +245,6 @@
this.label10.TabIndex = 29;
this.label10.Text = "File";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(10, 25);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(135, 20);
this.label4.TabIndex = 1;
this.label4.Text = "Colors history";
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
@@ -585,78 +268,6 @@
this.label11.TabIndex = 29;
this.label11.Text = "Drawing";
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
this.panel3.Controls.Add(this.button1);
this.panel3.Controls.Add(this.btnSetColor);
this.panel3.Controls.Add(this.btnFill);
this.panel3.Controls.Add(this.label13);
this.panel3.Controls.Add(this.btnClear);
this.panel3.Controls.Add(this.tbxColorHex);
this.panel3.Controls.Add(this.btnCircle);
this.panel3.Controls.Add(this.btnColorHistory1);
this.panel3.Controls.Add(this.btnRectangle);
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.btnSpray);
this.panel3.Controls.Add(this.btnColorHistory2);
this.panel3.Controls.Add(this.btnShapeCreator);
this.panel3.Controls.Add(this.btnColorHistory3);
this.panel3.Controls.Add(this.btnDotTracer);
this.panel3.Controls.Add(this.btnColorHistory4);
this.panel3.Controls.Add(this.btnPencil);
this.panel3.Controls.Add(this.label5);
this.panel3.Controls.Add(this.label9);
this.panel3.Controls.Add(this.label6);
this.panel3.Controls.Add(this.label8);
this.panel3.Controls.Add(this.label7);
this.panel3.Controls.Add(this.nupPencilWidth);
this.panel3.Controls.Add(this.nupRed);
this.panel3.Controls.Add(this.nupBlue);
this.panel3.Controls.Add(this.nupGreen);
this.panel3.Location = new System.Drawing.Point(926, 12);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(163, 642);
this.panel3.TabIndex = 31;
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button1.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.button1.Location = new System.Drawing.Point(101, 167);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 83);
this.button1.TabIndex = 31;
this.button1.Text = "Set";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnSetColor
//
this.btnSetColor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnSetColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSetColor.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSetColor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnSetColor.Location = new System.Drawing.Point(101, 113);
this.btnSetColor.Name = "btnSetColor";
this.btnSetColor.Size = new System.Drawing.Size(56, 31);
this.btnSetColor.TabIndex = 30;
this.btnSetColor.Text = "Set";
this.btnSetColor.UseVisualStyleBackColor = false;
this.btnSetColor.Click += new System.EventHandler(this.btnSetColor_Click);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Cascadia Code", 10F);
this.label13.Location = new System.Drawing.Point(6, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(60, 22);
this.label13.TabIndex = 29;
this.label13.Text = "Tools";
//
// panel4
//
this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
@@ -735,6 +346,315 @@
this.tmrRefresh.Interval = 1;
this.tmrRefresh.Tick += new System.EventHandler(this.tmrRefresh_Tick);
//
// nupGreen
//
this.nupGreen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupGreen.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupGreen.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupGreen.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupGreen.Location = new System.Drawing.Point(10, 198);
this.nupGreen.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupGreen.Name = "nupGreen";
this.nupGreen.Size = new System.Drawing.Size(85, 21);
this.nupGreen.TabIndex = 14;
this.nupGreen.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// nupBlue
//
this.nupBlue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupBlue.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupBlue.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupBlue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupBlue.Location = new System.Drawing.Point(10, 229);
this.nupBlue.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupBlue.Name = "nupBlue";
this.nupBlue.Size = new System.Drawing.Size(85, 21);
this.nupBlue.TabIndex = 15;
this.nupBlue.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// nupRed
//
this.nupRed.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupRed.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupRed.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupRed.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupRed.Location = new System.Drawing.Point(10, 167);
this.nupRed.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupRed.Name = "nupRed";
this.nupRed.Size = new System.Drawing.Size(85, 21);
this.nupRed.TabIndex = 13;
this.nupRed.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// nupPencilWidth
//
this.nupPencilWidth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.nupPencilWidth.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.nupPencilWidth.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nupPencilWidth.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.nupPencilWidth.Location = new System.Drawing.Point(10, 309);
this.nupPencilWidth.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.nupPencilWidth.Name = "nupPencilWidth";
this.nupPencilWidth.Size = new System.Drawing.Size(141, 21);
this.nupPencilWidth.TabIndex = 17;
this.nupPencilWidth.Value = new decimal(new int[] {
10,
0,
0,
0});
this.nupPencilWidth.ValueChanged += new System.EventHandler(this.nupPencilWidth_ValueChanged);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(10, 144);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(36, 20);
this.label7.TabIndex = 12;
this.label7.Text = "RGB";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label8.Location = new System.Drawing.Point(30, 257);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(99, 20);
this.label8.TabIndex = 18;
this.label8.Text = "Set pencil";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(10, 93);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(36, 20);
this.label6.TabIndex = 11;
this.label6.Text = "Hex";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(10, 286);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(54, 20);
this.label9.TabIndex = 19;
this.label9.Text = "Width";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(30, 73);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(90, 20);
this.label5.TabIndex = 9;
this.label5.Text = "Set color";
//
// btnColorHistory4
//
this.btnColorHistory4.BackColor = System.Drawing.Color.Red;
this.btnColorHistory4.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory4.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory4.Location = new System.Drawing.Point(107, 45);
this.btnColorHistory4.Name = "btnColorHistory4";
this.btnColorHistory4.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory4.TabIndex = 4;
this.btnColorHistory4.UseVisualStyleBackColor = false;
this.btnColorHistory4.Click += new System.EventHandler(this.BtnColor_Click);
//
// btnColorHistory3
//
this.btnColorHistory3.BackColor = System.Drawing.Color.Red;
this.btnColorHistory3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory3.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory3.Location = new System.Drawing.Point(76, 45);
this.btnColorHistory3.Name = "btnColorHistory3";
this.btnColorHistory3.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory3.TabIndex = 3;
this.btnColorHistory3.UseVisualStyleBackColor = false;
this.btnColorHistory3.Click += new System.EventHandler(this.BtnColor_Click);
//
// btnColorHistory2
//
this.btnColorHistory2.BackColor = System.Drawing.Color.Red;
this.btnColorHistory2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory2.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory2.Location = new System.Drawing.Point(45, 45);
this.btnColorHistory2.Name = "btnColorHistory2";
this.btnColorHistory2.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory2.TabIndex = 2;
this.btnColorHistory2.UseVisualStyleBackColor = false;
this.btnColorHistory2.Click += new System.EventHandler(this.BtnColor_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(10, 25);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(135, 20);
this.label4.TabIndex = 1;
this.label4.Text = "Colors history";
//
// btnColorHistory1
//
this.btnColorHistory1.BackColor = System.Drawing.Color.Green;
this.btnColorHistory1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnColorHistory1.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnColorHistory1.Location = new System.Drawing.Point(14, 45);
this.btnColorHistory1.Name = "btnColorHistory1";
this.btnColorHistory1.Size = new System.Drawing.Size(25, 25);
this.btnColorHistory1.TabIndex = 0;
this.btnColorHistory1.UseVisualStyleBackColor = false;
this.btnColorHistory1.Click += new System.EventHandler(this.BtnColor_Click);
//
// tbxColorHex
//
this.tbxColorHex.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.tbxColorHex.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxColorHex.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tbxColorHex.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.tbxColorHex.Location = new System.Drawing.Point(10, 116);
this.tbxColorHex.Name = "tbxColorHex";
this.tbxColorHex.Size = new System.Drawing.Size(85, 25);
this.tbxColorHex.TabIndex = 10;
this.tbxColorHex.Text = "#FFFFFF";
//
// btnClear
//
this.btnClear.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnClear.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnClear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnClear.Location = new System.Drawing.Point(10, 599);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(147, 31);
this.btnClear.TabIndex = 27;
this.btnClear.Text = "Clear";
this.btnClear.UseVisualStyleBackColor = false;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Cascadia Code", 10F);
this.label13.Location = new System.Drawing.Point(6, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(60, 22);
this.label13.TabIndex = 29;
this.label13.Text = "Tools";
//
// btnSetColor
//
this.btnSetColor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.btnSetColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSetColor.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSetColor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.btnSetColor.Location = new System.Drawing.Point(101, 113);
this.btnSetColor.Name = "btnSetColor";
this.btnSetColor.Size = new System.Drawing.Size(56, 31);
this.btnSetColor.TabIndex = 30;
this.btnSetColor.Text = "Set";
this.btnSetColor.UseVisualStyleBackColor = false;
this.btnSetColor.Click += new System.EventHandler(this.btnSetColor_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button1.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.button1.Location = new System.Drawing.Point(101, 167);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 83);
this.button1.TabIndex = 31;
this.button1.Text = "Set";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31)))));
this.panel3.Controls.Add(this.label2);
this.panel3.Controls.Add(this.lsbTools);
this.panel3.Controls.Add(this.button1);
this.panel3.Controls.Add(this.btnSetColor);
this.panel3.Controls.Add(this.label13);
this.panel3.Controls.Add(this.btnClear);
this.panel3.Controls.Add(this.tbxColorHex);
this.panel3.Controls.Add(this.btnColorHistory1);
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.btnColorHistory2);
this.panel3.Controls.Add(this.btnColorHistory3);
this.panel3.Controls.Add(this.btnColorHistory4);
this.panel3.Controls.Add(this.label5);
this.panel3.Controls.Add(this.label9);
this.panel3.Controls.Add(this.label6);
this.panel3.Controls.Add(this.label8);
this.panel3.Controls.Add(this.label7);
this.panel3.Controls.Add(this.nupPencilWidth);
this.panel3.Controls.Add(this.nupRed);
this.panel3.Controls.Add(this.nupBlue);
this.panel3.Controls.Add(this.nupGreen);
this.panel3.Location = new System.Drawing.Point(926, 12);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(163, 642);
this.panel3.TabIndex = 31;
//
// lsbTools
//
this.lsbTools.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41)))));
this.lsbTools.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lsbTools.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214)))));
this.lsbTools.FormattingEnabled = true;
this.lsbTools.ItemHeight = 22;
this.lsbTools.Location = new System.Drawing.Point(10, 358);
this.lsbTools.Name = "lsbTools";
this.lsbTools.Size = new System.Drawing.Size(141, 222);
this.lsbTools.TabIndex = 32;
this.lsbTools.SelectedIndexChanged += new System.EventHandler(this.lsbTools_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(10, 335);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(54, 20);
this.label2.TabIndex = 33;
this.label2.Text = "Tools";
//
// PaintForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F);
@@ -756,20 +676,20 @@
((System.ComponentModel.ISupportInitialize)(this.canvas)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupHeight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupWidth)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupRed)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupGreen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupBlue)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupPencilWidth)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nupGreen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupBlue)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupRed)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupPencilWidth)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.ResumeLayout(false);
}
@@ -784,37 +704,12 @@
private System.Windows.Forms.Button btnResize;
private System.Windows.Forms.NumericUpDown nupHeight;
private System.Windows.Forms.NumericUpDown nupWidth;
private System.Windows.Forms.Button btnColorHistory4;
private System.Windows.Forms.Button btnColorHistory3;
private System.Windows.Forms.Button btnColorHistory2;
private System.Windows.Forms.Button btnColorHistory1;
private System.Windows.Forms.Label lblSelectedColor;
private System.Windows.Forms.Button btnImportImage;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Button btnCircle;
private System.Windows.Forms.Button btnRectangle;
private System.Windows.Forms.Button btnSpray;
private System.Windows.Forms.Button btnShapeCreator;
private System.Windows.Forms.Button btnDotTracer;
private System.Windows.Forms.Button btnPencil;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.NumericUpDown nupPencilWidth;
private System.Windows.Forms.NumericUpDown nupBlue;
private System.Windows.Forms.NumericUpDown nupGreen;
private System.Windows.Forms.NumericUpDown nupRed;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox tbxColorHex;
private System.Windows.Forms.Button btnFill;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Panel panel5;
@@ -823,8 +718,28 @@
private System.Windows.Forms.Timer tmrRefresh;
private System.Windows.Forms.Button btnHoveringColor;
private System.Windows.Forms.Button btnSelectedColor;
private System.Windows.Forms.NumericUpDown nupGreen;
private System.Windows.Forms.NumericUpDown nupBlue;
private System.Windows.Forms.NumericUpDown nupRed;
private System.Windows.Forms.NumericUpDown nupPencilWidth;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnColorHistory4;
private System.Windows.Forms.Button btnColorHistory3;
private System.Windows.Forms.Button btnColorHistory2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnColorHistory1;
private System.Windows.Forms.TextBox tbxColorHex;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Button btnSetColor;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListBox lsbTools;
}
}

View File

@@ -1,4 +1,9 @@
using System;
/// file: Form1.cs
/// Author: Maxime Rohmer <maxluligames@gmail.com>
/// Brief: Class that is controlling the view
/// Version: 0.1.0
/// Date: 25/05/2022
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -14,9 +19,6 @@ namespace Paint_2
{
public partial class PaintForm : Form
{
const int DEFAULT_PENCIL = 0;
const int DOT_PENCIL = 1;
const string DEFAULT_FILEPATH = "C:/Paint2/Drawings/";
Sketch sketch;
List<PaintTool> toolList;
@@ -31,8 +33,8 @@ namespace Paint_2
nupWidth.Value = canvas.Width;
nupHeight.Value = canvas.Height;
toolList = new List<PaintTool>();
toolList.Add(new Pencil());
toolList.Add(new DotPencil());
toolList.Add(new Pencil("Default Pencil"));
toolList.Add(new DotPencil("Dotted Line"));
sketch = new Sketch(new Size((int)nupWidth.Value, (int)nupHeight.Value), toolList);
canvas.Image = sketch.Drawing;
tmrRefresh.Enabled = true;
@@ -91,6 +93,8 @@ namespace Paint_2
btnColorHistory2.BackColor = colorHistory[1];
btnColorHistory3.BackColor = colorHistory[2];
btnColorHistory4.BackColor = colorHistory[3];
lsbTools.DataSource = toolList;
}
private Color GetHoverColor()
{
@@ -195,15 +199,9 @@ namespace Paint_2
image.Save(DEFAULT_FILEPATH + fileName + "/" + fileName + ".png", System.Drawing.Imaging.ImageFormat.Png);
}
private void btnDotTracer_Click(object sender, EventArgs e)
private void lsbTools_SelectedIndexChanged(object sender, EventArgs e)
{
sketch.ChangeTool(DOT_PENCIL);
RefreshUi();
}
private void btnPencil_Click(object sender, EventArgs e)
{
sketch.ChangeTool(DEFAULT_PENCIL);
sketch.ChangeTool(lsbTools.SelectedIndex);
RefreshUi();
}
}

View File

@@ -1,4 +1,9 @@
using System;
/// file: PaintTool.cs
/// Author: Maxime Rohmer <maxluligames@gmail.com>
/// Brief: Interface that is here to define what is a paint tool
/// Version: 0.1.0
/// Date: 25/05/2022
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -14,6 +19,7 @@ namespace Paint_2
Color Color { get; set; }
List<int> Widths { get; set; }
int Width { get; set; }
string Name { get; set; }
void Start(Color color,int width);
void Stop(Point point);
@@ -21,5 +27,6 @@ namespace Paint_2
void Clear();
List<Color> GetLastColors(int colorNumber);
void Paint(Bitmap canvas);
string ToString();
}
}

View File

@@ -1,4 +1,9 @@
using System;
/// file: Pencil.cs
/// Author: Maxime Rohmer <maxluligames@gmail.com>
/// Brief: Paint tool that is kind of the default tool
/// Version: 0.1.0
/// Date: 25/05/2022
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
@@ -13,17 +18,21 @@ namespace Paint_2
private List<Color> _colors;
private List<int> _widths;
private Color _color;
private string _name;
private int _width;
public List<List<Point>> Drawings { get => _drawings; set => _drawings = value; }
public List<Color> Colors { get => _colors; set => _colors = value; }
public List<int> Widths { get => _widths; set => _widths = value; }
public Color Color { get => _color; set => _color = value; }
public int Width { get => _width; set => _width = value; }
public Pencil()
public string Name { get => _name; set => _name = value; }
public Pencil(string name)
{
Drawings = new List<List<Point>>();
Colors = new List<Color>();
Widths = new List<int>();
Name = name;
}
public void Add(Point point)
{
@@ -93,5 +102,9 @@ namespace Paint_2
}
return result;
}
public override string ToString()
{
return Name;
}
}
}

View File

@@ -1,4 +1,10 @@
using System;
/// file: Sketch.cs
/// Author: Maxime Rohmer <maxluligames@gmail.com>
/// Brief: Class that is used to store and controll the tools and the bitmap
/// Version: 0.1.0
/// Date: 25/05/2022
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;