Example #1
0
		public LoginForm()
		{
			Client = new Client();
			m_main = new MainForm(this, Client);
            Client.SetForm(m_main);
            InitializeComponent();
            Client.OnLoginSuccess += delegate {
				BeginInvoke(new Action(()=>{
                    if (chb_record.Checked)
                    {
                        string pwd = tb_password.Text;
                        if (!string.IsNullOrEmpty(pwd))
                        {
                            pwd = Tool.Encrypt(pwd, USER_NAME, KEY);
                            ConfigManager.Save(PWD, pwd);
                        }
                    }
                    else
                    {
                        tb_password.Text = "";
                    }
                    ConfigManager.Save("savepwd", ""+chb_record.Checked);
                   
                    this.Hide();                    
                    m_main.Show();
				                       })
				           );
				
			};
			this.Icon = res.favicon;
		}
Example #2
0
 public void SetForm(MainForm parent)
 {
     this.m_parent = parent;
 }