public void Login(LoginInformationViewModel LoginInformation, bool ForceNewLogin = false) { if (!isConnected || ForceNewLogin) { jira = Jira.CreateRestClient(LoginInformation.LoginInformation.URI, LoginInformation.LoginInformation.Username, LoginInformation.LoginInformation.Password); jira.RestClient.RestSharpClient.Proxy = System.Net.WebRequest.GetSystemWebProxy(); jira.RestClient.RestSharpClient.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; ReadListsOfValues(); isConnected = true; } }
public bool ShowSetLoginInformationDialog(LoginInformationViewModel DataContext) { bool result; var LoginInformationDlg = new View.LoginInformation() { DataContext = DataContext }; if (DataContext.LoginInformation.SavePassword) { LoginInformationDlg.txtPassword.Password = DataContext.LoginInformation.Password; } result = LoginInformationDlg.ShowDialog() == true ? true : false; if (result) { DataContext.LoginInformation.Password = LoginInformationDlg.txtPassword.Password; } return(result); }