示例#1
0
 private void mnuDebugPrivilege_Click(object sender, EventArgs e)
 {
     if (!_isAdministrator)
     {
         MessageBoxStub.Show("请以管理员模式启动" + Application.ProductName, MessageBoxIcon.Error);
         return;
     }
     if (FastWin32Settings.EnableDebugPrivilege())
     {
         mnuDebugPrivilege.Checked = true;
         mnuDebugPrivilege.Enabled = false;
         Text = Text.Substring(0, Text.Length - 1) + ", SeDebugPrivilege)";
         MessageBoxStub.Show("成功", MessageBoxIcon.Information);
     }
     else
     {
         MessageBoxStub.Show("失败,请关闭杀软后重试", MessageBoxIcon.Error);
     }
 }
示例#2
0
 private void mnuDebugPrivilege_Click(object sender, EventArgs e)
 {
     if (!_isAdministrator)
     {
         MessageBoxStub.Show(_resources.GetString("StrRunAsAdmin") + Application.ProductName, MessageBoxIcon.Error);
         return;
     }
     if (FastWin32Settings.EnableDebugPrivilege())
     {
         mnuDebugPrivilege.Checked = true;
         mnuDebugPrivilege.Enabled = false;
         Text = Text.Substring(0, Text.Length - 1) + ", SeDebugPrivilege)";
         MessageBoxStub.Show(_resources.GetString("StrSuccess"), MessageBoxIcon.Information);
     }
     else
     {
         MessageBoxStub.Show(_resources.GetString("StrFailed"), MessageBoxIcon.Error);
     }
 }