Ejemplo n.º 1
0
    public static void HandleMessage(SFSObject msgObj)
    {
        if (msgObj.ContainsKey("js"))
        {
            int id = msgObj.GetInt("id");
            for (int i = 0; i < screens.Count; ++i)
            {
                if (screens[i].bssId == id && !screens[i].bTex.isWebViewBusy())
                {
                    screens[i].ExecuteRemoteJavaScript(msgObj.GetUtfString("js"));
                    return;
                }
            }

            Debug.LogError("Didn't find page: " + msgObj.GetInt("id") + " or webView was busy, did not execute js");
        }
        if (msgObj.ContainsKey("pl"))
        {
            foreach (KeyValuePair <int, NewProductInvestmentsScreen> s in NewProductInvestmentsScreen.GetAll())
            {
                s.Value.Refresh();
            }
            ProductManagementScreen.HandleNewProductForAll();
        }
    }
Ejemplo n.º 2
0
 private void HandleLaunchProduct(JSValue[] args)
 {
     UpdateServerWithProductLaunch();
     ProductManagementScreen.HandleNewProductForAll();
 }