protected override emBusiCallbackResult_t InnerOnUIEvtHandle(IUIService iUI, UIEventArg argUIEvent) { Debug.Assert(null != iUI && null != argUIEvent); emBusiCallbackResult_t result = base.InnerOnUIEvtHandle(iUI, argUIEvent); if (emBusiCallbackResult_t.Swallowd == result) { return(result); } try { if (argUIEvent.EventName == UIEventNames.s_ClickEvent) { if (null != argUIEvent.Key) { Log.Action.LogInfoFormat("UI event: the key {0}({1}) pressed", argUIEvent.ElementName, argUIEvent.Key); } return(emBusiCallbackResult_t.Swallowd); } } catch (System.Exception ex) { Log.Action.LogError(ex.Message, ex); } return(emBusiCallbackResult_t.Bypass); }
public static object GetArg(UIEventArg key) { ValueArg tempArg; if (g_argDict.TryGetValue(key, out tempArg)) { return(tempArg.GetValue()); } else { return("null"); } }
private bool ObjImp_UIEvent(IUIService argiService, UIEventArg argArg) { // Log.Action.LogInfoFormat("UI event: the key {0}({1}) pressed", argUIEvent.ElementName, argUIEvent.Key); string key = argArg.Key == null ? string.Empty : argArg.Key.ToString(); string message = $"ui event: element name: {argArg.ElementName}, key: {key}"; UpdateLog(message); if (currentActivity != null) { currentActivity.OnUIEvtHandle(argiService, argArg); } return(true); }
public static void SetArg(UIEventArg key, double value) { ValueArg temp = new ValueArg(); temp.SetValue(value); if (g_argDict.ContainsKey(key)) { g_argDict[key] = temp; } else { g_argDict.Add(key, temp); } }
private void onClick(UIEventArg arg) { if (arg.Component == load) { GameManager.GetInstance().ChangeScreen(ScreenState.GAME); if (File.Exists("Save/Load.sav")) { GameScreen g = (GameScreen)(GameManager.GetInstance().Screen); g.LoadGame(); } } else if (arg.Component == start) { GameManager.GetInstance().ChangeScreen(ScreenState.GAME); } else if (arg.Component == minigame) { GameManager.GetInstance().ChangeScreen(ScreenState.MINIGAME); } }
protected virtual emBusiCallbackResult_t InnerOnUIEvtHandle(IUIService iUI, UIEventArg objArg) { return(emBusiCallbackResult_t.Bypass); }
public emBusiCallbackResult_t OnUIEvtHandle(IUIService iSender, UIEventArg objArg) { return(InnerOnUIEvtHandle(iSender, objArg)); }