コード例 #1
0
        private AboutPageViewModel CreateAboutPageViewModel()
        {
            var aboutPageViewModel = new AboutPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[ABOUT_PIVOTITEM] = aboutPageViewModel;
            return(aboutPageViewModel);
        }
コード例 #2
0
        private UARTSettingPageViewModel CreateUARTSettingViewModel()
        {
            var uARTSettingViewModel = new UARTSettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[UART_SETTING] = uARTSettingViewModel;
            return(uARTSettingViewModel);
        }
コード例 #3
0
        private BloodPressureMonitorSettingPageViewModel CreateBloodPressureMonitorSettingViewModel()
        {
            var bloodPressureMonitorSettingPageViewModel = new BloodPressureMonitorSettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[BPM_SETTING] = bloodPressureMonitorSettingPageViewModel;
            return(bloodPressureMonitorSettingPageViewModel);
        }
コード例 #4
0
        private ProximitySettingPageViewModel CreateProximitySettingViewModel()
        {
            var proximitySettingPageViewModel = new ProximitySettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[PROXIMITY_SETTING] = proximitySettingPageViewModel;
            return(proximitySettingPageViewModel);
        }
コード例 #5
0
        private DeviceFirmwareUpdateSettingPageViewModel CreateDFUSettingPageViewModel()
        {
            var deviceFirmwareUpdateSettingPageViewModel = new DeviceFirmwareUpdateSettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[DEVICE_FIRMWARE_UPDATE_SETTING] = deviceFirmwareUpdateSettingPageViewModel;
            return(deviceFirmwareUpdateSettingPageViewModel);
        }
コード例 #6
0
        private HeartRateMonitorSettingPageViewModel CreateHeartRateMonitorSettingViewModel()
        {
            var heartRateMonitorSettingViewModel = new HeartRateMonitorSettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[HEART_RATE_MONITOR_SETTING] = heartRateMonitorSettingViewModel;
            return(heartRateMonitorSettingViewModel);
        }
コード例 #7
0
        private GlucoseMonitorSettingPageViewModel CreateGlucoseMonitorSettingViewModel()
        {
            var glucoseMonitorSettingViewModel = new GlucoseMonitorSettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[BGM_SETTING] = glucoseMonitorSettingViewModel;
            return(glucoseMonitorSettingViewModel);
        }
コード例 #8
0
        internal BloodPressureMonitorSettingPageViewModel GetBloodPressureMeasurementViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(BPM_SETTING, out viewModel))
            {
                return(viewModel as BloodPressureMonitorSettingPageViewModel);
            }
            else
            {
                return(CreateBloodPressureMonitorSettingViewModel());
            }
        }
コード例 #9
0
        internal GlucoseMonitorSettingPageViewModel GetGlucoseMonitorViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(BGM_SETTING, out viewModel))
            {
                return(viewModel as GlucoseMonitorSettingPageViewModel);
            }
            else
            {
                return(CreateGlucoseMonitorSettingViewModel());
            }
        }
コード例 #10
0
        internal UARTSettingPageViewModel GetUartSettingViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(UART_SETTING, out viewModel))
            {
                return(viewModel as UARTSettingPageViewModel);
            }
            else
            {
                return(CreateUARTSettingViewModel());
            }
        }
コード例 #11
0
        internal AboutPageViewModel GetAboutPageViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(ABOUT_PIVOTITEM, out viewModel))
            {
                return(viewModel as AboutPageViewModel);
            }
            else
            {
                return(CreateAboutPageViewModel());
            }
        }
コード例 #12
0
        internal ProximitySettingPageViewModel GetProximitySettingViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(PROXIMITY_SETTING, out viewModel))
            {
                return(viewModel as ProximitySettingPageViewModel);
            }
            else
            {
                return(CreateProximitySettingViewModel());
            }
        }
コード例 #13
0
        internal HeartRateMonitorSettingPageViewModel GetHeartRateMonitorSettingViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(HEART_RATE_MONITOR_SETTING, out viewModel))
            {
                return(viewModel as HeartRateMonitorSettingPageViewModel);
            }
            else
            {
                return(CreateHeartRateMonitorSettingViewModel());
            }
        }
コード例 #14
0
        internal DeviceFirmwareUpdateSettingPageViewModel GetDeviceFirmwareUpdateSettingPageViewModel()
        {
            object viewModel;

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(DEVICE_FIRMWARE_UPDATE_SETTING, out viewModel))
            {
                return(viewModel as DeviceFirmwareUpdateSettingPageViewModel);
            }
            else
            {
                return(CreateDFUSettingPageViewModel());
            }
        }
コード例 #15
0
        internal async void LoadDFUSettings()
        {
            dfuSettingViewModel = SettingPivotViewModel.GetInstance().GetDeviceFirmwareUpdateSettingPageViewModel();
            this.SelectedDeviceFirmwareTypeName = dfuSettingViewModel.SelectedDeviceFirmwareTypeName == null ? "Image type:" : dfuSettingViewModel.SelectedDeviceFirmwareTypeName;
            foreach (var token in dfuSettingViewModel.FileToken.Values)
            {
                if (StorageApplicationPermissions.FutureAccessList.ContainsItem(token))
                {
                    var file = await StorageApplicationPermissions.FutureAccessList.GetFileAsync(token);

                    this.ChosenFiles.Add(file);
                }
            }
            this.ImageFileNames = dfuSettingViewModel.GetShortFileName();

            if (!IsImagesReadyToSend())
            {
                await UpdateDFUStatus(DeviceFirmwareUpdateStatusEnum.FILES_NOT_CHOSEN);
            }
            else
            {
                await UpdateDFUStatus(DeviceFirmwareUpdateStatusEnum.READY);
            }
        }