Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Hashtable properties = PropertiesUtil.Load("./cfg.txt");

            if (properties != null)
            {
                this.username.Text = (string)properties["username"];
                this.password.Text = (string)properties["password"];
            }
        }
Ejemplo n.º 2
0
        private Hashtable SaveProperties()
        {
            string    file       = @"./cfg.txt";
            Hashtable properties = new Hashtable
            {
                { "username", this.username.Text },
                { "password", this.password.Text }
            };

            PropertiesUtil.Save(file, properties);
            return(properties);
        }