private void ValidatePasswordAndNavigate()
        {
            var keyManager = new KeyManager();



            if (keyManager.Hash(_password) == keyManager.GetEncryptionKey(true))
            {
                _navigationService.NavigateTo("SherpanyValuesPageView");
            }
            else
            {
                _dialogService.ShowError("Invalid PIN", "Pin is incorrect", "ok", null);
            }
        }
 public void TryLogin()
 {
     if (IsPasswordSet)
     {
         if (!VerifyPassword(Password))
         {
             _dialogService.ShowError("Invalid password entered", "The password is incorrect", "ok", null);
             return;
         }
     }
     else
     {
         StorePassword(Password);
     }
     _navigationService.NavigateTo("SherpanyValuesPageView");
 }
        public async void OnFileDrop(Grid s, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                string fileName = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();

                if (fileName.ToUpper().EndsWith(".DCM"))
                {
                    _navigationService.For <MainViewModel>()
                    .WithParam(v => v.FilePath, fileName)
                    .Navigate();
                }
                else
                {
                    await _dialogService.ShowError("Invalid File", "Error", null, () => { });
                }
            }
        }