Пример #1
0
 public static void RegisterCallBack(string key, CustomHandler.HandleCustom handle)
 {
     if (CustomHandler.a.ContainsKey(key))
     {
         CustomHandler.a[key] = handle;
     }
     else
     {
         CustomHandler.a.Add(key, handle);
         CustomHandler.keys.Add(key);
     }
     u.d("Register " + key);
 }
Пример #2
0
 public static bool Call(string key, string arg, out string result)
 {
     result = "";
     if (CustomHandler.a.ContainsKey(key))
     {
         CustomHandler.HandleCustom handleCustom = CustomHandler.a[key];
         try
         {
             result = handleCustom(arg);
         }
         catch (Exception ex)
         {
             u.a(ex.Message + "\n" + ex.StackTrace);
         }
         return(true);
     }
     u.a("UnRegitster Function ==>" + key);
     return(false);
 }