Пример #1
0
        private void init()
        {
            isInit = true;
            clear();
            javaCodeGenConfigs.Clear();
            clearCbUI();
            addItem("");
            JavaCodeGenConfig config = IniConfigHelper.getDefaultObject();

            if (config != null)
            {
                setUI(config);
                setCbText(config.DisplayName);
            }
            IList <JavaCodeGenConfig> configs = IniConfigHelper.ReadDBInfo();

            foreach (JavaCodeGenConfig jcc in configs)
            {
                if (!javaCodeGenConfigs.ContainsKey(jcc.DisplayName))
                {
                    javaCodeGenConfigs.Add(jcc.DisplayName, jcc);
                    addItem(jcc.DisplayName);
                }
            }
            isInit = false;
        }
Пример #2
0
 public void GetDbConfigList()
 {
     _dbConfigList.Clear();
     _tscbDbConfig.Items.Clear();
     _dbConfigDic.Clear();
     _dbConfigList = IniConfigHelper.ReadDBInfo();
     BindDbConfig();
 }
Пример #3
0
        private void init()
        {
            isInit = true;
            clear();
            CsharpCodeGenConfig.Clear();

            string str = IniConfigHelper.ReadDefaultDBInfo();
            IList <CsharpCodeGenConfig> tem = IniConfigHelper.ReadDBInfo();

            CsharpCodeGenConfig.Clear();
            clearCbUI();
            addItem("");
            foreach (CsharpCodeGenConfig config in tem)
            {
                if (!CsharpCodeGenConfig.ContainsKey(config.DisplayName))
                {
                    CsharpCodeGenConfig.Add(config.DisplayName, config);
                    addItem(config.DisplayName);
                }
            }

            if (string.IsNullOrEmpty(str))
            {
                clear();
            }
            else
            {
                if (CsharpCodeGenConfig.Count > 0)
                {
                    foreach (string key in CsharpCodeGenConfig.Keys)
                    {
                        if (key.Equals(str))
                        {
                            CsharpCodeGenConfig[key].IsDelete = false;

                            setUI(CsharpCodeGenConfig[key]);
                            setCbText(CsharpCodeGenConfig[key].DisplayName);
                        }
                    }
                }
            }
            isInit = false;
        }
Пример #4
0
 private void ConfigForm_Load(object sender, EventArgs e)
 {
     dbConfigInfos = IniConfigHelper.ReadDBInfo();
     createTreeNode();
 }