Esempio n. 1
0
 private void SaveGraphs(ActionBase sender)
 {
     Program.Invoke(Program.MainWindow, delegate
     {
         var action = sender as GetDataSourcesAction;
         if (action != null)
         {
             var dataSources = DataSourceItemList.BuildList(action.IXenObject, action.DataSources);
             GraphList.SaveGraphs(dataSources);
         }
     });
 }
Esempio n. 2
0
 void getDataSorucesAction_Completed(ActionBase sender)
 {
     Program.Invoke(this, delegate
     {
         tableLayoutPanel1.Visible   = false;
         GetDataSourcesAction action = sender as GetDataSourcesAction;
         if (action != null)
         {
             _dataSources = DataSourceItemList.BuildList(action.IXenObject, action.DataSources);
             PopulateDataGridView();
         }
         searchTextBox.Enabled = true;
         EnableControls();
     });
 }
Esempio n. 3
0
        void getDataSorucesAction_Completed(ActionBase sender)
        {
            Program.Invoke(this, delegate
            {
                GetDataSourcesAction action = sender as GetDataSourcesAction;
                if (action != null)
                {
                    List <DataSourceItem> dataSources = DataSourceItemList.BuildList(action.IXenObject, action.DataSources);
                    foreach (DataSourceItem dataSourceItem in dataSources)
                    {
                        bool displayOnGraph = designedGraph.DataSources.Contains(dataSourceItem);
                        dataGridView.Rows.Add(new DataSourceGridViewRow(dataSourceItem, displayOnGraph));
                    }

                    dataGridView.Sort(dataGridView.Columns[DisplayOnGraphColumnIndex], ListSortDirection.Ascending);
                    if (dataGridView.Rows.Count > 0)
                    {
                        dataGridView.Rows[0].Cells[DisplayOnGraphColumnIndex].Selected = true;
                    }
                }
                EnableControls();
            });
        }