摘要:        
WPF本身并没有内置的单体模式支持(以后的版本会支持),而WindowsFormsApplicationBase类中有对单体模式的支持(全名是Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase),所以我们用WindowsFormsApplicationBase做一个wrapper就可以实现单体模式了。 实现单体...    
阅读全文
posted @ 2009-11-24 02:24
MainTao
阅读(1780)
推荐(1)
            
        
        
摘要:        
SessionEnding By default, an application shuts down when the Windows session ends, which occurs when a user logs off or shuts down.  You can detect when a session ends by handling the SessionEnding ev...    
阅读全文
posted @ 2009-11-24 02:18
MainTao
阅读(715)
推荐(0)
 
		
    
        
        
摘要:        
有三种shutdown modeMember nameDescriptionOnLastWindowCloseAn application shuts down when either the last window closes, or Shutdown is called.OnMainWindowCloseAn application shuts down when either the ma...    
阅读全文
posted @ 2009-11-23 12:59
MainTao
阅读(1222)
推荐(0)
 
		
    
        
        
摘要:        
以前我所不知道而且还很有用的: 按键 上下文环境 功能 F2 Windows exploer 重命名 F10 app 菜单 Alt+Enter windows exploer 查看属性 Alt+Enter IE 全屏,相当于F11 Ctrl+I IE Favorite Ctrl+H IE History Ctrl+J IE Feed Ctrl+T IE 新打开一个Tab Ctrl+N IE 打开一个新window,并把当前页面复制到那个window Ctrl+Q IE 打开/关闭平铺tab当打开的tab一多,就数不过来,不知道该用ctrl+哪个数字来导航了。平铺...    
阅读全文
posted @ 2009-11-19 01:49
MainTao
阅读(223)
推荐(0)
 
		
    
        
        
摘要:        
如果先关service再关client那么client的channel.Close()会报异常:“The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.”...    
阅读全文
posted @ 2009-11-09 20:18
MainTao
阅读(3077)
推荐(1)
 
		
    
        
        
摘要:        
The Service Bus allows a Windows Communication Foundation-based (WCF) application to listen at a public network address, even if the application is located behind a NAT or network firewall.Another cor...    
阅读全文
posted @ 2009-11-05 00:55
MainTao
阅读(1279)
推荐(1)
 
		
    
        
        
摘要:        
WPF Layout Philosophy(*) Elements (like controls) should not be explicitly sized. Instead, they grow to fit theircontent. For example, a button expands as you add more text. You can limit controls toa...    
阅读全文
posted @ 2009-11-04 19:39
MainTao
阅读(2124)
推荐(0)
 
		
    
        
        
摘要:        
(*) 窗口的摆放在一个窗口上点右键,有floating, dockable, tabbed document这三种摆放方式。floating: 浮在最上,任何地方。dockable: 浮在最上,任何地方,且可以锚定在一侧。有了dockable之后其实floating就成鸡肋了。tabbed document: 把窗口以tab的形式,和一般的源文件展示在一起。挺好用的一个功能。 (*) 读代码的好...    
阅读全文
posted @ 2009-10-28 13:38
MainTao
阅读(301)
推荐(0)
 
		
    
        
        
摘要:        
(*) 提问 VS的Help菜单,MSDN Forum,点开之后会打开msdn,只要用Windows Live ID登陆可以直接发帖提问了。 只要输入了标题,就会有出现已经有人问过的类似问题,非常友好: We've found questions similar to yours.  而且会有该问题所在的位置: Windows Azure Platform Developer Center >...    
阅读全文
posted @ 2009-10-27 20:44
MainTao
阅读(423)
推荐(0)
            
        
        
摘要:        
(*) Break point 我们用一个简单的实例来学习一下断点的高级功能。 for (int i = 0; i < 10; i++){ for (int j = 0; j < 10; j++) { ;//这里设置断点 }}  为了一次用到所有的高级功能,我们设一个目标:要在当i的值改变的时候,且这个断点的前两次我们不关心,只关心第三次以及以后的。而且我们不想在断点处暂停程序,而是把...    
阅读全文
posted @ 2009-10-27 13:42
MainTao
阅读(413)
推荐(0)