Example #1
0
        private void btnLoadConfigFile_Click(object sender, EventArgs e)
        {
            Fwk.Configuration.Common.Key wKey;
            Fwk.Configuration.Common.Groups wGroups;
            Fwk.Configuration.Common.Group wGroup;
            wGroups = new Fwk.Configuration.Common.Groups();
            ConfigurationFile wConfigurationFile = new ConfigurationFile();
            wConfigurationFile.CurrentVersion = "1.1";
            wConfigurationFile.Encrypted = false;
        


            wGroup = new Fwk.Configuration.Common.Group();
            wGroup.Name = "G1";
            wKey = new Fwk.Configuration.Common.Key();
            wKey.Name = "K1";
            wKey.Value.Text= "aaaaaaaaaaaaaaaaa";

            wGroup.Keys.Add(wKey);

            wKey = new Fwk.Configuration.Common.Key();
            wKey.Name = "K2";
            wKey.Value.Text = "cccccccccccccccccccccccccccccccccc";
            wGroup.Keys.Add(wKey);


            wGroups.Add(wGroup);



           

            wGroup = new Fwk.Configuration.Common.Group();
            wGroup.Name = "G2";
            wKey = new Fwk.Configuration.Common.Key();
            wKey.Name = "K1";
            wKey.Value.Text = "aaaaaaaaaaaaaaaaa";

            wGroup.Keys.Add(wKey);

            wKey = new Fwk.Configuration.Common.Key();
            wKey.Name = "K2";
            wKey.Value.Text = "cccccccccccccccccccccccccccccccccc";
            wGroup.Keys.Add(wKey);


            wGroups.Add(wGroup);
            wConfigurationFile.Groups = wGroups;

            xmlConfitFile.Text = wConfigurationFile.GetXml();
            xmlConfitFile.ForeColor = Color.Green;
        }
        private void btnLoadConfigFile_Click(object sender, EventArgs e)
        {
            Fwk.Configuration.Common.Key    wKey;
            Fwk.Configuration.Common.Groups wGroups;
            Fwk.Configuration.Common.Group  wGroup;
            wGroups = new Fwk.Configuration.Common.Groups();
            ConfigurationFile wConfigurationFile = new ConfigurationFile();

            wConfigurationFile.CurrentVersion = "1.1";
            wConfigurationFile.Encrypted      = false;



            wGroup          = new Fwk.Configuration.Common.Group();
            wGroup.Name     = "G1";
            wKey            = new Fwk.Configuration.Common.Key();
            wKey.Name       = "K1";
            wKey.Value.Text = "aaaaaaaaaaaaaaaaa";

            wGroup.Keys.Add(wKey);

            wKey            = new Fwk.Configuration.Common.Key();
            wKey.Name       = "K2";
            wKey.Value.Text = "cccccccccccccccccccccccccccccccccc";
            wGroup.Keys.Add(wKey);


            wGroups.Add(wGroup);



            wGroup          = new Fwk.Configuration.Common.Group();
            wGroup.Name     = "G2";
            wKey            = new Fwk.Configuration.Common.Key();
            wKey.Name       = "K1";
            wKey.Value.Text = "aaaaaaaaaaaaaaaaa";

            wGroup.Keys.Add(wKey);

            wKey            = new Fwk.Configuration.Common.Key();
            wKey.Name       = "K2";
            wKey.Value.Text = "cccccccccccccccccccccccccccccccccc";
            wGroup.Keys.Add(wKey);


            wGroups.Add(wGroup);
            wConfigurationFile.Groups = wGroups;

            xmlConfitFile.Text      = wConfigurationFile.GetXml();
            xmlConfitFile.ForeColor = Color.Green;
        }