Example #1
0
 private void ButtonSave_Click(object sender, EventArgs e)
 {
     MyRegistry.SaveValue("background", GetBackColor().ToArgb());
     MyRegistry.SaveValue("foreground", GetForeColor().ToArgb());
     MyRegistry.SaveValue("points", GetPoints());
     Close();
 }
Example #2
0
        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();
        }
Example #3
0
        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;
        }