private void newToolStripMenuItem_Click(object sender, EventArgs e) { int previousThickness = LinesDoc.Thickness; Color previousColor = LinesDoc.Color; LinesDoc = new LinesDoc(this.Width, this.Height); LinesDoc.Thickness = previousThickness; LinesDoc.Color = previousColor; lblColor.Text = $"{LinesDoc.Color}"; lblLines.Text = $"Lines: {LinesDoc.GetLinesNumber()}"; Invalidate(); }
private void Form1_Load(object sender, EventArgs e) { LinesDoc = new LinesDoc(this.Width, this.Height); lblColor.Text = $"{LinesDoc.Color}"; lblLines.Text = $"Lines: {LinesDoc.GetLinesNumber()}"; }