コード例 #1
0
ファイル: DbTargetMappings.cs プロジェクト: zhh007/MyGen
        private void PopulateComboBox(DefaultSettings settings)
        {
            this.cboxDbTarget.Items.Clear();

            // Populate the ComboBox
            dbRoot myMeta = new dbRoot();

            myMeta.DbTargetMappingFileName = settings.DbTargetMappingFile;
            myMeta.DbTarget = settings.DbTarget;

            string[] targets = myMeta.GetDbTargetMappings(settings.DbDriver);

            if (null != targets)
            {
                for (int i = 0; i < targets.Length; i++)
                {
                    this.cboxDbTarget.Items.Add(targets[i]);
                }

                this.cboxDbTarget.SelectedItem = myMeta.DbTarget;

                if (this.cboxDbTarget.SelectedIndex == -1)
                {
                    // The default doesn't exist, set it to the first in the list
                    this.cboxDbTarget.SelectedIndex = 0;
                }
            }
        }
コード例 #2
0
        private void PopulateDbTargets()
        {
            TargetDbComboBox.Items.Clear();
            TargetDbComboBox.SelectedText = "";

            string[] targets = _myMeta.GetDbTargetMappings(DbDriverComboBox.SelectedValue as string);

            if (null != targets)
            {
                foreach (string target in targets)
                {
                    TargetDbComboBox.Items.Add(target);
                }
            }
        }
コード例 #3
0
        private void PopulateDbTargets()
        {
            this.cboDbTarget.Items.Clear();
            this.cboDbTarget.SelectedText = "";

            string[] targets = myMeta.GetDbTargetMappings(this.cboDbDriver.SelectedValue as string);

            if (null != targets)
            {
                foreach (string target in targets)
                {
                    this.cboDbTarget.Items.Add(target);
                }
            }
        }