Ejemplo n.º 1
0
 public FindForm(TableViewControlModel tableViewWf, ICompoundScrollableControl tableView)
 {
     InitializeComponent();
     tableView1Wf = new TableViewControlModel();
     tableView1.Client = tableView1Wf;
     tableView1Wf.origColumnHeaderHeight = 26;
     tableView1Wf.HasHelp = true;
     tableView1Wf.MultiSelect = true;
     tableView1Wf.Sortable = true;
     tableView1Wf.TableModel = null;
     this.tableViewWf = tableViewWf;
     this.tableView = tableView;
     tableModel = tableViewWf.TableModel;
     wildcardsComboBox.SelectedIndex = 0;
     wildcardsComboBox.Enabled = false;
     helpButton.Enabled = false;
     columnSelectButton.Enabled = false;
     lookInComboBox.Items.Add("Whole table");
     for (int i = 0; i < tableModel.ColumnCount; i++){
         lookInComboBox.Items.Add(tableModel.GetColumnName(i));
     }
     lookInComboBox.Items.Add("Multiple columns");
     lookInComboBox.SelectedIndex = 0;
     lookInComboBox.SelectedIndexChanged += LookInComboBoxSelectedIndexChanged;
     useCheckBox.Visible = false;
     wildcardsComboBox.Visible = false;
     helpButton.Visible = false;
     tableView1Wf.SelectionChanged += TableView1SelectionChanged;
     expressionTextBox.Focus();
     expressionTextBox.SelectAll();
 }
Ejemplo n.º 2
0
 public TableView()
 {
     InitializeComponent();
     tableView = new CompoundScrollableControl{Dock = DockStyle.Fill, Margin = new Padding(0)};
     tableViewWf = new TableViewControlModel();
     tableView.Client = tableViewWf;
     tableViewWf.SelectionChanged += (sender, args) =>{
         SelectionChanged?.Invoke(sender, args);
         long c = tableViewWf.SelectedCount;
         long t = tableViewWf.RowCount;
         selectedLabel.Text = c > 0 && MultiSelect ? "" + StringUtils.WithDecimalSeparators(c) + " selected" : "";
         itemsLabel.Text = "" + StringUtils.WithDecimalSeparators(t) + " item" + (t == 1 ? "" : "s");
     };
     mainPanel.Controls.Add(tableView);
     textButton.Click += TextButton_OnClick;
     selectionAgentButton.Click += SelectionAgentButton_OnClick;
     KeyDown += (sender, args) => tableView.Focus();
     auxTextBox = new TextBox{Dock = DockStyle.Fill, Padding = new Padding(0), Multiline = true, ReadOnly = true};
 }