コード例 #1
0
        public CiphersPage(Func <CipherView, bool> filter, string pageTitle = null, string vaultFilterSelection = null,
                           string autofillUrl = null, bool deleted = false)
        {
            InitializeComponent();
            _vm             = BindingContext as CiphersPageViewModel;
            _vm.Page        = this;
            _vm.Filter      = filter;
            _vm.AutofillUrl = _autofillUrl = autofillUrl;
            _vm.Deleted     = deleted;
            if (pageTitle != null)
            {
                _vm.PageTitle = string.Format(AppResources.SearchGroup, pageTitle);
            }
            else
            {
                _vm.PageTitle = AppResources.SearchVault;
            }
            _vm.VaultFilterDescription = vaultFilterSelection;

            if (Device.RuntimePlatform == Device.iOS)
            {
                ToolbarItems.Add(_closeItem);
                _searchBar.Placeholder = AppResources.Search;
                _mainLayout.Children.Insert(0, _searchBar);
                _mainLayout.Children.Insert(1, _separator);
                ShowModalAnimationDelay = 0;
            }
            else
            {
                NavigationPage.SetTitleView(this, _titleLayout);
            }
            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
        }
コード例 #2
0
        public CiphersPage(Func <CipherView, bool> filter, bool folder = false, bool collection = false,
                           bool type = false, string autofillUrl = null)
        {
            InitializeComponent();
            _vm             = BindingContext as CiphersPageViewModel;
            _vm.Page        = this;
            _vm.Filter      = filter;
            _vm.AutofillUrl = _autofillUrl = autofillUrl;
            if (folder)
            {
                _vm.PageTitle = AppResources.SearchFolder;
            }
            else if (collection)
            {
                _vm.PageTitle = AppResources.SearchCollection;
            }
            else if (type)
            {
                _vm.PageTitle = AppResources.SearchType;
            }
            else
            {
                _vm.PageTitle = AppResources.SearchVault;
            }

            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
        }
コード例 #3
0
        public CiphersPage(Func <CipherView, bool> filter, bool folder = false, bool collection = false,
                           bool type = false, string autofillUrl = null)
        {
            InitializeComponent();
            _vm             = BindingContext as CiphersPageViewModel;
            _vm.Page        = this;
            _vm.Filter      = filter;
            _vm.AutofillUrl = _autofillUrl = autofillUrl;
            if (folder)
            {
                _vm.PageTitle = AppResources.SearchFolder;
            }
            else if (collection)
            {
                _vm.PageTitle = AppResources.SearchCollection;
            }
            else if (type)
            {
                _vm.PageTitle = AppResources.SearchType;
            }
            else
            {
                _vm.PageTitle = AppResources.SearchVault;
            }

            if (Device.RuntimePlatform == Device.iOS)
            {
                ToolbarItems.Add(_closeItem);
                _titleLayout.Children.Remove(_backButton);
            }
            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
        }
コード例 #4
0
        public CiphersPage(Func <CipherView, bool> filter, bool folder = false, bool collection = false,
                           bool type = false, string autofillUrl = null, bool deleted = false)
        {
            InitializeComponent();
            _vm             = BindingContext as CiphersPageViewModel;
            _vm.Page        = this;
            _vm.Filter      = filter;
            _vm.AutofillUrl = _autofillUrl = autofillUrl;
            _vm.Deleted     = deleted;
            if (deleted)
            {
                _vm.PageTitle = AppResources.SearchTrash;
            }
            else if (folder)
            {
                _vm.PageTitle = AppResources.SearchFolder;
            }
            else if (collection)
            {
                _vm.PageTitle = AppResources.SearchCollection;
            }
            else if (type)
            {
                _vm.PageTitle = AppResources.SearchType;
            }
            else
            {
                _vm.PageTitle = AppResources.SearchVault;
            }

            if (Device.RuntimePlatform == Device.iOS)
            {
                ToolbarItems.Add(_closeItem);
                _searchBar.Placeholder = AppResources.Search;
                _mainLayout.Children.Insert(0, _searchBar);
                _mainLayout.Children.Insert(1, _separator);
            }
            else
            {
                NavigationPage.SetTitleView(this, _titleLayout);
            }
            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
        }