UnityGame/Library/PackageCache/com.unity.collab-proxy/Editor/PlasticSCM/Configuration/MissingEncryptionPasswordPromptHandler.cs
2024-10-27 10:53:47 +03:00

37 lines
1013 B
C#

using UnityEditor;
using Codice.Client.Common.Encryption;
using PlasticGui;
using Unity.PlasticSCM.Editor.UI;
namespace Unity.PlasticSCM.Editor.Configuration
{
internal class MissingEncryptionPasswordPromptHandler :
ClientEncryptionServiceProvider.IEncryptioPasswordProvider
{
string ClientEncryptionServiceProvider.IEncryptioPasswordProvider
.GetEncryptionEncryptedPassword(string server)
{
string result = null;
GUIActionRunner.RunGUIAction(delegate
{
result = AskForEncryptionPassword(server);
});
return result;
}
string AskForEncryptionPassword(string server)
{
EncryptionConfigurationDialogData dialogData =
EncryptionConfigurationDialog.RequestEncryptionPassword(server, ParentWindow.Get());
if (!dialogData.Result)
return null;
return dialogData.EncryptedPassword;
}
}
}