private void notifyIconContextMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { ToolStripItem item = e.ClickedItem; if (item == menuItemOpen) { Visible = true; WindowState = FormWindowState.Normal; } else if (item == menuItemToggleActivate) { if (menuItemToggleActivate.CheckState == CheckState.Unchecked) { Sherpa.StartServer(); } else { Sherpa.StopServer(); } } else if (item == menuItemShutdown) { Application.Exit(); } }
private void notifyIconContextMenu_PathClicked(object sender, EventArgs e) { ToolStripItem item = (ToolStripItem)sender; comboRoot.Text = item.Text; Sherpa.UpdateRootDir(item.Text); }
private void comboRoot_TextUpdate(object sender, EventArgs e) { if (Directory.Exists(comboRoot.Text)) { MaybeAddPathToDropDown(comboRoot.Text); Sherpa.UpdateRootDir(comboRoot.Text); } }
private void ServerOptionsForm_Load(object sender, EventArgs e) { comboRoot.Text = Properties.Settings.Default.rootDir; editPort.Value = Properties.Settings.Default.port; for (int i = 0; i < Properties.Settings.Default.previousRootDirs.Count; i++) { MaybeAddPathToDropDown(Properties.Settings.Default.previousRootDirs[i].ToString()); } Sherpa.StartServer(); }
private void buttonBrowseRoot_Click(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); fbd.SelectedPath = comboRoot.Text; if (fbd.ShowDialog() == DialogResult.OK) { comboRoot.Text = fbd.SelectedPath; MaybeAddPathToDropDown(comboRoot.Text); Sherpa.UpdateRootDir(fbd.SelectedPath); } }
private void ServerOptionsForm_FormClosed(object sender, FormClosedEventArgs e) { Sherpa.StopServer(); var it = comboRoot.Items.GetEnumerator(); while (it.MoveNext()) { if (!Properties.Settings.Default.previousRootDirs.Contains(it.Current.ToString())) { Properties.Settings.Default.previousRootDirs.Add(it.Current.ToString()); } } Properties.Settings.Default.Save(); }
private void editPort_ValueChanged(object sender, EventArgs e) { Sherpa.UpdatePort((int)editPort.Value); }
private void buttonPaused_Click(object sender, EventArgs e) { buttonActive.Enabled = false; Sherpa.StartServer(); }
private void comboRoot_SelectionChangeCommitted(object sender, EventArgs e) { Sherpa.UpdateRootDir(comboRoot.SelectedItem.ToString()); }