CertOperationResult GetUserResponse( string title, string message, PlasticCertInfo serverCertificate) { GuiMessage.GuiMessageResponseButton result = GuiMessage.GuiMessageResponseButton.Third; GUIActionRunner.RunGUIAction(delegate { result = GuiMessage.ShowQuestion( title, GetCertificateMessageString(message, serverCertificate), PlasticLocalization.GetString(PlasticLocalization.Name.YesButton), PlasticLocalization.GetString(PlasticLocalization.Name.NoButton), PlasticLocalization.GetString(PlasticLocalization.Name.CancelButton), true); }); switch (result) { case GuiMessage.GuiMessageResponseButton.First: return(CertOperationResult.AddToStore); case GuiMessage.GuiMessageResponseButton.Second: return(CertOperationResult.DoNotAddToStore); case GuiMessage.GuiMessageResponseButton.Third: return(CertOperationResult.Cancel); default: return(CertOperationResult.Cancel); } }
static void HandleLog(string logString, string stackTrace, LogType type) { if (type != LogType.Exception) { return; } if (!IsPlasticStackTrace(stackTrace)) { return; } GUIActionRunner.RunGUIAction(delegate { mLog.ErrorFormat("[HandleLog] Unexpected error: {0}", logString); mLog.DebugFormat("Stack trace: {0}", stackTrace); string message = logString; if (ExceptionsHandler.DumpStackTrace()) { message += Environment.NewLine + stackTrace; } GuiMessage.ShowError(message); }); }
void AskCredentialsToUser.IGui.ShowSaveProfileErrorMessage(string message) { GUIActionRunner.RunGUIAction(delegate { GuiMessage.ShowError(string.Format( PlasticLocalization.GetString( PlasticLocalization.Name.CredentialsErrorSavingProfile), message)); }); }
public string GetEncryptionEncryptedPassword(string server) { string result = null; GUIActionRunner.RunGUIAction(delegate { result = AskForEncryptionPassword(server); }); return(result); }
AskCredentialsToUser.DialogData AskCredentialsToUser.IGui.AskUserForSSOCredentials(string cloudServer) { AskCredentialsToUser.DialogData result = null; // Check SSO auto login here GUIActionRunner.RunGUIAction(delegate { result = RunCredentialsRequest(cloudServer); }); return(result); }
AskCredentialsToUser.DialogData AskCredentialsToUser.IGui.AskUserForCredentials(string servername) { AskCredentialsToUser.DialogData result = null; GUIActionRunner.RunGUIAction(delegate { result = CredentialsDialog.RequestCredentials( servername, ParentWindow.Get()); }); return(result); }
string ClientEncryptionServiceProvider.IEncryptioPasswordProvider .GetEncryptionEncryptedPassword(string server) { string result = null; GUIActionRunner.RunGUIAction(delegate { result = AskForEncryptionPassword(server); }); return(result); }
AskCredentialsToUser.DialogData AskCredentialsToUser.IGui.AskUserForSSOCredentials(string cloudServer) { AskCredentialsToUser.DialogData result = null; GUIActionRunner.RunGUIAction(delegate { result = SSOCredentialsDialog.RequestCredentials( cloudServer, mParentWindow); }); return(result); }
CredentialsDialogData ICredentialsUI.AskUserForCredentials(string servername) { CredentialsDialogData result = null; GUIActionRunner.RunGUIAction(delegate { result = CredentialsDialog.RequestCredentials( servername, mParentWindow); }); return(result); }
static void HandleUnhandledException(object sender, UnhandledExceptionEventArgs args) { Exception ex = (Exception)args.ExceptionObject; if (IsExitGUIException(ex) || !IsPlasticStackTrace(ex.StackTrace)) { return; } GUIActionRunner.RunGUIAction(delegate { ExceptionsHandler.HandleException("HandleUnhandledException", ex); }); }
public bool ContinueWithPendingChanges() { bool result = false; GUIActionRunner.RunGUIAction(() => { result = ConfirmContinueWithPendingChangesDialog.ConfirmContinue( mTitle, mExplanation, mViewSwitcher, mParentWindow); }); return(result); }
public bool AcceptInvalidHostname(string certHostname, string serverHostname) { bool result = false; GUIActionRunner.RunGUIAction(delegate { result = GuiMessage.ShowQuestion( PlasticLocalization.GetString( PlasticLocalization.Name.InvalidCertificateHostnameTitle), PlasticLocalization.GetString( PlasticLocalization.Name.InvalidCertificateHostnameMessage, certHostname, serverHostname), PlasticLocalization.GetString(PlasticLocalization.Name.YesButton)); }); return(result); }
bool IChannelCertificateUI.AcceptInvalidHostname(string certHostname, string serverHostname) { bool result = false; GUIActionRunner.RunGUIAction(delegate { result = EditorUtility.DisplayDialog( PlasticLocalization.GetString( PlasticLocalization.Name.InvalidCertificateHostnameTitle), PlasticLocalization.GetString( PlasticLocalization.Name.InvalidCertificateHostnameMessage, certHostname, serverHostname), PlasticLocalization.GetString(PlasticLocalization.Name.YesButton), PlasticLocalization.GetString(PlasticLocalization.Name.NoButton)); }); return(result); }