예제 #1
0
        //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();
                }
            }
        }
예제 #2
0
        //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();
            }
        }
예제 #3
0
 //sets instance to null when window is closed
 //created by will fritz 2/11/15
 private void Window_Closed(object sender, EventArgs e)
 {
     Instance = null;
 }
예제 #4
0
 //sets instance to this object
 //created by will fritz 2/11/15
 public ListsPopUp()
 {
     InitializeComponent();
     Instance = this;
 }
 //sets instance to this object
 //created by will fritz 2/11/15
 public ListsPopUp()
 {
     InitializeComponent();
     Instance = this;
 }
 //sets instance to null when window is closed
 //created by will fritz 2/11/15
 private void Window_Closed(object sender, EventArgs e)
 {
     Instance = null;
 }