private void SendQuarterEndedEventToScreens() { foreach (BizSimScreen s in BizSimScreen.GetAll()) { s.HandleQuarterEnded(); } }
public List <JSValue> ExecuteJavaScriptOnAllBrowserPlanes(string JsCmd) { List <JSValue> ret = new List <JSValue>(); foreach (BizSimScreen s in BizSimScreen.GetAll()) { ret.Add(s.bTex.ExecuteJavaScriptWithResult(JsCmd)); } return(ret); }
public void ReloadAll(bool reloadServerData = true) { Debug.Log("refreshing all biz sim screens"); if (reloadServerData && serverData != null) { serverData.RefreshWebView(); } foreach (BizSimScreen s in BizSimScreen.GetAll()) { s.Refresh(); } }
// if affectMouseRepresentation, then the enable flag will affect whether mouse representations are on or off aswell public void EnableInputOnAllBrowserPlanes(bool enable, bool affectMouseRepresentation = true) { foreach (BizSimScreen s in BizSimScreen.GetAll()) { if (s.bTex != null) { s.bTex.AllowInputChanges = enable; if (affectMouseRepresentation) { s.bTex.ShowMouseRepresentation = enable; } } } }
private void DisplaySim() { foreach (BizSimScreen screen in BizSimScreen.GetAll()) { if (!screen.Initialized) { screen.Initialize(); // setup load complete callbacks screen.bTex.AddLoadCompleteEventListener(OnBrowserLoadComplete); } else { screen.Refresh(); } } }
public void HandleAction(string action) { string[] tok = action.Split(new char[] { ',' }, 3); if (tok.Length < 3) { Debug.LogError("Number of expected tokens not found"); return; } int bssId = -1; int.TryParse(tok[0].Substring(tok[0].IndexOf("=") + 1), out bssId); string div = tok[1].Substring(tok[1].IndexOf("=") + 1); string url = tok[2].Substring(tok[2].IndexOf("=") + 1);; // This can become more efficient for (int i = 0; i < BizSimScreen.GetAll().Count; ++i) { if (BizSimScreen.GetAll()[i].bTex.id == bssId) { string error = null; if (BizSimScreen.GetAll()[i].bTex.isWebViewBusy()) { error = "The panel appears to be busy, please try again"; } if (BizSimScreen.GetAll()[i].bTex.URL != url) { error = "The url appears to have changed, please try again"; } if (error != null) { InfoMessageManager.Display(error); } else { BizSimScreen.GetAll()[i].bTex.ForceConfirmClickOnDiv(":submit"); } return; } } }
public List <BizSimScreen> GetAllScreens() { return(BizSimScreen.GetAll()); }