コード例 #1
0
        static EventNameDrawer()
        {
            var dic = new Dictionary <string, string>();

            dic[""] = "None";
            foreach (var type in GetEventKeyTypes())
            {
                string baseName = type.FullName;
                foreach (var val in Enum.GetValues(type))
                {
                    var key = EventKeyToStrConv.ToStr(val);
                    dic[key] = baseName + "/" + val;
                }
            }
            s_Keys   = dic.Keys.ToArray();
            s_Values = dic.Values.ToArray();
        }
コード例 #2
0
 public MessageHandleAttribute(object eventName)
 {
     EventName = EventKeyToStrConv.ToStr(eventName);
 }
コード例 #3
0
 public BindingCommand <U> Command <T, U>(T name, Action <U> onViewEvent, Func <bool> canExecute = null)
 {
     return(Command(EventKeyToStrConv.ToStr(name), onViewEvent, canExecute));
 }
コード例 #4
0
 public BindingCommand <U> Command <T, U>(T name, ICommand <U> cmd)
 {
     return(Command(EventKeyToStrConv.ToStr(name), cmd));
 }
コード例 #5
0
 public void Publish <T>(T name)
 {
     Get <BindingEvent>(EventKeyToStrConv.ToStr(name))?.Invoke();
 }
コード例 #6
0
 public void Unsubscribe <T>(object name, System.Action <T> onViewEvent)
 {
     Unsubscribe(EventKeyToStrConv.ToStr(name), onViewEvent);
 }
コード例 #7
0
 public void Unsubscribe <T, U>(T name, System.Action <U> onViewEvent)
 {
     Unsubscribe(EventKeyToStrConv.ToStr(name), onViewEvent);
 }
コード例 #8
0
 public void Subscribe(object name, System.Action onViewEvent)
 {
     Subscribe(EventKeyToStrConv.ToStr(name), onViewEvent);
 }
コード例 #9
0
 public void Publish <T, U>(T name, U args)
 {
     Get <BindingEvent <U> >(EventKeyToStrConv.ToStr(name))?.Invoke(args);
 }