示例#1
0
        public virtual void Screenlet(WebScreenlet screenlet, string namespace_, string Message)
        {
            Console.WriteLine($"WebScreenlet onScriptMessage -> namespace: {namespace_}, message: {Message}");

            switch (namespace_)
            {
            case "call-me-back":
                Console.WriteLine("Call me back popover");
                CreatePopOverCallMeBack(Message);
                break;

            case "click-button":
                Console.WriteLine("Go to next forfet");
                GoNextForfet(Message);
                break;

            case "map":
                Console.WriteLine("Go to map");
                GoMap();
                break;

            default:
                Console.WriteLine("Invalid event");
                break;
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.WebScreenletView);

            webScreenlet = (WebScreenlet)FindViewById(Resource.Id.web_screenlet_screenlet);

            loadWebScreenlet();
        }
示例#3
0
        void LoadWebScreenlet()
        {
            WebScreenlet WebScreenlet =
                (WebScreenlet)FindViewById(Resource.Id.web_screenlet);

            var Url = LanguageHelper.Url(LanguageHelper.Pages.Index);

            WebScreenletConfiguration webScreenletConfiguration = new WebScreenletConfiguration
                                                                  .Builder(Url)
                                                                  .SetWebType(WebType.Other)
                                                                  .AddRawJs(Resource.Raw.menu_js, "menu_js.js")
                                                                  .AddRawCss(Resource.Raw.menu_css, "menu_css.css")
                                                                  .Load();

            WebScreenlet.SetWebScreenletConfiguration(webScreenletConfiguration);
            WebScreenlet.Listener = this;
            WebScreenlet.Load();
        }
 public virtual void Screenlet(WebScreenlet screenlet, string namespace_, string Message)
 {
     Console.WriteLine($"WebScreenlet onScriptMessage -> namespace: {namespace_}, message: {Message}");
 }
 public virtual void Screenlet(WebScreenlet screenlet, NSError error)
 {
     Console.WriteLine($"WebScreenlet URL display failed: {error.DebugDescription}");
 }
 public virtual void OnWebLoad(WebScreenlet screenlet, string url)
 {
     Console.WriteLine($"WebScreenlet URL display successfully: {url}");
 }
示例#7
0
 public virtual void OnWebLoad(WebScreenlet screenlet, string url)
 {
     Console.WriteLine($"WebScreenlet URL display successfully: {url}");
     AttachClickHeaderCallMeBack();
 }