Esempio n. 1
0
        protected override void OnClick()
        {
            base.OnClick();
            ReportTimeEventArgs args = new ReportTimeEventArgs(ReportTimeEvent, this);

            args.ClickTime = DateTime.Now;
            this.RaiseEvent(args);
        }
Esempio n. 2
0
        private void ReportTimeHandler(object sender, ReportTimeEventArgs e)
        {
            FrameworkElement element = sender as FrameworkElement;
            string           timeStr = e.ClickTime.ToLongTimeString();
            string           content = string.Format("{0} 到达 {1}", timeStr, element.Name);

            this.lst.Items.Add(content);
        }