/// <summary> Конструктор </summary>
        public ViewUserAuthorization()
        {
            InitializeComponent();

            DataContext = _viewModelUserAuthorization;

            _viewModelUserAuthorization.PropertyChanged += ViewModelUserAuthorizationOnPropertyChanged;

            _viewModelUserAuthorization.LockUI += (sender, lockUI) => OnLockWindow(lockUI);
            // обход ограничений биндинга PasswordBox'а
            PasswordBoxUser.Password = UtilitySecurity.ConvertToString(_viewModelUserAuthorization.CurrentModelLogin.Password);

            ComboBoxServerArea.Visibility = _viewModelUserAuthorization.CurrentModelLogin.ModelServerAreaObj == null || _viewModelUserAuthorization.CurrentModelLogin.ModelServerAreaObj.Id == 0 ? Visibility.Hidden : Visibility.Visible;

            TextBlockVestion.Text = _viewModelUserAuthorization.AppVersion;
        }
 /// <summary> Проверка возможности Экспорта ключа из БЛ</summary>
 public bool CheckEncryptionkey()
 {
     return(!String.IsNullOrEmpty(UtilitySecurity.ConvertToString(DataSourceSecurity.GetUserPrivateKey())));
 }
 /// <summary> Возвращает ключ шифрования залогиненого пользователя для экспорта </summary>
 public string GetUserPrivateKey()
 {
     return(UtilitySecurity.ConvertToString(DataSourceSecurity.GetUserPrivateKey()));
 }