/// <summary> /// Rafraichir la selection /// </summary> public override void Refresh() { if (this._Projet != null) { this.Items.Clear(); WComboItem item = null; TBLFile tbl = null; for (int i = 0; i < this._Projet.Tables.Count; i++) { tbl = (TBLFile)this._Projet.Tables[i]; item = new WComboItem(tbl.Name, this._Projet.ProjectPath + Path.DirectorySeparatorChar + tbl.RelativePath); this.Items.Add(item); //Selectionne la TBL par defaut if (tbl.Default) { this.SelectedIndex = this.Items.Count - 1; } } } else { this.Items.Clear(); } }
public bool Contains(TBLFile value) { foreach (TBLFile s in base.List) { if (value.Equals(s)) { return(true); } } return(false); }
private void button11_Click(object sender, System.EventArgs e) { Project myProject = new Project(); TextFile txt = new TextFile(); HexaSnapShot hexa = new HexaSnapShot(); TBLFile tbl = new TBLFile(); TableFixeFile fixe = new TableFixeFile(); Favoris mark = new Favoris(); Task task = new Task(); myProject.CreateProject("FF2", @"c:", "ff2.smc", "ff2.tbl"); for (int i = 0; i < 4; i++) { myProject.Textes.Add(txt); myProject.HexaSnapShot.Add(hexa); myProject.Tables.Add(tbl); myProject.TableFixe.Add(fixe); myProject.Favoris.Add(mark); myProject.Taches.Add(task); } myProject.Save(); }
private TreeNode[] MakeTableNode() { int TableCount = this._Projet.Tables.Count; TreeNode[] TableNodes = new TreeNode[TableCount]; TBLFile tblFile = new TBLFile(); for (int i = 0; i < TableCount; i++) { tblFile = (TBLFile)this._Projet.Tables[i]; TableNodes[i] = new TreeNode(); TableNodes[i].Text = tblFile.Name; TableNodes[i].ImageIndex = 4; TableNodes[i].SelectedImageIndex = 4; TableNodes[i].Tag = tblFile.Key; if (tblFile.Default) { TableNodes[i].NodeFont = new Font(this.Font.Name, 8, FontStyle.Bold); } } return(TableNodes); }
public int IndexOf(TBLFile value) { return(base.List.IndexOf(value)); }
public void Insert(int index, TBLFile value) { base.List.Insert(index, value as object); }
public void Remove(TBLFile value) { base.List.Remove(value as object); }
public TBLFile Add(TBLFile value) { base.List.Add(value as object); return(value); }