Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
 public static void UnregisterSelectionAgent(ITableSelectionAgent agent)
 {
     selectionAgents.Remove(agent);
 }
Exemple #3
0
 public static void RegisterSelectionAgent(ITableSelectionAgent agent)
 {
     selectionAgents.Add(agent);
 }
Exemple #4
0
 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);
         }
     }
 }
Exemple #5
0
 public static void UnregisterSelectionAgent(ITableSelectionAgent agent)
 {
     selectionAgents.Remove(agent);
 }
Exemple #6
0
 public static void RegisterSelectionAgent(ITableSelectionAgent agent)
 {
     selectionAgents.Add(agent);
 }