方法一:
if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv") //...Then Continue
方法二:
if(System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime) //... Then Continue
没有测试过,感觉可行。
方法一:
if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv") //...Then Continue
方法二:
if(System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime) //... Then Continue
没有测试过,感觉可行。