//opens the add/edit window and calls isEdit and checks if there is a slected item //created by will fritz 2/9/15 private void btnEditLists_Click(object sender, RoutedEventArgs e) { if (lvList.SelectedItems[0] == null) { lblError.Content = "You Must First Select An Item From the List, Before You Can Edit it"; } else { ObservableCollection oldLists = (ObservableCollection)lvList.SelectedItems[0]; if (ListsPopUp.Instance == null) { var popup = new ListsPopUp(); popup.Show(); popup.isEdit(oldLists.lists); } else { var popup = ListsPopUp.Instance; popup.BringIntoView(); popup.isEdit(oldLists.lists); popup.Show(); System.Media.SystemSounds.Asterisk.Play(); } } }
//opens the add/edit window and calls isAdd //created by will fritz 2/9/15 private void btnAddtoLists_Click(object sender, RoutedEventArgs e) { if (ListsPopUp.Instance == null) { var popup = new ListsPopUp(); popup.Show(); popup.isAdd(); } else { var popup = ListsPopUp.Instance; popup.BringIntoView(); popup.isAdd(); popup.Show(); System.Media.SystemSounds.Asterisk.Play(); } }