예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     theme tmp = new theme();
     themes.Add(tmp);
     label1.Text = "Theme in the file:                      of: " + (themes.Count).ToString();
     numericUpDown4.Maximum = themes.Count;
     numericUpDown4.Minimum = 1;
     numericUpDown4.Value = themes.Count;
     this.Refresh();
     Color tmpc = new Color();
     listBox1.SelectedIndex = 0;
     tmpc = themes[Convert.ToInt32(numericUpDown4.Value - 1)].Colors[listBox1.SelectedIndex];
     Manual_change = false;
     numericUpDown1.Value = tmpc.R;
     numericUpDown2.Value = tmpc.G;
     numericUpDown3.Value = tmpc.B;
     Manual_change = true;
     label_PREV.BackColor = Color.FromArgb(Convert.ToInt32(numericUpDown1.Value), Convert.ToInt32(numericUpDown2.Value), Convert.ToInt32(numericUpDown3.Value));
 }
예제 #2
0
 void loadXML(string file)
 {
     XmlDocument doc = new XmlDocument();
     doc.Load(file);
     foreach (XmlNode node in doc.DocumentElement.ChildNodes)
     {
         theme tmp = new theme();
         tmp.Colors.Initialize();
         for (int i = 0; i < count;i++) tmp.Colors[i] = parse_RGB(node.ChildNodes[i].OuterXml);
         themes.Add(tmp);
     }
     numericUpDown4.Maximum = themes.Count;
     numericUpDown4.Minimum = 1;
     label1.Text = "Theme in the file:                      of: " + (themes.Count).ToString();
     this.Refresh();
     listBox1.SelectedIndex = 0;
 }