private void PopolniListaStavki() { if (CurrMenu == null) { return; } int ind = this.indStavka; for (int i = 0; i < this.ListaStavki.Count; i++) { if (ind < this.CurrMenu.GetContent().Count) { this.ListaStavki[i].UpdateObject(CurrMenu.GetContent()[ind]); if (this.CurrMenu.GetContent()[ind] is Meni) { this.ListaStavki[i].ForeColor = Color.Gold; ListaStavki[i].Font = new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204))); } else { this.ListaStavki[i].ForeColor = Color.White; ListaStavki[i].Font = new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204))); } ind++; } else { ListaStavki[i].UpdateObject(null); } } }
private void pictureBox9_MouseDown(object sender, MouseEventArgs e) { int pom = CurrMenu.GetContent().Count - ListaStavki.Count; if (indMeni < pom) { indMeni++; PopolniListaMenija(); } }
private void PopolniListaMenija() { if (CurrMenu == null) { return; } int ind = this.indMeni; for (int i = 0; i < this.ListaStavki.Count; i++) { if (ind < CurrMenu.GetContent().Count) { if (CurrMenu.GetContent()[ind] is Meni) { Meni mn = CurrMenu.GetContent()[ind] as Meni; if (!ShowInactive && !mn.ValidnostMeni) { i--; ind++; continue; } SetObject(ListaStavki[i], CurrMenu.GetContent()[ind]); SetFontLabel(ListaStavki[i], new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)))); ListaStavki[i].ForeColor = Color.Gold; if (!mn.ValidnostMeni) { if (mn.Equals(SelectedComponent)) { ListaStavki[i].ForeColor = Color.Firebrick; } else { ListaStavki[i].ForeColor = Color.FromArgb(250, 20, 20); } } else { if (mn.Equals(SelectedComponent)) { ListaStavki[i].ForeColor = Color.SaddleBrown; } else { ListaStavki[i].ForeColor = Color.Gold; } } } else { SetFontLabel(ListaStavki[i], new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)))); SetObject(ListaStavki[i], CurrMenu.GetContent()[ind]); if (CurrMenu.GetContent()[ind].Equals(SelectedComponent)) { ListaStavki[i].ForeColor = Color.SaddleBrown; } else { ListaStavki[i].ForeColor = Color.White; } ListaStavki[i].Image = Resources.LabelBackground2; } if (CurrMenu.GetContent()[ind].Equals(SelectedComponent)) { ListaStavki[i].Image = Resources.LabelBackgroundSelected; } else { ListaStavki[i].Image = Resources.LabelBackground2; } ind++; } else { ListaStavki[i].Image = Resources.LabelBackground2; SetObject(ListaStavki[i], null); SetFontLabel(ListaStavki[i], new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)))); ListaStavki[i].ForeColor = Color.Khaki; } } }