コード例 #1
0
        private void AddApplication()
        {
            AddApplicationForm addApplicationForm = new AddApplicationForm(_config.Groups, _config.Sets);

            if (addApplicationForm.ShowDialog(this) == DialogResult.OK && addApplicationForm.Application != null)
            {
                _config.Applications.Add(addApplicationForm.Application);
                RegistryHandler.SaveConfiguration(_config);
                AddApplicationToList(addApplicationForm.Application);
            }
        }
コード例 #2
0
 private void EditApplication()
 {
     if (listViewApplications.SelectedItems.Count == 1)
     {
         Application        application        = (Application)listViewApplications.SelectedItems[0].Tag;
         AddApplicationForm addApplicationForm = new AddApplicationForm(_config.Groups, _config.Sets, application);
         if (addApplicationForm.ShowDialog(this) == DialogResult.OK && addApplicationForm.Application != null)
         {
             RegistryHandler.SaveConfiguration(_config);
             AddApplicationToList(addApplicationForm.Application);
             UpdateSelectedApplicationInfo();
         }
     }
 }