示例#1
0
        private ProximitySettingPageViewModel CreateProximitySettingViewModel()
        {
            var proximitySettingPageViewModel = new ProximitySettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[PROXIMITY_SETTING] = proximitySettingPageViewModel;
            return(proximitySettingPageViewModel);
        }
示例#2
0
        private BloodPressureMonitorSettingPageViewModel CreateBloodPressureMonitorSettingViewModel()
        {
            var bloodPressureMonitorSettingPageViewModel = new BloodPressureMonitorSettingPageViewModel();

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[BPM_SETTING] = bloodPressureMonitorSettingPageViewModel;
            return(bloodPressureMonitorSettingPageViewModel);
        }
示例#3
0
        private DeviceFirmwareUpdateSettingPageViewModel CreateDFUSettingPageViewModel()
        {
            var deviceFirmwareUpdateSettingPageViewModel = new DeviceFirmwareUpdateSettingPageViewModel();

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

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

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[BGM_SETTING] = glucoseMonitorSettingViewModel;
            return(glucoseMonitorSettingViewModel);
        }
示例#6
0
        private AboutPageViewModel CreateAboutPageViewModel()
        {
            var aboutPageViewModel = new AboutPageViewModel();

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

            SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary[UART_SETTING] = uARTSettingViewModel;
            return(uARTSettingViewModel);
        }
		public static SettingPivotViewModel GetInstance()
		{
			if (proximityViewModelInstance != null)
			{
				return proximityViewModelInstance;
			}
			else
			{
				proximityViewModelInstance = new SettingPivotViewModel();
				return proximityViewModelInstance;
			}
		}
示例#9
0
 public static SettingPivotViewModel GetInstance()
 {
     if (proximityViewModelInstance != null)
     {
         return(proximityViewModelInstance);
     }
     else
     {
         proximityViewModelInstance = new SettingPivotViewModel();
         return(proximityViewModelInstance);
     }
 }
示例#10
0
        internal HeartRateMonitorSettingPageViewModel GetHeartRateMonitorSettingViewModel()
        {
            object viewModel;

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

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(DEVICE_FIRMWARE_UPDATE_SETTING, out viewModel))
            {
                return(viewModel as DeviceFirmwareUpdateSettingPageViewModel);
            }
            else
            {
                return(CreateDFUSettingPageViewModel());
            }
        }
示例#12
0
        internal BloodPressureMonitorSettingPageViewModel GetBloodPressureMeasurementViewModel()
        {
            object viewModel;

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

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

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

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

            if (SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary.TryGetValue(PROXIMITY_SETTING, out viewModel))
            {
                return(viewModel as ProximitySettingPageViewModel);
            }
            else
            {
                return(CreateProximitySettingViewModel());
            }
        }
        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);
            }
        }