Example #1
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (AddAccountForm form = new AddAccountForm())
            {
                if(form.ShowDialog() == DialogResult.OK)
                {
                    SteamAccount acc = new SteamAccount(form.FileName, this);
                    Controls.Add(acc);
                    Accounts.Add(acc);

                    SortAccounts();
                }
            }
        }
Example #2
0
        void LoadAccounts()
        {
            try
            {
                var files = Directory.GetFiles("Accounts");

                foreach(string file in files)
                {
                    SteamAccount acc = new SteamAccount(Path.GetFileName(file), this);
                    Controls.Add(acc);
                    Accounts.Add(acc);
                }
                SortAccounts();
            }
            catch { }
        }