Esempio n. 1
0
        public MainPage()
        {
            this.InitializeComponent();
            Kirin.Initialize(new W8KirinPlatform());
            Kirin          k  = Kirin.GetInstance();
            KirinAssistant ka = k.BindScreen(new Kazomfg(), "Kazomfg");

            ka.onLoad();
        }
Esempio n. 2
0
        // 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);
        }
Esempio n. 3
0
        // 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();
        }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
        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());
            }
        }
Esempio n. 6
0
 public WP8GwtNetworkingRunner(KirinAssistant assistant)
 {
     _Service = new Generated.NetworkingService(assistant);
 }
Esempio n. 7
0
 public ZomgJS(KirinAssistant ka)
 {
     this.Assistant = ka;
 }