public class CheckDesingModel
{
public static bool IsDesingMode()
{
bool ReturnFlag = false;
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
ReturnFlag = true;
else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
ReturnFlag = true;
//if (ReturnFlag)
// Msg.Warning("设计模式");
//else Msg.Warning("非设计模式!");
return ReturnFlag;
}
}