private void button4_Click(object sender, EventArgs e) { if (MessageBox.Show("确定要清除Steam的hosts吗?", "SteamHosts", MessageBoxButtons.YesNo) == DialogResult.Yes) { Hosts.removeHostsItem(Hostname); string result = Hosts.removeHostsItem("steamcommunity.com"); if (result.Equals("OK")) { MessageBox.Show("清除Steam hosts成功!", "SteamHosts"); } else { MessageBox.Show("清除Steam hosts失败!原因:" + result, "SteamHosts"); } getCurrentHosts(Hostname); } }