示例#1
0
 public ExprBase Parse(string conditionsString)
 {
     try {
         Queue <string> stringQueue = GetStringsList(conditionsString);
         return(Parse(stringQueue));
     } catch (System.Exception ex) {
         LOG.Erro("Parse Conditions Error:" + conditionsString + ", Cause: " + ex);
         return(null);
     }
 }
示例#2
0
 public static void Add(long sn, CMapObject mo)
 {
     if (dict_.ContainsKey(sn))
     {
         CMapObject old = dict_[sn];
         old.Dispose();
         dict_.Remove(sn);
         LOG.Erro("MapObjectDict Contains same MapObject SN = " + sn);
     }
     dict_[sn] = mo;
 }
示例#3
0
 public EventCall Parse(string eventsString)
 {
     try
     {
         Queue <string> stringQueue = GetStringsList(eventsString);
         return(Parse(stringQueue));
     }
     catch (System.Exception ex)
     {
         LOG.Erro("Parse Events Error:" + eventsString + ", Cause: " + ex);
         return(null);
     }
 }
示例#4
0
    public static void OpenUI(string ui_type, object context = null)
    {
        Type uitype = Type.GetType(ui_type);

        if (uitype == null)
        {
            LOG.Erro("ui_type ERRO   " + ui_type);
            return;
        }
        if (Global.ui_mgr != null)
        {
            Global.ui_mgr.LoadUI(uitype, context);
        }
    }
示例#5
0
        //---------------------------------------------------------------------
        private void DoShow(string packageName, string name, WindowAsynHandler handler, object[] data)
        {
            m_RequestShows.Add(name);
            LoadWindow(packageName, name, delegate(UIWindow win, object data1) {
                if (null == win)
                {
                    LOG.Erro("*** [UIManager] DoShow(win=null, type={0})", name);
                    return;
                }
                if (handler != null)
                {
                    handler(win, data);
                }

                m_RequestShows.Remove(name);
                win.InternalShow(data);
            }, data);
        }
示例#6
0
        //---------------------------------------------------------------------
        private void ProcessAsyncInvokeList()
        {
            for (ms_AsyncInvokeList.Begin(); ms_AsyncInvokeList.Next();)
            {
                string   name = ms_AsyncInvokeList.Key;
                UIWindow win  = GetWindow(name);
                if (win == null)
                {
                    continue;
                }

                List <AsyncInvokeInfo> infoList = ms_AsyncInvokeList.Value;
                for (int index = 0; index < infoList.Count; ++index)
                {
                    AsyncInvokeInfo info       = infoList[index];
                    MemberInfo      memberInfo = info.memberInfo;
                    object[]        paramList  = info.paramList;

                    try {
                        if (memberInfo.MemberType == MemberTypes.Property)
                        {
                            PropertyInfo propertyInfo = memberInfo as PropertyInfo;
                            propertyInfo.SetValue(win, paramList[0], null);
                        }
                        else
                        {
                            MethodInfo methodInfo = memberInfo as MethodInfo;
                            methodInfo.Invoke(win, paramList);
                        }
                    } catch (System.Exception ex) {
                        LOG.Erro("Async invoke failed: " + ex.Message);
                    }
                }

                infoList.Clear();
            }
        }