Esempio n. 1
0
        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            PasswordCell?.Dispose();
            TotpCell?.Dispose();
            UsernameCell?.Dispose();
            UriCell?.Dispose();
            NameCell?.Dispose();
            NotesCell?.Dispose();
            FolderCell?.Dispose();

            if (PasswordCell?.Button != null)
            {
                PasswordCell.Button.Clicked -= PasswordButton_Clicked;
            }
            if (TotpCell?.Button != null)
            {
                TotpCell.Button.Clicked -= TotpButton_Clicked;
            }
            if (GenerateCell != null)
            {
                GenerateCell.Tapped -= GenerateCell_Tapped;
            }
            if (DeleteCell != null)
            {
                DeleteCell.Tapped -= DeleteCell_Tapped;
            }
        }
Esempio n. 2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            if (!_connectivity.IsConnected)
            {
                AlertNoConnection();
            }

            PasswordCell?.InitEvents();
            UsernameCell?.InitEvents();
            UriCell?.InitEvents();
            NameCell?.InitEvents();
            NotesCell?.InitEvents();
            TotpCell?.InitEvents();
            FolderCell?.InitEvents();

            if (PasswordCell?.Button != null)
            {
                PasswordCell.Button.Clicked += PasswordButton_Clicked;
            }
            if (TotpCell?.Button != null)
            {
                TotpCell.Button.Clicked += TotpButton_Clicked;
            }
            if (GenerateCell != null)
            {
                GenerateCell.Tapped += GenerateCell_Tapped;
            }
            if (DeleteCell != null)
            {
                DeleteCell.Tapped += DeleteCell_Tapped;
            }
        }
Esempio n. 3
0
 protected override void OnDisappearing()
 {
     base.OnDisappearing();
     PasswordCell.Dispose();
     UsernameCell.Dispose();
     UriCell.Dispose();
     NameCell.Dispose();
     NotesCell.Dispose();
     TotpCell.Dispose();
     FolderCell.Dispose();
     PasswordCell.Button.Clicked -= PasswordButton_Clicked;
     TotpCell.Button.Clicked     -= TotpButton_Clicked;
     GenerateCell.Tapped         -= GenerateCell_Tapped;
 }
Esempio n. 4
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            if (!_connectivity.IsConnected)
            {
                AlertNoConnection();
            }

            PasswordCell.InitEvents();
            UsernameCell.InitEvents();
            UriCell.InitEvents();
            NameCell.InitEvents();
            NotesCell.InitEvents();
            TotpCell.InitEvents();
            FolderCell.InitEvents();
            PasswordCell.Button.Clicked += PasswordButton_Clicked;
            if (TotpCell?.Button != null)
            {
                TotpCell.Button.Clicked += TotpButton_Clicked;
            }
            GenerateCell.Tapped += GenerateCell_Tapped;

            if (!_fromAutofill && !_settings.GetValueOrDefault(AddedLoginAlertKey, false))
            {
                _settings.AddOrUpdateValue(AddedLoginAlertKey, true);
                if (Device.RuntimePlatform == Device.iOS)
                {
                    DisplayAlert(AppResources.BitwardenAppExtension, AppResources.BitwardenAppExtensionAlert,
                                 AppResources.Ok);
                }
                else if (Device.RuntimePlatform == Device.Android && !_appInfoService.AutofillServiceEnabled)
                {
                    DisplayAlert(AppResources.BitwardenAutofillService, AppResources.BitwardenAutofillServiceAlert,
                                 AppResources.Ok);
                }
            }

            NameCell.Entry.FocusWithDelay();
        }