public MainPage() { this.InitializeComponent(); Kirin.Initialize(new W8KirinPlatform()); Kirin k = Kirin.GetInstance(); KirinAssistant ka = k.BindScreen(new Kazomfg(), "Kazomfg"); ka.onLoad(); }
// Constructor public MainPage() { this.InitializeComponent(); Kirin.Initialize(new WP8KirinPlatform()); Kirin k = Kirin.GetInstance(); KirinAssistant ka = k.BindScreen(new Zomg(), "Zomg"); ka.onLoad(); ZomgJS jsProxy = new ZomgJS(ka); jsProxy.Whateva(1337); }
// Constructor public MainPage() { Debug.WriteLine("here it is"); InitializeComponent(); Kirin.Initialize(new WP8KirinPlatform()); Kirin k = Kirin.GetInstance(); KirinAssistant ka = k.BindScreen(this, "TestModule"); ka.onLoad(); Generated.TestModule testModule = new Generated.TestModule(ka); testModule.testyMethod("a hoy hoy hoy", 1333337); // Sample code to localize the ApplicationBar //BuildLocalizedApplicationBar(); }
private void Net_Req(IAsyncResult res) { try { var req = res.AsyncState as HttpWebRequest; if (!isGet) { var bytes = new System.Text.UTF8Encoding().GetBytes(toPost); var stream = req.EndGetRequestStream(res); stream.Write(bytes, 0, bytes.Length); stream.Flush(); } req.BeginGetResponse(new AsyncCallback(Net_Resp), req); } catch (Exception e) { KirinAssistant.executeCallback(onError, "WebPost.Post_ReqStream() Just caught exception: " + e.GetType() + ", " + e.Message); } }
private void Net_Resp(IAsyncResult res) { try { var req = (HttpWebRequest)res.AsyncState; var resp = (HttpWebResponse)req.EndGetResponse(res); var streamReader = new StreamReader(resp.GetResponseStream()); string s = streamReader.ReadToEnd(); KirinAssistant.executeCallback(payload, Uri.EscapeDataString(s)); } catch (WebException e) { KirinAssistant.executeCallback(onError, "WebException: " + e.ToString()); } catch (Exception e) { KirinAssistant.executeCallback(onError, "Exception: " + e.ToString()); } }
public WP8GwtNetworkingRunner(KirinAssistant assistant) { _Service = new Generated.NetworkingService(assistant); }
public ZomgJS(KirinAssistant ka) { this.Assistant = ka; }