private void btnSet_Click(object sender, EventArgs e) { if (SystemPathModifier.AddPath(a.Text)) { fSetList(); } }
private void btnUnset_Click(object sender, EventArgs e) { if (SystemPathModifier.fRemoveAllCwc(a.Text)) { fSetList(); } }
private void Install_Load(object sender, EventArgs e) { a.Text = PathHelper.GetExeDirectory(); SystemPathModifier.fReadPath(); fSetList(); }
public void fSetList() { cbPaths.Items.Clear(); nIsSet = SystemPathModifier.fIsSet(a.Text); if (nIsSet == 0) { cbPaths.Items.Add("(Cwc Not Set)"); btnUnset.Enabled = false; btnSet.Enabled = true; btnOk.Text = "Keep Cwc not set"; lblTitle.Text = "Cwc is not in your environment, would you set it? (Recommended)"; } else { btnUnset.Enabled = true; btnSet.Enabled = false; btnOk.Text = "Ok"; lblTitle.Text = "Cwc is correctly configured in your environment"; } cbPaths.Items.AddRange(SystemPathModifier.GetCurrentSystemPaths()); cbPaths.SelectedIndex = nIsSet; }