private void butRemove_Click(object sender, EventArgs e) { launchyDir d = (launchyDir)listDirs.SelectedItem; listDirs.Items.Remove(d); dirs.Remove(d); }
private void butAdd_Click(object sender, EventArgs e) { launchyDir d = new launchyDir(); d.types = new List<String>(); d.path = textPath.Text; string[] split = textExt.Text.Split(",".ToCharArray()); foreach (string s in split) { d.types.Add(s); } listDirs.Items.Add(d); dirs.Add(d); }
private void butAdd_Click(object sender, EventArgs e) { launchyDir d = new launchyDir(); d.types = new List <String>(); d.path = textPath.Text; string[] split = textExt.Text.Split(",".ToCharArray()); foreach (string s in split) { d.types.Add(s); } listDirs.Items.Add(d); dirs.Add(d); }
private void parseOptions() { // Does the file exist? RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\Launchy\\WindowPos"); if (key == null) { key = Registry.CurrentUser.CreateSubKey("Software\\Launchy\\WindowPos"); posX = 0; posY = 0; } else { posX = (int)key.GetValue("X"); posY = (int)key.GetValue("Y"); } key.Close(); // Grab the list of user added directories key = Registry.CurrentUser.OpenSubKey("Software\\Launchy\\Dirs"); if (key == null) { key = Registry.CurrentUser.CreateSubKey("Software\\Launchy\\Dirs"); } int j = 0; foreach (string dEntry in key.GetValueNames()) { launchyDir d = new launchyDir(); d.types = new List <String>(); d.entryNum = j; string entry = (string)key.GetValue(dEntry); string[] split = entry.Split("%".ToCharArray()); d.path = dEntry; for (int i = 0; i < split.Length; i++) { d.types.Add(split[i]); } dirs.Add(d); listDirs.Items.Add(d); j++; } key.Close(); }
private void parseOptions() { // Does the file exist? RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\Launchy\\WindowPos"); if (key == null) { key = Registry.CurrentUser.CreateSubKey("Software\\Launchy\\WindowPos"); posX = 0; posY = 0; } else {posX = (int) key.GetValue("X"); posY = (int) key.GetValue("Y");} key.Close(); // Grab the list of user added directories key = Registry.CurrentUser.OpenSubKey("Software\\Launchy\\Dirs"); if (key == null) { key = Registry.CurrentUser.CreateSubKey("Software\\Launchy\\Dirs"); } int j = 0; foreach (string dEntry in key.GetValueNames()) { launchyDir d = new launchyDir(); d.types = new List<String>(); d.entryNum = j; string entry = (string)key.GetValue(dEntry); string[] split = entry.Split("%".ToCharArray()); d.path = dEntry; for (int i = 0; i < split.Length; i++) { d.types.Add(split[i]); } dirs.Add(d); listDirs.Items.Add(d); j++; } key.Close(); }