コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }