コード例 #1
0
        public NewAlert()
        {
            try {
                locationHandler.getLocation();
            } catch (FeatureNotSupportedException fnsEx) {
                DisplayAlert("Error", "Feature not supported on device", "OK");
            } catch (FeatureNotEnabledException fneEx) {
                DisplayAlert("Error", "Feature not enabled on device", "OK");
            } catch (PermissionException pEx) {
                DisplayAlert("Error", "Permissions not granted", "OK");
            } catch (Exception ex) {
                DisplayAlert("Error", "Unknown error, details:\n" + ex.Message, "OK");
            }

            Content    = BuildContent();
            alertTypes = c.getAlertTypeDescriptions();

            if (c.getLightMode())
            {
                BackgroundColor = Color.White;
            }
            else
            {
                BackgroundColor = Color.FromHex("282828");
            }
        }
コード例 #2
0
        public Settings()
        {
            Content    = buildContent();
            alertTypes = c.getAlertTypeDescriptions();

            if (c.getLightMode())
            {
                BackgroundColor = Color.White;
            }
            else
            {
                BackgroundColor = Color.FromHex("282828");
            }
        }
コード例 #3
0
        public DrivingMode()
        {
            NavigationPage.SetHasNavigationBar(this, false);
            Content    = BuildContent();
            alertTypes = c.getAlertTypeDescriptions();

            if (c.getLightMode())
            {
                BackgroundColor = Color.White;
            }
            else
            {
                BackgroundColor = Color.FromHex("282828");
            }
        }
コード例 #4
0
        public MainPage()
        {
            //List<tempAlertHolding> list = serverConnection.getAlertList(locationHandler.getLatidute(),locationHandler.getLongitude());

            if (!locationHandler.testLocation())
            {
                BackgroundColor = Color.Gray;
                StackLayout sl = new StackLayout();
                sl.Children.Add(new Label()
                {
                    Text = "An error has occured and location is not available"
                });
                Content = sl;
            }
            else
            {
                //Setup
                lightMode = controlVars.getLightMode();
                lightMode = false;
                //Build Layout
                Content = BuildLayout();
                if (lightMode)
                {
                    BackgroundColor = Color.White;
                }
                else
                {
                    BackgroundColor = Color.FromHex("282828");
                }
            }
        }