private void InitWebview(string pageName, object parameter)
        {
            wWebview.Accessors = new TheS.DevXP.XamForms.XWebViewAccessorCollection(
                LocalContentAccessor.GetAppData(WebviewService.MCLocalStorageFolderName));

            var htmlSource = WebviewService.GetHtmlPathByName(pageName);

            wWebview.Source = $"{htmlSource}{WebviewService.ConvertObjectToUrlParameters(parameter)}";
        }
Exemple #2
0
        public override async void SetRootPage(string param)
        {
            var paramObject = JsonConvert.DeserializeObject <NavigateToPageParameter>(param);

            Device.BeginInvokeOnMainThread(() =>
            {
                var htmlSource  = WebviewService.GetHtmlPathByName(paramObject.PageName);
                mWebview.Source = $"{htmlSource}{WebviewService.ConvertObjectToUrlParameters(paramObject.Params)}";;
            });
        }
Exemple #3
0
        public override void InitWebview(string startPage, object parameters)
        {
            SidemenuService.UpdateSidemenuPage(SideMenuPageTitle.HomePage, startPage);

            mWebview.Accessors = new TheS.DevXP.XamForms.XWebViewAccessorCollection(
                LocalContentAccessor.GetAppData(WebviewService.MCLocalStorageFolderName));
            var htmlSource = WebviewService.GetHtmlPathByName(startPage);

            mWebview.NavigateOrRequesting += (s, e) =>
            {
                MessagingCenter.Send(this, MessagingChannel.HomeReady, string.Empty);
            };

            mWebview.Source = $"{htmlSource}{WebviewService.ConvertObjectToUrlParameters(parameters)}";
        }
Exemple #4
0
        public void SideMenuChangePage(string page, object parameters)
        {
            var htmlSource = WebviewService.GetHtmlPathByName(page);

            mWebview.Source = $"{htmlSource}{WebviewService.ConvertObjectToUrlParameters(parameters)}";
        }