コード例 #1
0
 private void cbbDataSource_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBoxDataSourceList.SelectedItem != null)
     {
         comboBoxDBLayerList.Items.Clear();
         comboBoxDBValveList.Items.Clear();
         GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());
         if (ds != null)
         {
             for (int i = 0; i < ds.DatasetCount; i++)
             {
                 GSODataset dataset = ds.GetDatasetAt(i);
                 if (dataset != null && dataset.Name.Contains("Network") == false)
                 {
                     comboBoxDBLayerList.Items.Add(dataset.Name);
                     comboBoxDBValveList.Items.Add(dataset.Name);
                 }
             }
             if (comboBoxDBLayerList.Items.Count > 0)
             {
                 comboBoxDBLayerList.SelectedIndex = 0;
             }
         }
     }
 }
コード例 #2
0
 private void comboBoxDataSourceList2_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBoxDataSourceList2.SelectedItem != null)
     {
         comboBoxUnionLayerList2.Items.Clear();
         string        dataSourceFullName = comboBoxDataSourceList2.SelectedItem.ToString().Trim();
         GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, dataSourceFullName);
         if (ds != null)
         {
             for (int i = 0; i < ds.DatasetCount; i++)
             {
                 GSODataset dataset = ds.GetDatasetAt(i);
                 if (dataset != null && dataset.Caption.Contains("Network") == false)
                 {
                     comboBoxUnionLayerList2.Items.Add(dataset.Name);
                 }
             }
         }
     }
 }
コード例 #3
0
        private void refreshListBox(string dataSourceFullName)
        {
            listBox1.Items.Clear();
            GSODataSource ds = Utility.getDataSourceByFullName(globeControl1, comboBoxDataSourceList.SelectedItem.ToString().Trim());

            if (ds != null)
            {
                for (int i = 0; i < ds.DatasetCount; i++)
                {
                    GSODataset dataset = ds.GetDatasetAt(i);
                    if (checkBox1.Checked)
                    {
                        if (dataset.Name.ToLower().Contains("network"))
                        {
                            continue;
                        }
                    }
                    listBox1.Items.Add(dataset.Name);
                }
            }
        }