Ejemplo n.º 1
0
 public void OpenDialogGPSSettings()
 {
     CoverDialog.IsVisible = true;
     CoverDialog.FadeTo(1, 250, Easing.CubicOut);
     DialogGPSSettings.IsVisible = true;
     IsDialog = true;
 }
Ejemplo n.º 2
0
 public void CloseDialogGPSSettings()
 {
     CoverDialog.FadeTo(0, 250, Easing.CubicOut);
     CoverDialog.IsVisible       = false;
     DialogGPSSettings.IsVisible = false;
     IsDialog = false;
 }
Ejemplo n.º 3
0
 public void OpenGPSSettings(object sender, PanUpdatedEventArgs e)
 {
     if (Device.OS == TargetPlatform.Android)
     {
         var intent = new Intent(Android.Provider.Settings.ActionLocationSourceSettings);
         intent.SetFlags(ActivityFlags.NewTask);
         Android.App.Application.Context.StartActivity(intent);
         CoverDialog.FadeTo(0, 250, Easing.CubicOut);
         CoverDialog.IsVisible       = false;
         DialogGPSSettings.IsVisible = false;
     }
 }
Ejemplo n.º 4
0
        public MainPage()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);

            var panGesture_main = new PanGestureRecognizer();

            panGesture_main.PanUpdated += OnPanUpdated_main;
            MainStack.GestureRecognizers.Add(panGesture_main);

            var panGesture_cover = new PanGestureRecognizer();

            panGesture_cover.PanUpdated += OnPanUpdated_cover;
            CoverMenu.GestureRecognizers.Add(panGesture_cover);

            var panGesture_menu = new PanGestureRecognizer();

            panGesture_menu.PanUpdated += OnPanUpdated_menu;
            MenuBox.GestureRecognizers.Add(panGesture_menu);

            var tapGestureRecognizer = new TapGestureRecognizer();

            tapGestureRecognizer.Tapped += (s, e) =>
            {
                CloseMenu();
            };
            CoverMenu.GestureRecognizers.Add(tapGestureRecognizer);
            var tapGestureRecognizer2 = new TapGestureRecognizer();

            tapGestureRecognizer2.Tapped += (s, e) =>
            {
                CoverDialog.FadeTo(0, 250, Easing.CubicOut);
                CoverDialog.IsVisible       = false;
                DialogGPSSettings.IsVisible = false;
            };
            CoverDialog.GestureRecognizers.Add(tapGestureRecognizer2);
        }