public FindForm(TableViewControlModel tableViewWf, ICompoundScrollableControl tableView) { InitializeComponent(); InitializeComponent2(); searchResultsTableView = new TableViewControlModel(null); tableView1.Client = searchResultsTableView; searchResultsTableView.origColumnHeaderHeight = 26; searchResultsTableView.HasHelp = true; searchResultsTableView.MultiSelect = true; searchResultsTableView.Sortable = true; searchResultsTableView.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; searchResultsTableView.SelectionChanged += SearchResultsTableSelectionChanged; expressionTextBox.TextChanged += (sender, args) => { searchRowIndView = -1; }; expressionTextBox.Focus(); expressionTextBox.SelectAll(); }
public TableView() { InitializeComponent(); sfx = FormUtils.GetDpiScale(CreateGraphics()); InitializeComponent2(); scaleFactorComboBox.SelectedIndex = 3; tableView = new CompoundScrollableControl { Dock = DockStyle.Fill, Margin = new Padding(0) }; tableViewWf = new TableViewControlModel(this); tableView.Client = tableViewWf; tableViewWf.SelectionChanged += (sender, args) => { SelectionChanged?.Invoke(sender, args); SetCounts(); }; 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 }; scaleFactorComboBox.SelectedIndexChanged += (sender, args) => { switch (scaleFactorComboBox.SelectedIndex) { case 0: tableViewWf.UserSf = 0.25f; break; case 1: tableViewWf.UserSf = 0.5f; break; case 2: tableViewWf.UserSf = 0.7f; break; case 3: tableViewWf.UserSf = 1f; break; case 4: tableViewWf.UserSf = 1.5f; break; case 5: tableViewWf.UserSf = 2f; break; case 6: tableViewWf.UserSf = 4f; break; } tableViewWf.UpdateScaling(); tableView.Invalidate(true); }; }
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 }; }