Beispiel #1
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            FormDatasource src = new FormDatasource();

            if (src.ShowDialog() == DialogResult.OK)
            {
                dataSources = DataSources.Load();
                cmbdatasource.Items.Clear();
                foreach (string s in Sources.Keys)
                {
                    cmbdatasource.Items.Add(s);
                }
            }
        }
Beispiel #2
0
 private void toolStripButton5_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(cmbdatasource.Text))
     {
         if (Sources.Contains(cmbdatasource.Text))
         {
             DataSource     src    = Sources[cmbdatasource.Text];
             FormDatasource source = new FormDatasource();
             source.DataSource = src;
             if (source.ShowDialog() == DialogResult.OK)
             {
                 dataSources = DataSources.Load();
                 cmbdatasource.Items.Clear();
                 foreach (string s in Sources.Keys)
                 {
                     cmbdatasource.Items.Add(s);
                 }
             }
         }
     }
 }