Esempio n. 1
0
        private void PrevChart_OnClick(object sender, RoutedEventArgs e)
        {
            EmdViewModel vm = DataContext as EmdViewModel;

            if (vm != null)
            {
                vm.OnPrevChartPressed();
            }
        }
Esempio n. 2
0
        private async void NextChart_OnClick(object sender, RoutedEventArgs e)
        {
            EmdViewModel vm = DataContext as EmdViewModel;

            if (vm != null)
            {
                await vm.OnNextChartPressed((enabled) => {
                    btnNextChart.IsEnabled = enabled;
                    btnPrevChart.IsEnabled = enabled;
                });
            }
        }
Esempio n. 3
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            int?channelNo = e.Parameter as int?;

            if (channelNo != null)
            {
                var viewModel = new EmdViewModel((int)channelNo);
                DataContext = viewModel;
                viewModel.Initialize();
            }
        }