private void Get_Schedule() { int i, j, k; for (i = 0; i <= Form_Orar_Nou.groups.Count - 1; ++i) { cursuri = SaveXML.Load_Data(cursuri, "grupa_" + Form_Orar_Nou.groups[i] + ".xml"); if (cursuri.Count > 0) { for (j = 0; j < cursuri.Count; ++j) { Convert_Data(cursuri[j].access_zi, cursuri[j].access_ora, cursuri[j].access_sala); int temp = Array.IndexOf(numar_sala, sala); if (temp >= 0) { for (k = ora_inceput; k < ora_final; ++k) { sali[zi, temp, k].is_empty = false; } } else { Debug.WriteLine("Inexistent Class"); } } } } }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { group_number = comboBox1.Text; cursuri = SaveXML.Load_Data(cursuri, "grupa_" + group_number + ".xml"); if (File.Exists("group_" + group_number + ".png")) { Bitmap img; using (var bmpTemp = new Bitmap("group_" + group_number + ".png")) { img = new Bitmap(bmpTemp); } bmp = img; pictureBox1.Image = img; File.Delete("group_" + group_number + ".png"); } else { bmp = Drawing.DrawRectangleOnImage(pictureBox1.Size.Width, pictureBox1.Size.Height); pictureBox1.Image = bmp; } bmp.Save("group_" + group_number + ".png"); }
public Form_Orar_Nou() { InitializeComponent(); //de test for (int i = 0; i < valid_groups.Length; i++) { groups.Add(valid_groups[i]); } for (int i = 0; i <= groups.Count - 1; ++i) { comboBox1.Items.Add(groups[i]); } comboBox1.Text = "101"; if (File.Exists("group_101.png")) { cursuri = SaveXML.Load_Data(cursuri, "grupa_101.xml"); Bitmap img; using (var bmpTemp = new Bitmap("group_101.png")) { img = new Bitmap(bmpTemp); } bmp = img; pictureBox1.Image = img; File.Delete("group_101.png"); } else { bmp = Drawing.DrawRectangleOnImage(pictureBox1.Size.Width, pictureBox1.Size.Height); pictureBox1.Image = bmp; } this.Size = Screen.PrimaryScreen.WorkingArea.Size; this.Location = new Point(0, 0); }