public MainPage(string resource, string parameter = "")
 {
     InitializeComponent();
     On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);
     observableResource.PropertyChanged += ObservableResource_PropertyChanged;
     if (!string.IsNullOrWhiteSpace(parameter))
     {
         resource += "/" + parameter;
     }
     Task.Run(() => { Handle_Timeout(); });
     RockClient.GetResource <MobilePage>(observableResource, "/api/avalanche/" + resource);
 }
 private void BackgroundAction()
 {
     if (Attributes.ContainsKey("Resources") && !string.IsNullOrWhiteSpace(Attributes["Resources"]))
     {
         ObservableResource <MobilePage> observableResource = new ObservableResource <MobilePage>();
         var resources = Attributes["Resources"].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
         foreach (var resource in resources)
         {
             RockClient.GetResource(observableResource, resource);
         }
     }
 }
 public AvalanchePage()
 {
     Children.Clear();
     AvalancheNavigation.Footer = null;
     mainPage       = new MainPage();
     App.Navigation = new Xamarin.Forms.NavigationPage(mainPage);
     Children.Add(App.Navigation);
     observableResource.PropertyChanged += ObservableResource_PropertyChanged;
     RockClient.GetResource(observableResource, "/api/avalanche/home");
     if (!App.Current.Properties.ContainsKey("SecondRun"))
     {
         App.Navigation.Navigation.PushModalAsync(new LaunchPage());
         App.Current.Properties["SecondRun"] = true;
     }
 }
Exemple #4
0
        public AvalanchePage()
        {
            observableResource.PropertyChanged += ObservableResource_PropertyChanged;
            RockClient.GetResource(observableResource, "/api/avalanche/home");
            mainPage = new MainPage();
            //App.Navigation = new Xamarin.Forms.NavigationPage( mainPage );
            //Children.Add( App.Navigation );

            /*
             * if ( !App.Current.Properties.ContainsKey( "SecondRun" ) )
             * {
             *  App.Navigation.Navigation.PushModalAsync( new LaunchPage() );
             *  App.Current.Properties["SecondRun"] = true;
             * }
             */
        }
 public MainPage(string resource, string parameter = "")
 {
     InitializeComponent();
     Resource  = resource;
     Parameter = parameter;
     observableResource.PropertyChanged += ObservableResource_PropertyChanged;
     Task.Run(() => { Handle_Timeout(); });
     if (!string.IsNullOrWhiteSpace(parameter))
     {
         resource += "/" + parameter;
     }
     RockClient.GetResource <MobilePage>(observableResource, "/api/avalanche/" + resource);
     Content.Margin = new Thickness(
         AvalancheNavigation.SafeInset.Left,
         AvalancheNavigation.SafeInset.Top + AvalancheNavigation.YOffSet,
         AvalancheNavigation.SafeInset.Right,
         AvalancheNavigation.SafeInset.Bottom);
 }
Exemple #6
0
 public static void RequestNewRckipid()
 {
     rckipidResource = new ObservableResource <RckipidToken>();
     rckipidResource.PropertyChanged += RckipidResource_HandleResponse;
     RockClient.GetResource(rckipidResource, "/api/avalanche/token", true);
 }