public void Initialize(string prefix, string ns, CustomFilterDefineDialog parent)
 {
     this.prefix.Text = prefix;
     this.ns.Text     = ns;
     originalPrefix   = prefix;
     Initialize(parent);
 }
 public void Initialize(CustomFilterDefineDialog parent)
 {
     this.parent = parent;
     foreach (string cachedNSName in cachedNSNames)
     {
         ns.Items.Add(cachedNSName);
     }
 }
Exemple #3
0
 private void listFilters_DoubleClick(object sender, EventArgs e)
 {
     if (listFilters.SelectedItems.Count != 0)
     {
         using (CustomFilterDefineDialog customFilterDefineDialog = new CustomFilterDefineDialog(this, errorReport))
         {
             customFilterDefineDialog.Initialize((CustomFilter)listFilters.SelectedItems[0].Tag);
             if (userIP.ShowDialog(customFilterDefineDialog, appForm) == DialogResult.OK)
             {
                 listFilters.SelectedItems[0].Tag = customFilterDefineDialog.CurrentFilter;
                 listFilters.SelectedItems[0].SubItems[0].Text = customFilterDefineDialog.CurrentFilter.FilterName;
                 listFilters.SelectedItems[0].SubItems[1].Text = ((!string.IsNullOrEmpty(customFilterDefineDialog.CurrentFilter.FilterDescription)) ? customFilterDefineDialog.CurrentFilter.FilterDescription : string.Empty);
                 listFilters.SelectedItems[0].SubItems[2].Text = customFilterDefineDialog.CurrentFilter.Expression;
             }
         }
     }
 }
Exemple #4
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     using (CustomFilterDefineDialog customFilterDefineDialog = new CustomFilterDefineDialog(this, errorReport))
     {
         if (userIP.ShowDialog(customFilterDefineDialog, appForm) == DialogResult.OK)
         {
             ListViewItem listViewItem = new ListViewItem(new string[3]
             {
                 customFilterDefineDialog.CurrentFilter.FilterName,
                 (!string.IsNullOrEmpty(customFilterDefineDialog.CurrentFilter.FilterDescription)) ? customFilterDefineDialog.CurrentFilter.FilterDescription : string.Empty,
                 customFilterDefineDialog.CurrentFilter.Expression
             });
             listViewItem.Tag = customFilterDefineDialog.CurrentFilter;
             listFilters.Items.Add(listViewItem);
             UpdateButtonStatus();
         }
     }
 }