Ejemplo n.º 1
0
        private void FormDataBaseSync_Load(object sender, EventArgs e)
        {
            CTool.CheckPathExistOrCreate(m_SerializeConnectsPath);
            if (File.Exists(m_SerializeConnectsPath))
            {
                CSerialize ser = new CSerialize();
                ser.FileName = m_SerializeConnectsPath;
                m_db2Alias   = (List <SDB2Connection>)ser.DeSerialize();
            }
            else
            {
                CDB2ConnectInfo db2Info = new CDB2ConnectInfo();
                m_db2Alias = db2Info.m_conns;
            }

            /*初始化下拉框*/
            {
                this.comboBox_dDB.Items.Clear();
                this.comboBox_sDB.Items.Clear();
                foreach (SDB2Connection con in m_db2Alias)
                {
                    this.comboBox_sDB.Items.Add(con.alias);
                    this.comboBox_dDB.Items.Add(con.alias);
                }
            }
        }
Ejemplo n.º 2
0
        private void deserializeTree()
        {
            CSerialize ser = new CSerialize();

            ser.FileName = sRootDir + sSerializeName;
            if (File.Exists(ser.FileName))
            {
                m_Tree = (List <SKnowledgeNode>)ser.DeSerialize();
            }
            else
            {
                m_Tree = new List <SKnowledgeNode>();
            }
        }