private void CategoryCB_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox cb = (ComboBox)sender;

            if (Mode == EditorMode.DBO)
            {
                Category selectedCat = (Category)cb.SelectedItem;
                ModPanel.Enabled = true;
                PackageList      = new List <SelectablePackage>();
                ProcessConfigs(selectedCat.Packages);
                PackageCB.SelectedIndexChanged -= PackageCB_SelectedIndexChanged;
                PackageCB.DataSource            = PackageList;
                PackageCB.SelectedIndex         = -1;
                PackageCB.SelectedIndexChanged += PackageCB_SelectedIndexChanged;
            }
            else if (Mode == EditorMode.GlobalDependnecy)
            {
                SelectedGlobalDependency = (Dependency)cb.SelectedItem;
            }
            else if (Mode == EditorMode.Dependency)
            {
                SelectedDependency = (Dependency)cb.SelectedItem;
            }
            else if (Mode == EditorMode.LogicalDependency)
            {
                SelectedLogicalDependency = (LogicalDependency)cb.SelectedItem;
            }
        }
 private void DatabaseAdder_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (ignoreResult)
     {
         SelectedDatabaseObject    = null;
         SelectedDependency        = null;
         SelectedGlobalDependency  = null;
         SelectedLogicalDependency = null;
     }
 }