示例#1
0
    private void uxMenuEnableHostsFile_Click(object sender, EventArgs e)
    {
        if (!Elevated.IsElevated())
        {
            return;
        }

        if (uxMenuEnableHostsFile.Checked)
        {
            HostsFile.EnableHostsFile();
        }
        else
        {
            HostsFile.DisableHostsFile();
        }

        if (Visible)
        {
            UxRefresh();
        }
    }
示例#2
0
    private void uxbtnDisableHostsFile_Click(object sender, EventArgs e)
    {
        HostsFile.DisableHostsFile();

        UxRefresh();
    }