1234567891011121314151617181920212223242526272829 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Threading;
- namespace FWindSoft.Wpf
- {
- /// <summary>
- /// 系统需求相关命令
- /// </summary>
- public static class WpfSysCmd
- {
- public static void DoEvent()
- {
- DispatcherFrame frame = new DispatcherFrame();
- Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
- new DispatcherOperationCallback(ExitFrame), frame);
- Dispatcher.PushFrame(frame);
- }
- private static object ExitFrame(object f)
- {
- ((DispatcherFrame)f).Continue = false;
- return null;
- }
- }
- }
|