Example #1
0
        public EditFilter(Filtre filtre)
        {
            InitializeComponent();

            // Remplissage de la 1ère ligne
            this.dbTitreLabel.Font = new Font(dbTitreLabel.Font, FontStyle.Bold);
            this.dbLabel.Text = filtre.dbName;

            int rowsCount = this.tablePanel.RowCount;
            foreach (KeyValuePair<String,String> kvp in filtre.getDescription())
            {
                this.tablePanel.Controls.Add(new SimpleLabel(kvp.Key, FontStyle.Bold), 0, rowsCount);

                SimpleLabel value;
                if(String.IsNullOrEmpty(kvp.Value))
                    value = new SimpleLabel("Tous",FontStyle.Italic);
                else
                    value = new SimpleLabel(kvp.Value);
                this.tablePanel.Controls.Add(value, 1, rowsCount);
                this.tablePanel.SetColumnSpan(value, 2);

                rowsCount++;
            }
        }