注册DEV控件

public bool RegisterDevControls(Form frmMain)
{
string[] strArray = new string[] { "gacutil -u DevExpress.Data.v11.1", @"mkdir %windir%\assembly\GAC_MSIL\DevExpress.Data.v11.1\11.1.6.0__b88d1754d700e49a", @"copy DevExpress.Data.v11.1.dll %windir%\assembly\GAC_MSIL\DevExpress.Data.v11.1\11.1.6.0__b88d1754d700e49a", "gacutil -u DevExpress.Utils.v11.1", @"mkdir %windir%\assembly\GAC_MSIL\DevExpress.Utils.v11.1\11.1.6.0__b88d1754d700e49a", @"copy DevExpress.Utils.v11.1.dll %windir%\assembly\GAC_MSIL\DevExpress.Utils.v11.1\11.1.6.0__b88d1754d700e49a" };
foreach (string str in strArray)
{
string str2 = this.ExecuteDosCommand(str);
if (str2.IndexOf("ExecuteError") != -1)
{
MessageBox.Show(frmMain, str2.Replace("ExecuteError", ""), "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);
return false;
}
}
return true;
}

你可能感兴趣的:(控件)