/// <summary> /// Store Mingle login credentials and host name in User Settings /// </summary> /// <param name="loginDetails"></param> public void SetMingleLoginDetails(LoginWindow.LoginDetails loginDetails) { try { TraceLog.WriteLine(new StackFrame().GetMethod().Name, string.Format(CultureInfo.InstalledUICulture, "host={0}, user={1}", loginDetails.Host, loginDetails.Username)); _mingleProject.SetLoginDetails(loginDetails.Host, loginDetails.Username, loginDetails.Password); } catch (Exception ex) { _ribbon.AlertUser(ex.Message); TraceLog.Exception(new StackFrame().GetMethod().Name,ex); return; } _ribbonModel.EnableFetchButton(); }
/// <summary> /// Ask user for Mingle authenticaion credentials /// </summary> /// <param name="model"></param> /// <param name="action"></param> public void AskUserForLoginDetails(LoginWindow.LoginDetails model, Action<LoginWindow.LoginDetails> action) { var login = new LoginWindow(model) { Owner = (Window)Container }; login.AskUserForDetails(action); }