private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (this.R_Name.Text == "" || this.R_password.Text == "")
     {
         MessageBox.Show("用户名或密码不能为空!");
     }
     else
     {
         CryptoServiceClient client = new CryptoServiceClient();
         int c = client.Login(this.R_Name.Text, this.R_password.Text);
         if (c == 0)
         {
             MessageBox.Show("用户名或密码不正确!");
         }
         else
         {
             IndexWindow indexWindow = new IndexWindow();
             indexWindow.userName = this.R_Name.Text;
             indexWindow.Show();
             this.Close();
         }
     }
 }