public StartWindow() { ch = new BLL.CamearHelper(); bool res = ch.getMysqlConfig(); if (res == true) { LoginPark lp = new LoginPark(); lp.ShowDialog(); this.Close(); } else { InitializeComponent(); cc = new ServerPreferencesControl(); cc.LoadDefaultConfig(); //传参数到UI界面 ServerEntity SQLdata = cc.GetServerConfig(); txtservername.Text = SQLdata.Server; txtport.Text = SQLdata.Port.ToString(); txtsqlname.Text = SQLdata.Database; txtusername.Text = SQLdata.User; txtpwd.Text = SQLdata.Password; } }
private void back_Click(object sender, RoutedEventArgs e) { LoginPark lp = new LoginPark(); this.Hide(); lp.Show(); }
private void BTSubmit_Click(object sender, RoutedEventArgs e) { if (txtpwd.Text != null) { cc.SetPassword(txtpwd.Text); MessageBox.Show("提交成功,单机确定进入登陆界面"); LoginPark lp = new LoginPark(); lp.Show(); this.Close(); } else { MessageBox.Show("密码不能为空!"); } }