void Initialize() { //Console.WriteLine("Initialize"); _WoodCore = new WoodCore(this); this.SetWebChromeClient(new WoodWebChromeClient()); this.SetWebViewClient(new WoodWebViewClient()); this.Settings.JavaScriptEnabled = true; this.Settings.JavaScriptCanOpenWindowsAutomatically = false; }
public object ExecuteHasReturn(WoodCore core, ServiceArgs args) { var methodName = args.Method; var callback = args.CallbackName; if (_actions.ContainsKey(methodName)) { var method = _actions[methodName] as Func<WoodCore, ServiceArgs, object>; if (method == null) { throw new Exception("service " + args.Service + " has no method named " + args.Method + " with return value"); } return method(core, args); } throw new Exception("service " + args.Service + " has no method named " + args.Method + " with return value"); }
public void Execute(WoodCore core, ServiceArgs args) { var methodName = args.Method; var callback = args.CallbackName; if (_actions.ContainsKey(methodName)) { var method = _actions[methodName] as Action<WoodCore, ServiceArgs>; if (method == null) { throw new Exception("service " + args.Service + " has no method named " + args.Method); } method(core, args); } throw new Exception("service " + args.Service + " has no method named " + args.Method); }
public LocationManager(WoodCore core,ServiceArgs args){ this.core=core; this.args=args; Id=Guid.NewGuid(); mgr=new CLLocationManager(); if(UIDevice.CurrentDevice.CheckSystemVersion(8,0)){ mgr.RequestAlwaysAuthorization(); } if(CLLocationManager.LocationServicesEnabled){ mgr.DesiredAccuracy=1; //StartUpdatingLocation(); mgr.LocationsUpdated+=delegate(object sender,CLLocationsUpdatedEventArgs e) { LocationUpdated(this,new LocationUpdatedEventArgs(e.Locations[e.Locations.Length-1])); }; } }
void Initialize() { //Console.WriteLine("Initialize"); _WoodCore = new WoodCore(this); this.LoadStarted += delegate { AttachCoreScripts(); }; }