Exemplo n.º 1
0
        public static void CleanKBAsMuchAsPossible()
        {
            IKBService     kbserv  = UIServices.KB;
            IOutputService output  = CommonServices.Output;
            string         mensaje = "Do you have a backup?. Are you sure you want to clean the KB? Some objects will be modified and deleted.";
            DialogResult   dr      = MessageBox.Show(mensaje, "Clean KB", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                ObjectsHelper.CleanVarsNotUsed();
                CleanKBHelper.RemoveAttributeWithoutTable();
                ObjectsHelper.Unreachables();

                KBCategory UnreachableCategory = KBCategory.Get(kbserv.CurrentModel, "KBDoctor.UnReachable");
                foreach (KBObject obj in UnreachableCategory.AllMembers)
                {
                    KBDoctorCore.Sources.API.CleanKBObject(obj, output);
                }

                ProcessObjectsInCategory(output, UnreachableCategory);
                output.AddLine("Finish");
            }
        }
Exemplo n.º 2
0
 public bool ExecListClassUsed(CommandData cmdData)
 {
     CleanKBHelper.ClassUsed();
     return(true);
 }
Exemplo n.º 3
0
 public bool ExecClassNotInTheme(CommandData cmdData)
 {
     CleanKBHelper.ClassNotInTheme();
     return(true);
 }
Exemplo n.º 4
0
 public bool ExecSearchAndReplace(CommandData cmdData)
 {
     CleanKBHelper.SearchAndReplace();
     return(true);
 }
Exemplo n.º 5
0
 public bool ExecProcedureSDT(CommandData cmdData)
 {
     CleanKBHelper.CreateProcedureSDT();
     return(true);
 }
Exemplo n.º 6
0
 public bool ExecListTableAttributesUsingDomain(CommandData cmdData)
 {
     CleanKBHelper.ListTableAttributesUsingDomain();
     return(true);
 }
Exemplo n.º 7
0
 public bool ExecAddINParmRule(CommandData cmdData)
 {
     CleanKBHelper.AddINParmRule();
     return(true);
 }
Exemplo n.º 8
0
 public bool ExecCleanKB(CommandData cmdData)
 {
     CleanKBHelper.CleanKBAsMuchAsPossible();
     return(true);
 }
Exemplo n.º 9
0
 public bool ExecObjectsReferenced(CommandData cmdData)
 {
     CleanKBHelper.ObjectsReferenced();
     return(true);
 }