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


C# CustomEventArgs类代码示例

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


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

示例1: CaseLockedPage_AskForLockManualMA

 private void CaseLockedPage_AskForLockManualMA(object sender, CustomEventArgs.AccessionOrderReturnEventArgs e)
 {
     UI.AppMessaging.MessagingPath.Instance.StartSendRequest(e.AccessionOrder, this.m_CuttingWorkspaceWindow.PageNavigator);
     //AppMessaging.MessagingPath.Instance.LockWasReleased += MessageQueuePath_LockWasReleasedManualMA;
     //AppMessaging.MessagingPath.Instance.HoldYourHorses += Instance_HoldYourHorses;
     UI.AppMessaging.MessagingPath.Instance.Nevermind += MessageQueuePath_Nevermind;
 }
开发者ID:ericramses,项目名称:YPILIS,代码行数:7,代码来源:CuttingStationPath.cs

示例2: PageManager1_CustomEvent

 protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
 {
     if (e.EventArgument == "SAVE")
     {
         SaveAndClose();
     }
 }
开发者ID:proson,项目名称:Fine-UI,代码行数:7,代码来源:window2_iframe.aspx.cs

示例3: Player_PlaybackBitrateChanged

 private void Player_PlaybackBitrateChanged(object sender, CustomEventArgs<long> e)
 {
     if (e.Value > 0)
     {
         LastBitrate = e.Value;
     }
 }
开发者ID:Ginichen,项目名称:Silverlight-Player-for-PlayReady-with-Token-Auth,代码行数:7,代码来源:SMFPlayerStartupBitrate.cs

示例4: poll_Tick

        private void poll_Tick(object o)
        {
            lock (pollLock)
            {
                HashSet<Action<DirectInputData>> action;
                BufferedDataCollection queue = null;

                try
                {
                    _device.Poll();
                    queue = _device.GetBufferedData();
                }
                catch
                {
                    Debug.Print("DirectInputKeyboard::poll_tick exception");
                    _pollTimer.Change(Timeout.Infinite, Timeout.Infinite);
                    if (OnError != null)
                        OnError(this, EventArgs.Empty);

                    return;
                }

                if (queue != null)
                {
                    foreach (BufferedData data in queue)
                    {
                        Key dataType = (Key)data.Offset;
                        KeyState state = (KeyState)data.Data;

                        DirectInputData keyData = new DirectInputData()
                        {
                            Value = data.Data,
                            KeyboardKey = dataType,
                            Type = DIDataType.Keyboard,
                            DeviceName = Name

                        };
                        CustomEventArgs<DirectInputData> eventArg = new CustomEventArgs<DirectInputData>(keyData);

                        _actionMap.TryGetValue(dataType, out action);

                        if (action != null)
                            action.ToList().ForEach(a => a(keyData));

                        if (state == KeyState.Down && OnKeyDown != null)
                            OnKeyDown(this, eventArg);

                        if (state == KeyState.Up)
                        {
                            if (OnKeyUp != null)
                                OnKeyUp(this, eventArg);
                            if (OnKeyPress != null)
                                OnKeyPress(this, eventArg);
                        }

                    }
                }
            }
              
        }
开发者ID:xedoc,项目名称:JoystickCurves,代码行数:60,代码来源:DirectInputKeyboard.cs

示例5: OnRaiseCustomEvent

        private void OnRaiseCustomEvent(CustomEventArgs args)
        {
            EventHandler<CustomEventArgs> handler = RaiseCustomEvent;
            if (handler != null)
            {
                handler(this, args);

            }
        }
开发者ID:ctacosta,项目名称:COMP212A1b,代码行数:9,代码来源:Publisher.cs

示例6: Pulse

 public override void Pulse()
 {
     if (DateTime.Now > nextUIupdate)
     {
         nextUIupdate = DateTime.Now.AddMilliseconds(updateinterval);
         CustomEventArgs args = new CustomEventArgs();
         if (UpdateUI != null)
             UpdateUI(args);
     }
 }
开发者ID:dartemage,项目名称:hotspot-recorder,代码行数:10,代码来源:HotspotRecorderPlugin.cs

示例7: RaiseEvent

        public void RaiseEvent()
        {
            // Write some code that does something useful here
            // then raise the event. You can also raise an event
            // before you execute a block of code.

            CustomEventArgs args = new CustomEventArgs();
            args.TimeReached = DateTime.Now;
            OnRaiseCustomEvent(args);
        }
开发者ID:ctacosta,项目名称:COMP212A1b,代码行数:10,代码来源:Publisher.cs

示例8: CheckRequestTimeoutMessageInError

 public void CheckRequestTimeoutMessageInError()
 {
     CustomEventArgs<string> cea = new CustomEventArgs<string> ();
     cea.CurrRequestType = CurrentRequestType.Subscribe;
     cea.IsError = true;
     cea.IsTimeout = false;
     cea.Message = "The request timed out.";
     cea.PubnubRequestState = null;
     Assert.IsTrue(Utility.CheckRequestTimeoutMessageInError<string> (cea));
 }
开发者ID:eval01-tts,项目名称:unity,代码行数:10,代码来源:UtilityUnitTests.cs

示例9: ShouldFireEventHandlerViaFireWithOneArgumentWithCorrentData

        public void ShouldFireEventHandlerViaFireWithOneArgumentWithCorrentData()
        {
            var eventArgs = new CustomEventArgs();
            _customEventHandler.Fire(eventArgs);

            Thread.Sleep(50);

            Assert.NotNull(_customEventHandlerData);
            Assert.Null(_customEventHandlerData.Sender);
            Assert.AreEqual(eventArgs, _customEventHandlerData.EventArgs);
        }
开发者ID:Eskat0n,项目名称:NArms,代码行数:11,代码来源:EventHandlerExtensionsTests.cs

示例10: PageManager1_CustomEvent

 protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
 {
     if (e.EventArgument == "Confirm_OK")
     {
         Alert.Show("执行了确定操作!");
     }
     else if (e.EventArgument == "Confirm_Cancel")
     {
         Alert.Show("执行了取消操作!");
     }
 }
开发者ID:proson,项目名称:Fine-UI,代码行数:11,代码来源:confirm_cancel2.aspx.cs

示例11: OpenNewChatFormOnMsgReceived

 /// <summary>
 /// 새로운 대화메시지 수신시 대화창 생성
 /// </summary>
 /// <param name="ar">d|formkey|id/id/...|name|메시지내용</param>
 private void OpenNewChatFormOnMsgReceived(object sender, CustomEventArgs e)    //ar = d|formkey|id/id/...|name|메시지내용
 {
     try
     {
         ChatObj chatObj = (ChatObj)e.GetItem;
         ChatForm chatForm = new ChatForm(connection, miscCtrl, chatObj);
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }
开发者ID:WeDoCrm,项目名称:WeDoMessenger2.0,代码行数:16,代码来源:ClientFormChat.cs

示例12: OnRaiseCustomEvent

    protected virtual void OnRaiseCustomEvent(CustomEventArgs e)
    {
        // Make a temporary copy of the event
        EventHandler<CustomEventArgs> handler = RaiseCustomEvent;

        // Event will be null if there are no subscribers
        if (handler != null)
        {
            // Use the () operator to raise the event.
            handler(this, e);
        }
    }
开发者ID:smihaylovit,项目名称:TelerikHW,代码行数:12,代码来源:CustomEvent.cs

示例13: DataContractEventArgsSerializerTest

        public DataContractEventArgsSerializerTest()
        {
            this.eventArgsToSerialize = new CustomEventArgs(true);

            using (MemoryStream ms = new MemoryStream())
            {
                var serializer = new DataContractSerializer(typeof(CustomEventArgs));
                serializer.WriteObject(ms, this.eventArgsToSerialize);
                this.inputAndOutput = Convert.ToBase64String(ms.ToArray());
            }

            this.testee = new DataContractEventArgsSerializer();
        }
开发者ID:hmuralt,项目名称:appccelerate,代码行数:13,代码来源:DataContractEventArgsSerializerTest.cs

示例14: OnRaiseEvent

 protected virtual void OnRaiseEvent(CustomEventArgs e)
 {
     EventHandler<CustomEventArgs> handler = RaiseCustomEvent;
     if (handler != null)
     {
         e.Message += String.Format("{0:hh:mm:ss}", DateTime.Now);
         handler(this, e);
     }
     else
     {
         Console.WriteLine("There are no listeners.");
     }
 }
开发者ID:Nikolai-Aleksiev,项目名称:Telerik-Academy-HomeWorks,代码行数:13,代码来源:Publisher.cs

示例15: BinaryEventArgsSerializerTest

        public BinaryEventArgsSerializerTest()
        {
            this.eventArgsToSerialize = new CustomEventArgs(true);

            using (MemoryStream ms = new MemoryStream())
            {
                var formatter = new BinaryFormatter();
                formatter.Serialize(ms, this.eventArgsToSerialize);
                this.inputAndOutput = Convert.ToBase64String(ms.ToArray());
            }

            this.testee = new BinaryEventArgsSerializer();
        }
开发者ID:hmuralt,项目名称:appccelerate,代码行数:13,代码来源:BinaryEventArgsSerializerTest.cs


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