本文整理汇总了C#中CustomEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CustomEventArgs类的具体用法?C# CustomEventArgs怎么用?C# CustomEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomEventArgs类属于命名空间,在下文中一共展示了CustomEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: CreateMemoFormOnMemoMsgReceived
private void CreateMemoFormOnMemoMsgReceived(object sender, CustomEventArgs e)
{
try
{
MemoObj memoObj = (MemoObj)e.GetItem;
MemoForm memoForm = new MemoForm(connection, memoObj);
memoForm.Show();
memoForm.Activate();
}
catch (Exception ex)
{
Logger.error(ex.ToString());
}
}
开发者ID:WeDoCrm,项目名称:WeDoMessenger2.0,代码行数:14,代码来源:ClientFormETC.cs
示例17: CancelTestWarningPage_CancelTest
private void CancelTestWarningPage_CancelTest(object sender, CustomEventArgs.CancelTestEventArgs e)
{
YellowstonePathology.Business.Gateway.AccessionOrderGateway.SetPanelSetOrderAsCancelledTest(e.PanelSetOrder.ReportNo);
YellowstonePathology.Business.Gateway.AccessionOrderGateway.InsertTestCancelledTestOrder(e.PanelSetOrder.ReportNo, e.PanelSetOrder.PanelSetId, e.PanelSetOrder.PanelSetName);
YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(e.AccessionOrder.MasterAccessionNo, this.m_Window);
YellowstonePathology.Business.Test.TestCancelled.TestCancelledTestOrder testCancelledTestOrder = (YellowstonePathology.Business.Test.TestCancelled.TestCancelledTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(e.PanelSetOrder.ReportNo);
testCancelledTestOrder.Distribute = false;
testCancelledTestOrder.NoCharge = true;
testCancelledTestOrder.Comment = e.ReasonForCancelation;
this.ShowTestCancelledResultPage(testCancelledTestOrder, accessionOrder);
}
开发者ID:WilliamCopland,项目名称:YPILIS,代码行数:14,代码来源:CancelATestPath.cs
示例18: OnRaiseCustomEvent
protected virtual void OnRaiseCustomEvent(int countLeft)
{
EventHandler handler = RaiseCustomEvent;
// Event will be null if there are no subscribers
if (handler != null)
{
// Format the string to send inside the CustomEventArgs parameter
CustomEventArgs e = new CustomEventArgs(countLeft);
// Use the () operator to raise the event.
handler(this, e);
}
}
开发者ID:smihaylovit,项目名称:Homework,代码行数:14,代码来源:Timer.cs
示例19: Player_PlayStateChanged
private void Player_PlayStateChanged(object sender, CustomEventArgs<MediaPluginState> e)
{
if (isStartupHeuristicsActive && e.Value == MediaPluginState.Playing)
{
isStartupHeuristicsActive = false;
if (ActiveAdaptiveMediaPlugin != null)
{
var videoStream = ActiveAdaptiveMediaPlugin.CurrentSegment.SelectedStreams.Where(i => i.Type == StreamType.Video).FirstOrDefault();
if (videoStream != null)
{
videoStream.SetSelectedTracks(videoStream.AvailableTracks);
}
}
}
}
开发者ID:Ginichen,项目名称:Silverlight-Player-for-PlayReady-with-Token-Auth,代码行数:15,代码来源:SMFPlayerStartupBitrate.cs
示例20: PopUpOnUnCheckedDataReceived
/// <summary>
/// 로그인 시 부재중 건수 정보 보이기
/// 메시지 형식
/// </summary>
/// <param name="arg"></param>
private void PopUpOnUnCheckedDataReceived(object sender, CustomEventArgs e)
{
int[] arg = (int[])e.GetItem;
if (arg[0] >= 0)
NRmemo.Text = Convert.ToString(arg[0]);
if (arg[1] >= 0)
NRfile.Text = Convert.ToString(arg[1]);
if (arg[2] >= 0)
{
NRnotice.Text = Convert.ToString(arg[2]);
if (arg[2] > 0)
connection.SendMsgReqUnReadNotice();
}
if (arg[3] >= 0)
NRtrans.Text = Convert.ToString(arg[3]);
}
开发者ID:WeDoCrm,项目名称:WeDoMessenger2.0,代码行数:22,代码来源:ClientFormETC.cs
注:本文中的CustomEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论