示例#1
0
        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;
            }
        }
示例#2
0
        private void back_Click(object sender, RoutedEventArgs e)
        {
            LoginPark lp = new LoginPark();

            this.Hide();
            lp.Show();
        }
示例#3
0
 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("密码不能为空!");
     }
 }