public QueuesPage()
        {
            InitializeComponent();
            BindingContext = vm = new QueuesViewModel(Navigation, UserDialogs.Instance);

            if (Device.RuntimePlatform != Device.iOS)
            {
                tbiAddQueue.Icon = "toolbar_new.png";
            }

            tbiAddQueue.Command = new Command(async() =>
            {
                if (vm.IsBusy)
                {
                    return;
                }
                if (!vm.StorageAccountsExist)
                {
                    return;
                }
                App.Logger.TrackPage(AppPage.NewQueue.ToString());
                var page = new NewQueuePopup(vm);
                await PopupNavigation.PushAsync(page);
            });

            lvQueues.ItemSelected += (sender, e) =>
            {
                lvQueues.SelectedItem = null;
            };
        }
Пример #2
0
        public NewQueueViewModel(INavigation navigation, IUserDialogs userDialogs, QueuesViewModel queuesVM) : base(navigation, userDialogs)
        {
            this.queuesVM = queuesVM;
            var realm           = App.GetRealm();
            var storageAccounts = realm.All <StorageAccountExt>().Where(sa => sa.IsStorageAccountOn);

            StorageAccounts.ReplaceRange(storageAccounts);
        }
Пример #3
0
 public NewQueuePopup(QueuesViewModel queuesVM)
 {
     InitializeComponent();
     BindingContext = vm = new NewQueueViewModel(Navigation, UserDialogs.Instance, queuesVM);
 }