当前位置: 首页>>代码示例>>C#>>正文


C# EventTypes类代码示例

本文整理汇总了C#中EventTypes的典型用法代码示例。如果您正苦于以下问题:C# EventTypes类的具体用法?C# EventTypes怎么用?C# EventTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EventTypes类属于命名空间,在下文中一共展示了EventTypes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MainEvent

        public MainEvent()
        {
            InitializeComponent();

            List<string> hours = new List<string>();
            for (int i = 0; i < 24; i++)
            {
                hours.Add(i.ToString("00"));
            }
            cbFromHour.ItemsSource = hours;
            cbFromHour.SelectedIndex = 0;

            cbUntilHour.ItemsSource = hours;
            cbUntilHour.SelectedIndex = 0;

            List<string> minutes = new List<string>();
            for (int i = 0; i < 12; i++)
            {
                minutes.Add((i * 5).ToString("00"));
            }
            cbFromMin.ItemsSource = minutes;
            cbFromMin.SelectedIndex = 0;

            cbUntilMin.ItemsSource = minutes;
            cbUntilMin.SelectedIndex = 0;

            dpFromDate.SelectedDate = DateTime.Now.Date;
            dpUntilDate.SelectedDate = DateTime.Now.AddHours(1).Date;

            mEventTypes = new EventTypes();
            cbEventTypes.ItemsSource = mEventTypes;
        }
开发者ID:WorldDeveloper,项目名称:DiCaBoo,代码行数:32,代码来源:EventWindow.xaml.cs

示例2: RaiseEventMessage

 public static void RaiseEventMessage(object sender, string Message, EventTypes type)
 {
     if (EventMessage != null)
     {
         EventMessage(sender, Message, type);
     }
 }
开发者ID:4g0st1n0,项目名称:MapManager,代码行数:7,代码来源:EventProvider.cs

示例3: IOWatcher

 public IOWatcher(IntPtr fd, EventTypes types, Loop loop, Action<IOWatcher, EventTypes> callback)
     : base(loop)
 {
     this.fd = fd;
     this.callback = callback;
     watcher_ptr = manos_io_watcher_create (fd.ToInt32 (), types, watcherCallback, GCHandle.ToIntPtr (gc_handle));
 }
开发者ID:vbatz258,项目名称:manos,代码行数:7,代码来源:IOWatcher.cs

示例4: Unsubscribe

 //unsubscribe this event from event matching eventType
 public void Unsubscribe(IObserver listener, EventTypes eventType)
 {
   if (listenerTable.Keys.Contains(eventType))
   {
     listenerTable[eventType].Remove(listener);
   }
 }
开发者ID:niceyeti,项目名称:MissileCommand,代码行数:8,代码来源:EventBus.cs

示例5: AttachEvent

 public int AttachEvent(VlcEventManagerInstance eventManagerInstance, EventTypes eventType, EventCallback callback)
 {
     if (eventManagerInstance == IntPtr.Zero)
         throw new ArgumentException("Event manager instance is not initialized.");
     if (callback == null)
         throw new ArgumentException("Callback for event is not initialized.");
     return GetInteropDelegate<AttachEvent>().Invoke(eventManagerInstance, eventType, callback, IntPtr.Zero);
 }
开发者ID:transformersprimeabcxyz,项目名称:Vlc.DotNet,代码行数:8,代码来源:VlcManager.AttachEvent.cs

示例6: Subscribe

 /*
   Subscribers/listeners register with the event system
 */
 public void Subscribe(IObserver listener, EventTypes eventType)
 {
   if (!listenerTable.Keys.Contains(eventType))
   {
     listenerTable[eventType] = new HashSet<IObserver>();
   }
   listenerTable[eventType].Add(listener);
 }
开发者ID:niceyeti,项目名称:MissileCommand,代码行数:11,代码来源:EventBus.cs

示例7: UniEvent

        public UniEvent(EventTypes type)
        {
            Type = type;
            Actions = new List<UniAction>();

            Options = new JSONObject();
            Options.AddField("type", Type.ToString());
        }
开发者ID:bL00RiSe,项目名称:UniMaker,代码行数:8,代码来源:UniEvent.cs

示例8: GetEventTypeName

        public string GetEventTypeName(EventTypes eventType)
        {
#if !NET20
            return GetInteropDelegate<GetEventTypeName>().Invoke(eventType).ToStringAnsi();
#else
            return IntPtrExtensions.ToStringAnsi(GetInteropDelegate<GetEventTypeName>().Invoke(eventType));
#endif
        }
开发者ID:transformersprimeabcxyz,项目名称:Vlc.DotNet,代码行数:8,代码来源:VlcManager.GetEventTypeName.cs

示例9: IOWatcher

        public IOWatcher(IntPtr fd, EventTypes types, LibEvLoop loop, IOWatcherCallback callback)
            : base(loop)
        {
            this.fd = fd;
            this.callback = callback;

            watcher_ptr = manos_io_watcher_create(fd.ToInt32(), types | EventTypes.EV__IOFDSET,
                watcherCallback, GCHandle.ToIntPtr(gc_handle));
        }
开发者ID:aaronfeng,项目名称:manos,代码行数:9,代码来源:IOWatcher.cs

示例10: StaticCallback

        private static void StaticCallback(IntPtr loop, IntPtr watcher, EventTypes revents)
        {
            UnmanagedPrepareWatcher iow = (UnmanagedPrepareWatcher) Marshal.PtrToStructure (watcher, typeof (UnmanagedPrepareWatcher));

            GCHandle gchandle = GCHandle.FromIntPtr (iow.data);
            PrepareWatcher w = (PrepareWatcher) gchandle.Target;

            w.callback (w.Loop, w, revents);
        }
开发者ID:JoergEg,项目名称:manos,代码行数:9,代码来源:PrepareWatcher.cs

示例11: StaticCallback

 private static void StaticCallback(IntPtr data, EventTypes revents)
 {
     try {
         var handle = GCHandle.FromIntPtr (data);
         var watcher = (IOWatcher) handle.Target;
         watcher.callback (watcher, revents);
     } catch (Exception e) {
         Console.Error.WriteLine ("Error handling IO readyness event: {0}", e.Message);
         Console.Error.WriteLine (e.StackTrace);
     }
 }
开发者ID:vbatz258,项目名称:manos,代码行数:11,代码来源:IOWatcher.cs

示例12: StaticCallback

 static void StaticCallback(IntPtr data, EventTypes revents)
 {
     Error.Log.Call<System.Exception>(() =>
     {
         var handle = GCHandle.FromIntPtr(data);
         var watcher = (IOWatcher)handle.Target;
         watcher.callback(watcher, revents);
     }, e =>
     {
         Console.Error.WriteLine("Error handling IO readyness event: {0}", e.Message);
         Console.Error.WriteLine(e.StackTrace);
     });
 }
开发者ID:imintsystems,项目名称:Waser,代码行数:13,代码来源:IOWatcher.cs

示例13: GetEventHandlerAttr

        // all event handler attribute accessors should eventually call these
        public static string GetEventHandlerAttr(mdr.DObject obj, EventTypes type, string name)
        {
#if ENABLE_RR
            if (RecordReplayManager.Instance != null && RecordReplayManager.Instance.RecordEnabled)
            {
                mwr.RecordReplayManager.Instance.Record("Element", null, "GetEventHandlerAttr", false, obj, type, name);
            }
#endif
            var targetElement = obj.FirstInPrototypeChainAs<HTMLElement>();
            var s = targetElement.PrimGetEventHandlerAttr(type);
            Debug.WriteLine("GetEventHandlerAttr({0}) = '{1}'", name, s);
            return s;
        }
开发者ID:reshadi2,项目名称:mcjs,代码行数:14,代码来源:Element.cs

示例14: EventIsActive

    public bool EventIsActive(Bands b, int c, EventTypes e)
    {
        if (e == EventTypes.BEAT)
        {
            return bandData[bandOffsets[c, (int) b]].Beat;
        }
        else if (e == EventTypes.VIBRATION)
        {
            return bandData[bandOffsets[c, (int) b]].Vibration;
        }

        return false;
    }
开发者ID:CarlosMeloStuff,项目名称:MusicWars,代码行数:13,代码来源:AudioWatcher.cs

示例15: FetchFromRedis

        /// <summary>
        /// Gets event list models by event type
        /// </summary>
        /// <param name="eventType">Event type to get by</param>
        /// <returns>An event list model</returns>
        private EventListModel FetchFromRedis(EventTypes eventType)
        {
            try
            {
                var redisClient = new RedisClient("localhost");
                var eventClient = redisClient.As<EventListModel>();

                return eventClient.GetById((int)eventType);
            }
            catch (Exception)
            {
                return new EventListModel();
            }
        }
开发者ID:hjorturls,项目名称:GEO.Itiniraries,代码行数:19,代码来源:RedisStorage.cs


注:本文中的EventTypes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。