Exemplo n.º 1
0
        private void Handler_SetupCompleted(object sender, EventArgs e)
        {
            ExternalButtons = new GpioButtonService();
            if (ExternalButtons != null)
            {
                ExternalButtons.ButtonOnePressed   += ExternalButtons_ButtonOnePressed;
                ExternalButtons.ButtonTwoPressed   += ExternalButtons_ButtonTwoPressed;
                ExternalButtons.ButtonThreePressed += ExternalButtons_ButtonThreePressed;
            }
            HeaderField     = handler.GetHeaderText();
            BackgroundImage = handler.GetBackgroundPicture();
            Loading         = false;

            var DefaultColor = new LinearGradientBrush();

            DefaultColor.StartPoint    = new Point(0.5, 0);
            DefaultColor.EndPoint      = new Point(0.5, 1);
            DefaultColor.GradientStops = new GradientStopCollection();
            DefaultColor.GradientStops.Add(new GradientStop()
            {
                Color = Windows.UI.Colors.Gray, Offset = 0
            });
            DefaultColor.GradientStops.Add(new GradientStop()
            {
                Color = Windows.UI.Colors.Brown, Offset = 1
            });
            QuestionFieldBackground = DefaultColor;
            QuestionField           = messageSetYourInitialz;
        }
Exemplo n.º 2
0
        public MainViewModel(INavigationService navigationService)
        {
            startButtons = new GpioButtonService();
            DispatcherHelper.Initialize();
            NavigationService = navigationService;

            if (startButtons != null)
            {
                startButtons.ButtonOnePressed   += StartButtons_ButtonOnePressed;
                startButtons.ButtonThreePressed += StartButtons_ButtonThreePressed;
            }
        }