private void LoadSavedSelectionItem_Click(object sender, EventArgs e) { SavedScrTextList savedList = (sender as ToolStripMenuItem).Tag as SavedScrTextList; rightItems = new List <ScrText>(); foreach (string scrTextName in savedList.ScrTextNames) { ScrText scrText = ScrTextCollection.Get(scrTextName); if (scrText != null) { rightItems.Add(scrText); } } UpdateRightList(); UpdateSavedSelectionLinks(); }
private void uiSaveSelections_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { string name = InputBoxForm.Show(this, Properties.Resources.kstidTlEnterNameSavedSel, Properties.Resources.kstidSaveSelections, ""); if (name != null) { SavedScrTextList savedList = new SavedScrTextList(); savedList.Name = name; foreach (ScrText scrText in rightItems) { savedList.ScrTextNames.Add(scrText.Name); } if (Settings.Default.SavedScrTextLists == null) { Settings.Default.SavedScrTextLists = new SavedScrTextLists(); } Settings.Default.SavedScrTextLists.Add(savedList); Settings.Default.Save(); UpdateSavedSelectionLinks(); } }