Ejemplo n.º 1
0
 public InputPage()
 {
     InitializeComponent();
     var vm = new CommonVM();
     StoreFactory.CurrentVM = vm;
     StoreFactory.CurrentVM.Navi = this.Navigation;
 }
Ejemplo n.º 2
0
        public OutputPage(CommonVM vm)
        {
            this.BindingContext = vm;
            PanDecorator.ResetLastSelected();

            InitializeComponent();
        }
Ejemplo n.º 3
0
 public InputPage(CommonVM vm)
 {
     this.BindingContext = vm;
     InitializeComponent();
     
     vm.Navi = this.Navigation;
     vm.ShowAlert = this.ShowAlert;
     PanDecorator.ResetLastSelected();
 }
Ejemplo n.º 4
0
        public ShopListPage(CommonVM vm)
        {
            this.BindingContext = vm;
            foreach (var store in vm.StoreList)
            {
                store.AssignParent(vm);
            }
            vm.PendingStore = vm.CurrentStore;

            InitializeComponent();
            this.storeList.SelectedItem = vm.PendingStore;
        }
Ejemplo n.º 5
0
 public LogsPage(CommonVM vm)
 {
     this.BindingContext = vm;
     InitializeComponent();
 }
Ejemplo n.º 6
0
 protected override void OnBindingContextChanged()
 {
     base.OnBindingContextChanged();
     CommonVM vm = this.BindingContext as CommonVM;
 }
Ejemplo n.º 7
0
        public MainVM(MainPage pageArg)
        {
            var vm = new CommonVM()
            {
                Parent = this
            };

            SettingsBaseVM settingVm = new SettingsVM(StoreFactory.HalProxy.ReadSettings());
            CreateListVM   listVm    = new CreateListVM();

            vm.Order = new OutputLineVisitor(vm);
            StoreFactory.CurrentVM = vm;

            listVm.Parent = vm.Parent;

//            foreach(var line in StoreFactory.HalProxy.ReadGmail())
//                vm.Logs.Add(line);

            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.Gmail, Icon = StoreFactory.HalProxy.ResourcePrefix + "mail.png", Type = typeof(LoginPage), VM = listVm, Page = new LoginPage(listVm)
            });
            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.CreateList, Icon = StoreFactory.HalProxy.ResourcePrefix + "edit.png", Type = typeof(CreateListPage), VM = listVm, Page = new CreateListPage(listVm)
            });
            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.InputList, Icon = StoreFactory.HalProxy.ResourcePrefix + "in.png", Type = typeof(InputPage), VM = vm, Page = new InputPage(vm)
            });
            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.OutputList, Icon = StoreFactory.HalProxy.ResourcePrefix + "out.png", Type = typeof(OutputPage), VM = vm, Page = new OutputPage(vm)
            });
            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.CarouselList, Icon = StoreFactory.HalProxy.ResourcePrefix + "carousel.png", Type = typeof(CarouselOutput), VM = vm, Page = new CarouselOutput(vm)
            });
            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.Settings, Icon = StoreFactory.HalProxy.ResourcePrefix + "settings.png", Type = typeof(SettingsPage), VM = settingVm, Page = new SettingsPage(settingVm)
            });
            this.Pages.Add(new PageItem()
            {
                Title = Resources.TextResource.Logs, Icon = StoreFactory.HalProxy.ResourcePrefix + "logs.png", Type = typeof(LogsPage), VM = vm, Page = new LogsPage()
            });

            OnPropertyChanged("Pages");

            this.GoToPageCmd = new Command(() =>
            {
                string typeName = "InputPage";
                switch (typeName.ToString())
                {
                case "LoginPage":
                    this.Navi.PushAsync(this.Pages[0].Page, true);
                    break;

                case "CreateListPage":
                    this.Navi.PushAsync(this.Pages[1].Page, true);
                    break;

                case "InputPage":
                    this.Navi.PushAsync(this.Pages[2].Page, true);
                    break;

                case "Output":
                    this.Navi.PushAsync(this.Pages[3].Page, true);
                    break;

                case "Carousel":
                    this.Navi.PushAsync(this.Pages[4].Page, true);
                    break;

                case "SettingsPage":
                    this.Navi.PushAsync(this.Pages[5].Page, true);
                    break;

                case "LogsPage":
                    this.Navi.PushAsync(this.Pages[6].Page, true);
                    break;
                }
            });

            StoreFactory.MainVM = this;
            this.page           = pageArg;
        }
Ejemplo n.º 8
0
 public CarouselOutput(CommonVM vm)
 {
     this.BindingContext = vm;
     InitializeComponent();
 }