![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
代码片段
文章平均质量分 69
1987andy
IT男动漫男专注面向对象和面向服务的软件开发技术 用过语言C/C/C/python
展开
-
WPF - DispatcherHelper
类似System.Windows.Forms.Application.DoEvents 处理当前在消息队列中的所有消息//Author: Andy//created 2013.08.04private static readonly DispatcherOperationCallback _exit_frame_callback = ( state )=>{ var frame = state a原创 2013-08-05 09:40:45 · 2427 阅读 · 0 评论 -
WPF实现单例运行 - 唯一实例运行
使用互斥量保持wpf程序唯一实例运行 public void CheckSingleInstanceAndStartMainApp(){ bool singleInstance = false; System.Threading.Mutex singleInstanceMutex = new System.Threading.Mutex(tru原创 2013-08-05 10:44:05 · 5606 阅读 · 1 评论 -
WPF 跨线程操作辅助方法/类
WPF 跨线程操作~ public static void IfInvoke2DoSomething(System.Windows.Controls.Control targetControl, System.Action excAction) { if (!targetControl.Dispatcher.CheckAccess()) {原创 2013-08-05 09:56:57 · 962 阅读 · 0 评论 -
NET单例模式几种写法
S1. private static SingleInstance _instance = null; public static SingleInstance Instance1 { get { return _instance ?? (_instance = new SingleInstance()); } } S2原创 2013-08-05 10:57:51 · 896 阅读 · 0 评论