コード例 #1
0
 private void EditButton_Click(object sender, EventArgs e)
 {
     using (var modEditor = new ModuleEntryEditor(tempModuleEntries[ModuleList.SelectedIndex]))
     {
         modEditor.ShowDialog();
         if (modEditor.EditedModule != null)
         {
             tempModuleEntries[ModuleList.SelectedIndex] = modEditor.EditedModule;
         }
     }
     RefreshUi();
 }
コード例 #2
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     using (var modEditor = new ModuleEntryEditor(EmptyModuleEntry))
     {
         modEditor.ShowDialog();
         if (modEditor.EditedModule != null)
         {
             tempModuleEntries.Add(modEditor.EditedModule);
             ModuleList.Items.Add(modEditor.EditedModule["name"]);
         }
     }
     RefreshUi();
 }