示例#1
0
 private void InitialControls()
 {
     appBarPage             = new AppBarControl();
     deviceSelectionControl = new DeviceSelectionFlyoutControl();
     errorMessageFlyout     = new ErrorMessageFlyout();
     RegisterDeviceSelectionControl();
 }
        private void RegisterDeviceSelectionControl()
        {
            var controlPage = new AppBarControl();

            deviceSelectionVM = new ToolboxDeviceSelectionViewModel();
            this.BottomAppBar = controlPage.BottomAppBar;
            this.BottomAppBar.ClosedDisplayMode = AppBarClosedDisplayMode.Minimal;
            AboutButton            = (AppBarButton)controlPage.FindName(AppBarControl.TOOLBOX_ABOUT);
            AboutButton.Visibility = Windows.UI.Xaml.Visibility.Visible;
            AboutButton.Click     += AboutSettingButton_Click;
            var settingButton = (AppBarButton)controlPage.FindName(AppBarControl.TOOLBOX_SETTING);

            settingButton.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
        }
		private async void InitialControls()
		{
			appBarPage = new AppBarControl();
			deviceSelectionControl = new DeviceSelectionFlyoutControl();
			errorMessageFlyout = new ErrorMessageFlyout();
			this.GlucoseMonitorViewModel = GlucoseMonitorViewModel.GetGlucoseMonitorViewModel();
			this.DataContext = GlucoseMonitorViewModel;
			RegisterDeviceSelectionControl();
			var chosenDevice = GlucoseMonitorViewModel.chosenDevice;
			if(chosenDevice != null
				&& chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Connected
				&& GlucoseMonitorViewModel.IsServiceStarted)
			{
				await StartedModelUI();
			}
			if(chosenDevice != null 
				&& chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Disconnected
				&& GlucoseMonitorViewModel.IsServiceStarted)
			{
				GlucoseMonitorViewModel.StopServices();
			}
		}
		private void InitialControls()
		{
			appBarPage = new AppBarControl();
			deviceSelectionControl = new DeviceSelectionFlyoutControl();
			errorMessageFlyout = new ErrorMessageFlyout();
			this.BloodPressureMonitorViewModel = BloodPressureMonitorViewModel.GetBloodPressureMonitorViewModel();
			this.DataContext = BloodPressureMonitorViewModel;
			RegisterDeviceSelectionControl();
			var chosenDevice = BloodPressureMonitorViewModel.chosenDevice;
			if (chosenDevice != null
				&& chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Connected
				&& BloodPressureMonitorViewModel.IsServiceStarted)
			{
				StartedModelUI();
			}
			//if (chosenDevice != null
			//	&& chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Disconnected
			//	&& BloodPressureMonitorViewModel.IsServiceStarted)
			//{
			//	//GlucoseMonitorViewModel.StopServices();
			//}
		}
示例#5
0
        private async void InitialControls()
        {
            appBarPage                   = new AppBarControl();
            deviceSelectionControl       = new DeviceSelectionFlyoutControl();
            errorMessageFlyout           = new ErrorMessageFlyout();
            this.GlucoseMonitorViewModel = GlucoseMonitorViewModel.GetGlucoseMonitorViewModel();
            this.DataContext             = GlucoseMonitorViewModel;
            RegisterDeviceSelectionControl();
            var chosenDevice = GlucoseMonitorViewModel.chosenDevice;

            if (chosenDevice != null &&
                chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Connected &&
                GlucoseMonitorViewModel.IsServiceStarted)
            {
                await StartedModelUI();
            }
            if (chosenDevice != null &&
                chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Disconnected &&
                GlucoseMonitorViewModel.IsServiceStarted)
            {
                GlucoseMonitorViewModel.StopServices();
            }
        }
        private void InitialControls()
        {
            appBarPage                         = new AppBarControl();
            deviceSelectionControl             = new DeviceSelectionFlyoutControl();
            errorMessageFlyout                 = new ErrorMessageFlyout();
            this.BloodPressureMonitorViewModel = BloodPressureMonitorViewModel.GetBloodPressureMonitorViewModel();
            this.DataContext                   = BloodPressureMonitorViewModel;
            RegisterDeviceSelectionControl();
            var chosenDevice = BloodPressureMonitorViewModel.chosenDevice;

            if (chosenDevice != null &&
                chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Connected &&
                BloodPressureMonitorViewModel.IsServiceStarted)
            {
                StartedModelUI();
            }
            //if (chosenDevice != null
            //	&& chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Disconnected
            //	&& BloodPressureMonitorViewModel.IsServiceStarted)
            //{
            //	//GlucoseMonitorViewModel.StopServices();
            //}
        }
		private void InitialControls()
		{
			appBarPage = new AppBarControl();
			deviceSelectionControl = new DeviceSelectionFlyoutControl();
			errorMessageFlyout = new ErrorMessageFlyout();
			RegisterDeviceSelectionControl();
		}
		private void RegisterControls()
		{
			appBarPage = new AppBarControl();
			deviceSelectionControl = new DeviceSelectionFlyoutControl();
			buttonSelectionControl = new ControlButtonSelectionFlyoutControl();
		}
		private void RegisterDeviceSelectionControl()
		{
			var controlPage = new AppBarControl();
			deviceSelectionVM = new ToolboxDeviceSelectionViewModel();
			this.BottomAppBar = controlPage.BottomAppBar;
			this.BottomAppBar.ClosedDisplayMode = AppBarClosedDisplayMode.Minimal;
			AboutButton = (AppBarButton)controlPage.FindName(AppBarControl.TOOLBOX_ABOUT);
			AboutButton.Visibility = Windows.UI.Xaml.Visibility.Visible;
			AboutButton.Click += AboutSettingButton_Click;
			var settingButton = (AppBarButton)controlPage.FindName(AppBarControl.TOOLBOX_SETTING);
			settingButton.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
		}
 private void RegisterControls()
 {
     appBarPage             = new AppBarControl();
     deviceSelectionControl = new DeviceSelectionFlyoutControl();
     buttonSelectionControl = new ControlButtonSelectionFlyoutControl();
 }