private void SelectionAgentButton_OnClick(object sender, EventArgs e) { Point p = selectionAgentButton.PointToScreen(new Point(0, 0)); TableViewSelectionAgentForm w = new TableViewSelectionAgentForm(TableModel) { Top = p.Y - 125, Left = p.X - 300 }; if (w.ShowDialog() == DialogResult.OK) { int ind1 = w.sourceBox.SelectedIndex; int ind2 = w.columnBox.SelectedIndex; if (ind1 >= 0 && ind2 >= 0) { selectionAgent = selectionAgents[ind1]; selectionAgentColInd = ind2; selectionAgentColVals = GetTimeVals(ind2); selectionAgent.AddTable(this); } else { selectionAgent = null; selectionAgentColInd = -1; selectionAgentColVals = null; selectionAgent.RemoveTable(this); } } }
private void SelectionAgentButton_OnClick(object sender, EventArgs e) { Point p = selectionAgentButton.PointToScreen(new Point(0, 0)); TableViewSelectionAgentForm w = new TableViewSelectionAgentForm(TableModel){ Top = p.Y - 125, Left = p.X - 300 }; if (w.ShowDialog() == DialogResult.OK){ int ind1 = w.sourceBox.SelectedIndex; int ind2 = w.columnBox.SelectedIndex; if (ind1 >= 0 && ind2 >= 0){ selectionAgent = selectionAgents[ind1]; selectionAgentColInd = ind2; selectionAgentColVals = GetTimeVals(ind2); selectionAgent.AddTable(this); } else{ selectionAgent = null; selectionAgentColInd = -1; selectionAgentColVals = null; selectionAgent.RemoveTable(this); } } }