private void RptTime2(object sender, ReportTimeEvtArgs e) { Console.WriteLine("路由内容2;" + (sender as FrameworkElement).Name + "点击时间;" + e.ClickTime.ToString()); }
private void Button_Click2(object sender, ReportTimeEvtArgs e) { Console.WriteLine("直接的事件关联,接收到的事件参数:" + (e as ReportTimeEvtArgs).ClickTime); Console.WriteLine("直接的事件关联,接收到的e.OriginalSource:" + (e.OriginalSource as ButtonTime).ToString()); }
private void RptTime(object sender, ReportTimeEvtArgs e) { Console.WriteLine("路由内容;" + (sender as FrameworkElement).Name + "点击时间;" + e.ClickTime.ToString()); Console.WriteLine("事件点击的源头;" + (e.OriginalSource as ButtonTime).Content); }