コード例 #1
0
 public void SetFilter(DataSchema dataSchema, PropertyDescriptor propertyDescriptor, RowFilter rowFilter)
 {
     RowFilter = rowFilter;
     SetPropertyDescriptor(dataSchema, propertyDescriptor);
     var columnFilters = rowFilter.GetColumnFilters(propertyDescriptor).ToArray();
     if (columnFilters.Length >= 1)
     {
         SetFilterOperation(comboOperation1, tbxOperand1, columnFilters[0]);
         tbxOperand1.Text = columnFilters[0].Operand;
     }
     if (columnFilters.Length >= 2)
     {
         SetFilterOperation(comboOperation2, tbxOperand2, columnFilters[1]);
     }
 }
コード例 #2
0
ファイル: RowFilter.cs プロジェクト: lgatto/proteowizard
 public RowFilter SetText(string text, bool caseSensitive)
 {
     RowFilter rowFilter = new RowFilter(this)
     {
         CaseSensitive = caseSensitive,
     };
     if (string.IsNullOrEmpty(text))
     {
         rowFilter._normalizedText = rowFilter.Text = null;
     }
     else
     {
         rowFilter.Text = text;
         rowFilter._normalizedText = caseSensitive ? text : text.ToLower();
     }
     return rowFilter;
 }
コード例 #3
0
 public void OkDialog()
 {
     RowFilter = GetCurrentFilter();
     DialogResult = DialogResult.OK;
 }
コード例 #4
0
 private void SetFilterOperation(ComboBox comboOperation, TextBox textBoxOperand, RowFilter.ColumnFilter columnFilter)
 {
     for (int i = 0; i < comboOperation.Items.Count; i++)
     {
         FilterItem filterItem = comboOperation.Items[i] as FilterItem;
         if (null != filterItem && Equals(columnFilter.FilterOperation, filterItem.FilterOperation))
         {
             comboOperation.SelectedIndex = i;
             break;
         }
     }
     textBoxOperand.Text = columnFilter.Operand;
 }
コード例 #5
0
 private void btnClearFilter_Click(object sender, EventArgs e)
 {
     RowFilter = RowFilter.SetColumnFilters(
         RowFilter.ColumnFilters.Where(
             columnFilter => PropertyDescriptor.DisplayName != columnFilter.ColumnCaption));
     DialogResult = DialogResult.OK;
 }
コード例 #6
0
 private void btnClearAllFilters_Click(object sender, EventArgs e)
 {
     RowFilter = RowFilter.Empty;
     DialogResult = DialogResult.OK;
 }
コード例 #7
0
 public QueryParameters SetRowFilter(RowFilter value)
 {
     return new QueryParameters(this) {RowFilter = value};
 }
コード例 #8
0
 public QueryParameters(ViewInfo viewInfo, RowFilter rowFilter, ListSortDescriptionCollection sortDescriptions)
 {
     ViewInfo = viewInfo;
     RowFilter = rowFilter;
     SortDescriptions = sortDescriptions;
 }
コード例 #9
0
ファイル: BindingListView.cs プロジェクト: rfellers/pwiz
 public void ApplySort(ListSortDescriptionCollection sorts)
 {
     RowFilter = RowFilter.ChangeListSortDescriptionCollection(sorts);
     // Fire an event so that the NavBar updates to show that the DataGridView is sorting
     OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
 }
コード例 #10
0
 public QueryParameters(ViewInfo viewInfo, RowFilter rowFilter, ListSortDescriptionCollection sortDescriptions)
 {
     ViewInfo         = viewInfo;
     RowFilter        = rowFilter;
     SortDescriptions = sortDescriptions;
 }
コード例 #11
0
 public void OkDialog()
 {
     RowFilter = GetCurrentFilter();
     try
     {
         RowFilter.GetPredicate(PropertyDescriptor);
     }
     catch (Exception e)
     {
         ShowErrorMessage(e);
         return;
     }
     DialogResult = DialogResult.OK;
 }
コード例 #12
0
 protected RowFilter(RowFilter rowFilter)
 {
     Text            = rowFilter.Text;
     _normalizedText = rowFilter._normalizedText;
     ColumnFilters   = rowFilter.ColumnFilters;
 }
コード例 #13
0
ファイル: RowFilter.cs プロジェクト: lgatto/proteowizard
 protected RowFilter(RowFilter rowFilter)
 {
     Text = rowFilter.Text;
     _normalizedText = rowFilter._normalizedText;
     ColumnFilters = rowFilter.ColumnFilters;
 }
コード例 #14
0
ファイル: RowFilter.cs プロジェクト: lgatto/proteowizard
 public bool Equals(RowFilter other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Text, Text) && other.CaseSensitive.Equals(CaseSensitive) && Equals(other.ColumnFilters, ColumnFilters);
 }