Пример #1
0
        //保存用户信息
        private void SaveUsedInfo()
        {
            List <string> list = GetListFromComboBox(this.comboBoxUser);

            var info = new SUserInfo {
                ListUser = list
            };

            BinSerializeHelper <SUserInfo> .PackToFile(this.tempFileName, info);
        }
Пример #2
0
        private void FormUserLogin_Load(object sender, EventArgs e)
        {
            if (File.Exists(tempFileName))
            {
                var sInfo = BinSerializeHelper <SUserInfo> .UnPackFromFile(tempFileName);

                if (sInfo != null)
                {
                    if (sInfo.ListUser != null)
                    {
                        this.comboBoxUser.DataSource = sInfo.ListUser;

                        this.comboBoxUser.SelectedIndex = 0;
                        this.textBoxPassword.Focus();
                    }
                }
            }
        }