예제 #1
0
        public void AddTBL(string Name, string FileName)
        {
            WComboItem item = new WComboItem(Name, FileName);

            this.Items.Add(item);
            this.SelectedIndex = this.Items.Count - 1;
        }
예제 #2
0
        /// <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();
            }
        }