private void SettingsForm_Load(object sender, EventArgs e) { labelBackColor.BackColor = Color.FromArgb(MyRegistry.LoadValue("background", Color.Black.ToArgb())); labelForeColor.BackColor = Color.FromArgb(MyRegistry.LoadValue("foreground", Color.White.ToArgb())); int points = MyRegistry.LoadValue("points", 4); try { trackBarCount.Value = points; } catch { trackBarCount.Value = trackBarCount.Minimum; } labelCount.Text = trackBarCount.Value.ToString(); }
private void InitFigure() { graph = new Graph( picture.Width, picture.Height, Color.FromArgb(MyRegistry.LoadValue("background", Color.Black.ToArgb())), Color.FromArgb(MyRegistry.LoadValue("foreground", Color.White.ToArgb()))); Figure.InitMinMax(0, 0, graph.bmp.Width, graph.bmp.Height); int points = MyRegistry.LoadValue("points", 4); p = new Polygone(); for (int j = 0; j < points; j++) { p.AddFigure(Figure.RandomFigure()); } timer.Enabled = true; TopMost = true; }