private string GetMessagePasswordNoID() { GetPassword getPass = new GetPassword(); getPass.StartPosition = FormStartPosition.CenterParent; if (getPass.ShowDialog() == DialogResult.OK) { return getPass.Password; } else { return null; } }
private string GetMessagePassword(string friendID, bool isChange=false) { InboxUser a = MyHelper.GetInboxByUserID(friendID, ListInboxUser); if (a != null) { if (!string.IsNullOrEmpty(a.Password) && a.IsSavePass && isChange == false) { return a.Password; } else { GetPassword getPass = new GetPassword(); getPass.StartPosition = FormStartPosition.CenterParent; if (getPass.ShowDialog() == DialogResult.OK) { a.Password = getPass.Password; a.IsSavePass = getPass.IsSavePass; return a.Password; } else { return null; } } } return null; ; }