예제 #1
0
        public ActionResult EditAbout(InfoPageViewModel model)
        {
            var entity = _infoPageRepo.Get().First();

            entity.PageContent = model.PageContent;
            _infoPageRepo.Update(entity);
            return(RedirectToAction("About"));
        }
예제 #2
0
        public InfoPage(string webSite, string aboutSight, string name, string url1, string url2, string url3, string url4)
        {
            InitializeComponent();

            BindingContext = new InfoPageViewModel(Navigation, webSite, aboutSight, name, url1, url2, url3, url4);

            NavigationPage.SetHasNavigationBar(this, false);
        }
예제 #3
0
        public TankPage(IPeripheral peripheral)
        {
            // mystack.Enqueue(10);

            InitializeComponent();
            BindingContext = new InfoPageViewModel(peripheral);
            //PrintPageViewModel numberz = new InfoPageViewModel(peripheral);
            // num = numberz.Tinstant;
        }
예제 #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            _viewModel = new InfoPageViewModel();

            AdaptToInfosCollection();

            DataContext = _viewModel;
        }
예제 #5
0
        public ActionResult EditAbout()
        {
            var infoPage          = _infoPageRepo.Get().First();
            var infoPageViewModel = new InfoPageViewModel
            {
                PageContent = infoPage.PageContent
            };

            return(View(infoPageViewModel));
        }
예제 #6
0
        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);

            DataContext = null;

            if (_viewModel != null)
            {
                _viewModel = null;
            }
        }
예제 #7
0
 public MainViewModel(ConnectionPageViewModel connectionPage,
                      SubscriptionsPageViewModel subscriptionsPage,
                      PublishPageViewModel publishPage,
                      PacketInspectorPageViewModel packetInspectorPage,
                      InfoPageViewModel infoPage)
 {
     ConnectionPage      = connectionPage;
     SubscriptionsPage   = subscriptionsPage;
     PublishPage         = publishPage;
     PacketInspectorPage = packetInspectorPage;
     InfoPage            = infoPage;
 }
예제 #8
0
 public InfoPage()
 {
     InitializeComponent();
     infoPageObj      = new InfoPageViewModel();
     this.DataContext = infoPageObj;
 }
예제 #9
0
        public InfoPageViewModel Build()
        {
            var viewModel = new InfoPageViewModel { HeaderViewModel = this._headerViewModelFactory.Build() };

            return viewModel;
        }
예제 #10
0
 public InfoPage(IPeripheral peripheral)
 {
     InitializeComponent();
     BindingContext = new InfoPageViewModel(peripheral);
 }