private void 修改密码ToolStripMenuItem_Click(object sender, EventArgs e) { //实例化一个密码修改的窗口,并指定了实现修改的具体方法,指定了密码长度 FormPasswordModify fpm = new FormPasswordModify(UserClient.UserAccount.Password, p => { JObject json = new JObject(); json.Add(UserAccount.UserNameText, UserClient.UserAccount.UserName); json.Add(UserAccount.PasswordText, p); return(UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.密码修改 + json.ToString()).IsSuccess); }, 6, 8); fpm.ShowDialog(); fpm.Dispose(); }
private void MenuItem密码更改_Click(object sender, RoutedEventArgs e) { using (FormPasswordModify fpm = new FormPasswordModify(UserClient.UserAccount.Password, p => { JObject json = new JObject { { UserAccount.UserNameText, UserClient.UserAccount.UserName }, { UserAccount.PasswordText, p } }; return(UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.密码修改, json.ToString()).IsSuccess); }, 6, 8)) { fpm.ShowDialog(); } }