private void AddNewItem(object sender, EventArgs e)
 {
     try
     {
         UserInputToDB.Insert(DataListFromControlList.CreateList(textBoxPanel),
                              Globals.Classes[treeView.SelectedItem.ToString()]);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void Add(object sender, RoutedEventArgs e)
 {
     try
     {
         var    list     = DataListFromControlList.CreateList(textBoxPanel);
         object selected = treeView.SelectedItem.ToString();
         list.Add(selected);
         UserInputToDB.Insert(list, currentTreeView);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }