예제 #1
0
        public static void ListAttWithoutDescription()
        {
            IKBService kbserv = UIServices.KB;

            string title      = "KBDoctor - Attributes with incomplete description";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);


            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Table", "Attribute", "Description", "Data type", "Title", "Column Title" });
            string description;
            string titlesuggested;
            string columnTitle;

            foreach (Artech.Genexus.Common.Objects.Attribute a in Artech.Genexus.Common.Objects.Attribute.GetAll(kbserv.CurrentModel))
            {
                description    = a.Description;
                titlesuggested = a.Title;
                columnTitle    = a.ColumnTitle;
                string Picture = Functions.ReturnPicture(a);

                if ((a.Description.Replace(" ", "") == a.Name) || (a.Title == a.Description) || (a.ColumnTitle == a.Description))
                {
                    string attNameLink = Functions.linkObject(a); // "<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;OpenObject&name=" + a.Guid.ToString() + "\">" + a.Name + "</a>";

                    if (a.Title == a.Description)
                    {
                        titlesuggested = "<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;AssignTitleToAttribute&attName=" + a.Name + "\">" + a.Title + "</a>";
                    }

                    if (a.Description.Replace(" ", "") == a.Name)
                    {
                        description = "<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;AssignDescriptionToAttribute&attName=" + a.Name + "\">" + a.Description + "</a>";
                        Table t = TablesHelper.TableOfAttribute(a);
                        writer.AddTableData(new string[] { Functions.linkObject(t), attNameLink, description, Picture, titlesuggested, columnTitle });
                    }

                    if (a.ColumnTitle == a.Description)
                    {
                        columnTitle = "<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;AssignColumnTitleToAttribute&attName=" + a.Name + "\">" + a.ColumnTitle + "</a>";
                    }

                    //                    writer.AddTableData(new string[] { attNameLink, description, Picture, titlesuggested, columnTitle });
                }
            }

            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #2
0
        private static void AddFileWithWarningsErrors(IOutputService output, KBDoctorXMLWriter writer, string containsTextArg, string file)
        {
            output.AddLine(file);
            string objName = Path.GetFileNameWithoutExtension(file);

            containsTextArg = containsTextArg.Replace("<", "");
            containsTextArg = containsTextArg.Replace(">", "");
            containsTextArg = containsTextArg.Replace("Icon", "");


            string[] ns = new[] { "Objects" };

            bool objExists = false;

            foreach (KBObject obj in UIServices.KB.CurrentModel.Objects.GetByPartialName(ns, objName))
            {
                objExists = true;
                if (obj.Name == objName)
                {
                    string spcTxt = ExtractSpcInfo(file, containsTextArg);
                    writer.AddTableData(new string[] { containsTextArg, obj.TypeDescriptor.Name, Functions.linkObject(obj), obj.Description, obj.UserName, spcTxt });
                }
            }
            if (!objExists)
            {
                writer.AddTableData(new string[] { containsTextArg, "", objName, "Don't exist", "", file });
            }
        }
예제 #3
0
        public static void ObjectsVariablesExternal(KBObject obj, KBDoctorXMLWriter writer, string mainss)
        {
            IKBService kbserv = UIServices.KB;

            string type      = "";
            string name      = "";
            string variables = "";


            if (KBDoctorCore.Sources.Utility.isGenerated(obj))
            {
                VariablesPart vp = obj.Parts.Get <VariablesPart>();
                if (vp != null)
                {
                    foreach (Variable v in vp.Variables)
                    {
                        type = v.Type.ToString();
                        name = v.Name;

                        if ((!v.IsStandard) && (v.AttributeBasedOn == null) && (type == "GX_USRDEFTYP")) //|| (type==) || (type == "GX_BUSCOMP_LEVEL") )
                        {
                            variables += name + " " + type + " ";
                            string txtDimensions = v.GetPropertyValue <string>(Properties.ATT.DataTypeString);
                            writer.AddTableData(new string[] { Functions.linkObject(obj), name, "Data Type." + txtDimensions, mainss });
                        }
                    }
                }
            }
        }
예제 #4
0
        public static void RemoveAttributeWithoutTable()
        {
            IKBService kbserv = UIServices.KB;

            string title      = "KBDoctor - Remove attributes without table";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            List <string[]> lineswriter;

            KBDoctorCore.Sources.API.RemoveAttributesWithoutTable(kbserv.CurrentModel, output, out lineswriter);
            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "", "Attribute", "Description", "Data type" });
            foreach (string[] line in lineswriter)
            {
                writer.AddTableData(line);
            }
            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #5
0
        public static void ListObjDiffMasterPage2()
        {
            IKBService kbserv = UIServices.KB;

            Dictionary <string, KBObjectCollection> dic = new Dictionary <string, KBObjectCollection>();

            string title      = "KBDoctor - Objects";
            string outputFile = Functions.CreateOutputFile(kbserv, title);


            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);

            output.AddLine("Listing objects...");
            writer.AddTableHeader(new string[] { "Tipo", "Object", "Description", "Last Update", "Timestamp" });
            foreach (KBObject obj in kbserv.CurrentModel.Objects.GetAll())
            {
                writer.AddTableData(new string[] { obj.TypeDescriptor.Name, obj.Name, obj.Description, obj.LastUpdate.ToString(), obj.Timestamp.ToString() });
            }
            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #6
0
        public static void GenerateGraph()
        {
            IKBService kbserv     = UIServices.KB;
            string     title      = "KBDoctor - Generate Graph ";
            string     outputFile = Functions.CreateOutputFile(kbserv, title);

            KBModel model       = kbserv.CurrentKB.DesignModel;
            int     ATTNAME_LEN = model.GetPropertyValue <int>("ATTNAME_LEN");
            int     TBLNAME_LEN = model.GetPropertyValue <int>("TBLNAME_LEN");
            int     OBJNAME_LEN = model.GetPropertyValue <int>("OBJNAME_LEN");


            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Check", "File" });

            string Check    = "";
            string Name     = "";
            string FileName = "";

            /*
             * Check = "KB Table Graph";
             * Name = Functions.CleanFileName(Check);
             * FileName = kbserv.CurrentKB.UserDirectory + @"\kbdoctor." + Name + ".gexf";
             * GenerateKBTableGraph(Name, FileName);
             * writer.AddTableData(new string[] { Check, Functions.linkFile(FileName) });
             *
             * Check = "KB Object Graph";
             * Name = Functions.CleanFileName(Check);
             * FileName = kbserv.CurrentKB.UserDirectory + @"\kbdoctor." + Name + ".gexf";
             * GenerateKBObjectGraph(Name, FileName);
             * writer.AddTableData(new string[] { Check, Functions.linkFile(FileName) });
             */
            Check    = "KB Object Edges txt";
            Name     = Functions.CleanFileName(Check);
            FileName = kbserv.CurrentKB.UserDirectory + @"\kbdoctor." + Name + ".txt";
            GenerateKBObjectEdgesTxt(Name, FileName);
            writer.AddTableData(new string[] { Check, Functions.linkFile(FileName) });

            /*
             * Check = "KB Module Graph";
             * Name = Functions.CleanFileName(Check);
             * FileName = kbserv.CurrentKB.UserDirectory + @"\kbdoctor." + Name + ".gexf";
             * GenerateKBModuleGraph(Name, FileName);
             * writer.AddTableData(new string[] { Check, Functions.linkFile(FileName) });
             */
            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #7
0
        internal static void ListObjectsWithTableInOtherModule()
        {
            IKBService kbserv = UIServices.KB;
            KBModel    model  = kbserv.CurrentModel.GetDesignModel();

            string         title  = "KBDoctor - List Objects with table in other module";
            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            string outputFile = Functions.CreateOutputFile(kbserv, title);

            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] {
                "Name", "Description", "Object Module", "Table ", "Table Module"
            });

            SelectObjectOptions selectObjectOption = new SelectObjectOptions();

            selectObjectOption.MultipleSelection = true;

            foreach (KBObject obj in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
            {
                string modulename = ModulesHelper.ObjectModuleName(obj);

                foreach (EntityReference reference in obj.GetReferences())

                {
                    KBObject objref = KBObject.Get(obj.Model, reference.To);

                    if (objref != null && objref is Table && !ObjectsHelper.isGeneratedbyPattern(obj))
                    {
                        Table  t = (Table)objref;
                        string tablemodulename = TablesHelper.TableModule(t.Model, t).Name;

                        if (tablemodulename != modulename)
                        {
                            string objNameLink = Functions.linkObject(obj);

                            output.AddLine("Processing... " + obj.Name + " reference table " + t.Name + " Object module:" + modulename + " Table module:" + tablemodulename);

                            writer.AddTableData(new string[] { objNameLink, obj.Description, modulename, t.Name, tablemodulename });
                        }
                    }
                }
            }


            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #8
0
        public static void ClassNotInTheme()
        {
            IKBService kbserv = UIServices.KB;

            string title      = "KBDoctor - Class not in Theme";
            string outputFile = Functions.CreateOutputFile(kbserv, title);


            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Object", "Class", "Error" });

            //Cargo todas las clases de todos los theme de la KB.
            StringCollection ThemeClasses = new StringCollection();

            LoadThemeClasses(kbserv, output, ThemeClasses);

            StringCollection UsedClasses = new StringCollection();

            //Reviso todos los objeto para ver las class usadas en cada control
            LoadAndCheckUsedClasses(kbserv, output, UsedClasses, ThemeClasses, writer);


            foreach (string sd in UsedClasses)
            {
                if (!ThemeClasses.Contains(sd))
                {
                    writer.AddTableData(new string[] { "", sd, "Application Class not in theme" });
                    output.AddLine("Application Class not in theme " + sd);
                }
                else
                {
                    ThemeClasses.Remove(sd);
                }
            }


            writer.AddTableData(new string[] { "-----------------", "--------------", "---" });
            foreach (string ss in ThemeClasses)
            {
                if (!UsedClasses.Contains(ss))
                {
                    writer.AddTableData(new string[] { "", ss, "Class not referenced" });
                    output.AddLine("Class not referenced in application " + ss);
                }
            }
            writer.AddTableData(new string[] { "-------", "-----------------", "--------------" });
            writer.AddFooter();
            writer.Close();
            output.EndSection(title, true);

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
        }
예제 #9
0
        internal static void RenameVariables()
        {
            IKBService kbserv = UIServices.KB;
            string     title  = "KBDoctor - Object with variables not based on attribute/domain";

            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);


                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);

                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);
                writer.AddTableHeader(new string[] { "Type", "Name", "Variable", "Attribute", "Domain" });

                Domain dom = Functions.DomainByName("Fecha");

                //All useful objects are added to a collection
                foreach (KBObject obj in kbserv.CurrentModel.Objects.GetAll())
                {
                    KBDoctorOutput.Message("Procesing.... " + obj.Name + " - " + obj.Type.ToString());
                    Boolean SaveObj = false;

                    if (Utility.isGenerated(obj) && !ObjectsHelper.isGeneratedbyPattern(obj) && (obj is Transaction || obj is WebPanel || obj is WorkPanel))
                    {
                        Functions.AddLine("RenameVariables.txt", "##" + obj.Name);
                        List <Variable> lstVariables = VariablesToRename(obj);
                    }
                }

                string inputFile = kbserv.CurrentKB.UserDirectory + @"\RenameVariables.txt";

                // Input
                List <String> data = File.ReadAllLines(inputFile).Distinct(StringComparer.CurrentCultureIgnoreCase).ToList();

                // Processing
                data.Sort();

                // Output
                string outputFile2 = kbserv.CurrentKB.UserDirectory + @"\RenameVariables2.txt";
                File.WriteAllLines(outputFile2, data.ToArray());


                writer.AddFooter();
                writer.Close();

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                output.EndSection("KBDoctor", title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #10
0
        public static void ListObjWarningsErrors()
        {
            IKBService    kbserv     = UIServices.KB;
            List <string> objWarnErr = new List <string>();

            string title = "KBDoctor - Warnings and Errors";

            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);

                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);

                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

                writer.AddHeader(title);
                GxModel gxModel = kbserv.CurrentKB.DesignModel.Environment.TargetModel.GetAs <GxModel>();

                var fileWildcardsArg = new[] { "*.xml" };
                var directoryArg     = KBDoctorHelper.SpcDirectory(kbserv);
                var searchSubDirsArg = System.IO.SearchOption.AllDirectories;
                var ignoreCaseArg    = true;

                writer.AddTableHeader(new string[] { "Error Type", "ObjClass", "Object", "Description", "UserName", "Observation" });

                SearchNVGFiles(output, writer, fileWildcardsArg, directoryArg, searchSubDirsArg, "<Error>", ignoreCaseArg, objWarnErr);
                SearchNVGFiles(output, writer, fileWildcardsArg, directoryArg, searchSubDirsArg, "deprecated", ignoreCaseArg, objWarnErr);
                SearchNVGFiles(output, writer, fileWildcardsArg, directoryArg, searchSubDirsArg, "<Warning>", ignoreCaseArg, objWarnErr);
                SearchNVGFiles(output, writer, fileWildcardsArg, directoryArg, searchSubDirsArg, "<Icon>client<", ignoreCaseArg, objWarnErr);
                SearchNVGFiles(output, writer, fileWildcardsArg, directoryArg, searchSubDirsArg, "<JoinLocation>0</JoinLocation>", ignoreCaseArg, objWarnErr);


                writer.AddFooter();
                //agrego lista de objetos para que sea facil hacerle un BUILD WITH THIS ONLY
                string lstObjWarn = "";
                string puntoycoma = "";
                foreach (string objstr in objWarnErr)
                {
                    lstObjWarn += puntoycoma + Path.GetFileNameWithoutExtension(objstr);
                    puntoycoma  = ";";
                }
                writer.AddTableData(new string[] { lstObjWarn });
                writer.AddTableData(new string[] { "  " + objWarnErr.Count.ToString() });

                writer.Close();


                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                output.EndSection("KBDoctor", title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #11
0
        public static void ListLastReports()
        {
            IKBService kbserv = UIServices.KB;

            Dictionary <string, KBObjectCollection> dic = new Dictionary <string, KBObjectCollection>();

            string title      = "KBDoctor - List last Reports";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);

            writer.AddTableHeader(new string[] { "Report", "", "Date Generated" });

            string[] fileEntries = Directory.GetFiles(kbserv.CurrentKB.UserDirectory, "kbdoctor*.html");

            foreach (string fileName in fileEntries)
            {
                string dateFilename = "";
                int    days         = (int)(DateTime.Now - File.GetLastWriteTime(fileName)).TotalDays;
                int    hours        = (int)(DateTime.Now - File.GetLastWriteTime(fileName)).TotalHours;
                int    mins         = (int)(DateTime.Now - File.GetLastWriteTime(fileName)).TotalMinutes;

                if (days > 0)
                {
                    dateFilename = days.ToString() + " day(s) ago";
                }
                else
                if (hours > 0)
                {
                    dateFilename = hours.ToString() + " hour(s) ago";
                }
                else
                {
                    dateFilename = mins.ToString() + " minutes(s) ago";
                }

                string shortFilename = Path.GetFileName(fileName);
                shortFilename = shortFilename.Replace("kbdoctor.", "");
                shortFilename = shortFilename.Replace(".html", "");
                shortFilename = Regex.Replace(shortFilename, "(\\B[A-Z])", " $1");

                string fileLink = "<a href=\"file:///" + fileName + "\">" + shortFilename + "</a>";
                writer.AddTableData(new string[] { fileLink, dateFilename, File.GetLastWriteTime(fileName).ToString() });
            }
            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #12
0
        public static void ListMainObj()
        {
            IKBService kbserv = UIServices.KB;


            Dictionary <string, KBObjectCollection> dic = new Dictionary <string, KBObjectCollection>();

            string title = "KBDoctor - Main Objects";

            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);


                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);

                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);

                writer.AddTableHeader(new string[] { "Type", "Object", "Description", "Module", "Public", "Generator", "Protocol", "Last Update" });

                KBCategory mainCategory = Functions.MainCategory(kbserv.CurrentModel);
                foreach (KBObject obj in mainCategory.AllMembers)
                {
                    if (obj != null)
                    {
                        string desc = obj.Description.Replace(",", " ");
                        desc = desc.Replace(">", "");
                        desc = desc.Replace("<", "");
                        string objAppGenerator = obj.GetPropertyValueString("AppGenerator");
                        string objProtocol     = obj.GetPropertyValueString("CALL_PROTOCOL");


                        string isGenerated = KBDoctorCore.Sources.Utility.isGenerated(obj) ? "Yes" : "";


                        writer.AddTableData(new string[] { obj.TypeDescriptor.Name + " ", Functions.linkObject(obj), desc,
                                                           obj.Module.Name, obj.IsPublic.ToString(), objAppGenerator, objProtocol, obj.LastUpdate.ToShortDateString() });


                        KBDoctorOutput.Message(obj.TypeDescriptor.Name + "," + obj.Name + "," + obj.Description);  //+ "," + obj.Timestamp.ToString());
                    }
                }
                writer.AddFooter();
                writer.Close();

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                output.EndSection("KBDoctor", title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #13
0
        public static void ListProc()
        {
            IKBService kbserv = UIServices.KB;


            Dictionary <string, KBObjectCollection> dic = new Dictionary <string, KBObjectCollection>();

            string title = "KBDoctor - Procedure";

            try
            {
                string  outputFile = Functions.CreateOutputFile(kbserv, title);
                KBModel kbmodel    = kbserv.CurrentModel;


                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);

                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);

                writer.AddTableHeader(new string[] { "Type", "Object", "Commit ", "Module", "Public", "Generator", "Protocol", "Last Update" });
                string commitOnExit = "";

                foreach (KBObject obj in kbmodel.Objects.GetAll())
                {
                    commitOnExit = "";
                    if (obj is Procedure)
                    {
                        if (obj.VersionDate >= DateTime.Now.AddDays(-45))
                        {
                            object aux = obj.GetPropertyValue("CommitOnExit");
                            if (aux != null)
                            {
                                commitOnExit = aux.ToString();
                            }
                        }
                        writer.AddTableData(new string[] { obj.TypeDescriptor.Name + " ", Functions.linkObject(obj), commitOnExit,
                                                           obj.Module.Name, obj.IsPublic.ToString(), "", "", obj.LastUpdate.ToShortDateString() });


                        KBDoctorOutput.Message(obj.TypeDescriptor.Name + "," + obj.Name + "," + obj.Description);  //+ "," + obj.Timestamp.ToString());
                    }
                }
                writer.AddFooter();
                writer.Close();

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                output.EndSection("KBDoctor", title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #14
0
        private static void AddLineKBInterfazSource(KBDoctorXMLWriter writer, KBObject obj, string texto, string tipo, string sourceWOComments, string mainss)
        {
            string             callTree = "";
            KBObjectCollection objColl  = new KBObjectCollection();

            if (sourceWOComments.Contains(texto))
            {
                writer.AddTableData(new string[] { Functions.linkObject(obj), "", "CMD." + texto, mainss });
            }
        }
예제 #15
0
        public static void RecomendedModule()
        {
            IKBService kbserv = UIServices.KB;

            Dictionary <string, KBObjectCollection> dic = new Dictionary <string, KBObjectCollection>();

            string title      = "KBDoctor - Recomended module";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            string            sw     = "";
            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            int numObj = 0;

            writer.AddTableHeader(new string[] { "Type", "Object", "Module", "List of modules" });


            SelectObjectOptions selectObjectOption = new SelectObjectOptions();

            selectObjectOption.MultipleSelection = false;
            selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get <Module>());
            // Module module2 = new Module(kbModel);
            foreach (Module module in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
            {
                foreach (KBObject obj in module.GetAllMembers())
                {
                    if (Functions.hasModule(obj))
                    {
                        output.AddLine(obj.Name);
                        string moduleListString = "";
                        foreach (Module mod in ListModulesOfReferencedTables(obj))
                        {
                            moduleListString += mod.Name + " ";
                        }

                        if (obj.Module.Name != moduleListString.Trim() && moduleListString.Trim() != "")
                        {
                            writer.AddTableData(new string[] { obj.TypeDescriptor.Name + " ", Functions.linkObject(obj), obj.Module.Name, moduleListString });
                        }
                    }
                }
            }
            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #16
0
        public static void ListDomain()
        {
            IKBService kbserv = UIServices.KB;

            string title = "KBDoctor - Domains";

            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);

                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);


                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);
                writer.AddTableHeader(new string[] { "Domain", "Description", "Data type", "Att references", "Other References" });
                string description;
                string titlesuggested;
                string columnTitle;
                foreach (Domain d in Domain.GetAll(kbserv.CurrentModel))
                {
                    description = d.Description;
                    string Picture         = Utility.FormattedTypeDomain(d);
                    int    attReferences   = 0;
                    int    otherReferences = 0;
                    foreach (EntityReference r in d.GetReferencesTo())
                    {
                        KBObject objRef = KBObject.Get(UIServices.KB.CurrentModel, r.From);
                        if (objRef is Artech.Genexus.Common.Objects.Attribute)
                        {
                            attReferences += 1;
                        }
                        else
                        {
                            otherReferences += 1;
                        }
                    }
                    writer.AddTableData(new string[] { Functions.linkObject(d), description, Picture, attReferences.ToString(), otherReferences.ToString() });
                }
                writer.AddFooter();
                writer.Close();

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #17
0
        public static void ListWithoutDomain()
        {
            IKBService kbserv = UIServices.KB;
            Dictionary <string, string> myDict = new Dictionary <string, string>();

            string title      = "KBDoctor - Attributes without domain";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);


            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Attribute", "Description", "Data type", "Suggested Domains" });

            foreach (Artech.Genexus.Common.Objects.Attribute a in Artech.Genexus.Common.Objects.Attribute.GetAll(kbserv.CurrentModel))
            {
                string Picture   = Functions.ReturnPicture(a);
                bool   isSubtype = Functions.AttIsSubtype(a);
                if ((a.DomainBasedOn == null) && !isSubtype)
                {
                    // search for domains with the same data type
                    output.AddLine("Procesing " + a.Name);
                    string suggestedDomains = "";
                    string value            = "";

                    /*
                     * //busco el
                     * if (myDict.TryGetValue(Picture, out value))
                     * {
                     *  suggestedDomains = value;
                     * }
                     * else
                     * {
                     *  suggestedDomains = SuggestedDomains(kbserv, a);
                     * }
                     */
                    string attNameLink = Functions.linkObject(a); // "<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;OpenObject&name=" + a.Guid.ToString() + "\">" + a.Name + "</a>";
                    writer.AddTableData(new string[] { attNameLink, a.Description, Picture, suggestedDomains });
                }
            }

            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #18
0
 private static void SearchNVGFiles(IOutputService output, KBDoctorXMLWriter writer, string[] fileWildcardsArg, string directoryArg, System.IO.SearchOption searchSubDirsArg, string containsTextArg, bool ignoreCaseArg, List <string> objWarnErr)
 {
     output.AddLine(">>Searching for " + containsTextArg);
     foreach (string file in FindInFiles(directoryArg, containsTextArg, ignoreCaseArg, searchSubDirsArg, (string[])fileWildcardsArg))
     {
         if (!objWarnErr.Contains(file))
         {
             AddFileWithWarningsErrors(output, writer, containsTextArg, file);
             objWarnErr.Add(file);
         }
     }
 }
예제 #19
0
        public static void AttFormula()
        {
            IKBService kbserv = UIServices.KB;


            string title      = "KBDoctor - Attributes Formula";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);


            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Attribute", "Description", "DataType", "Formula", "Tables", "Redundant in Tables" });
            string description;
            string titlesuggested;
            string columnTitle;

            foreach (Artech.Genexus.Common.Objects.Attribute a in Artech.Genexus.Common.Objects.Attribute.GetAll(kbserv.CurrentModel))
            {
                description    = a.Description;
                titlesuggested = a.Title;
                columnTitle    = a.ColumnTitle;
                Formula formula = a.Formula;
                if (formula == null)
                {
                    //  output.AddLine(a.Name);
                }
                else
                {
                    output.AddLine("Formula " + a.Name);
                    string Picture           = Functions.ReturnPicture(a);
                    string attNameLink       = Functions.linkObject(a);
                    string redundantInTables = "";
                    string tables            = "";
                    GetTablesAttIsRedundant(kbserv.CurrentModel, a, out tables, out redundantInTables);
                    writer.AddTableData(new string[] { attNameLink, description, Picture, formula.ToString(), tables, redundantInTables });
                }
            }

            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #20
0
        public static void AddINParmRule()
        {
            // Object with parm() rule without in: out: or inout:
            IKBService     kbserv = UIServices.KB;
            IOutputService output = CommonServices.Output;
            string         title  = "KBDoctor - ADD IN: to Parm() rule";

            output.StartSection("KBDoctor", title);
            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);


                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);
                writer.AddTableHeader(new string[] { "Object", "Description", "Tipo" });
                int cantObjChanged = 0;

                SelectObjectOptions selectObjectOption = new SelectObjectOptions
                {
                    MultipleSelection = true
                };
                //   selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get<Procedure>());
                // selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get<WebPanel>());

                foreach (KBObject obj in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
                {
                    if (obj.Description.StartsWith("Work With"))
                    {
                        writer.AddTableData(new string[] { obj.Name, obj.Description, obj.TypeDescriptor.Name });
                        obj.Description = obj.Description.Replace("Work With ", "Trabajar con ");
                        obj.Save();
                    }
                }

                writer.AddFooter();
                writer.Close();

                bool success = true;
                KBDoctorOutput.EndSection(title, success);
                KBDoctorOutput.Message("Object changed " + cantObjChanged.ToString());

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #21
0
        public static void ListTableAttributesUsingDomain()
        {
            // Object with parm() rule without in: out: or inout:
            IKBService     kbserv = UIServices.KB;
            IOutputService output = CommonServices.Output;
            string         title  = "KBDoctor - Domain to change";

            output.StartSection(title);
            string outputFile = Functions.CreateOutputFile(kbserv, title);


            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Domain", "Table", "Description", "Attribute", "Descripcion" });
            int cantObjChanged = 0;

            SelectObjectOptions selectObjectOption = new SelectObjectOptions();

            selectObjectOption.MultipleSelection = true;
            selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get <Domain>());

            foreach (KBObject dom in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
            {
                foreach (EntityReference reference in dom.GetReferencesTo())
                {
                    KBObject att = KBObject.Get(dom.Model, reference.From);

                    if ((att != null) && (att is Artech.Genexus.Common.Objects.Attribute))
                    {
                        foreach (EntityReference reference2 in att.GetReferencesTo())
                        {
                            KBObject tbl = KBObject.Get(att.Model, reference2.From);

                            if ((tbl != null) && (tbl is Table))
                            {
                                writer.AddTableData(new string[] { Functions.linkObject(dom), Functions.linkObject(tbl), tbl.Description, Functions.linkObject(att), att.Description });
                            }
                        }
                    }
                }
            }

            writer.AddFooter();
            writer.Close();

            bool success = true;

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
        }
예제 #22
0
        /*
         *
         * Dependencias Entrantes
         * Dependencias Salientes
         * IE = Salientes / (Entrantes + Salientes)
         #Componentes Conexos dentro del módulo.
         * Tiene dependencia cíclicla ?
         * Largo máximo de dependencias en la que participa.
         * El módulo tiene objetos públicos no referenciados por externos?
         */

        public static void ListModulesStatistics()
        {
            IKBService     kbserv     = UIServices.KB;
            IOutputService output     = CommonServices.Output;
            bool           success    = true;
            int            objInRoot  = 0;
            int            objSinRoot = 0;
            string         title      = "KBDoctor - List Modules Statistics";

            output.StartSection(title);
            string            outputFile = Functions.CreateOutputFile(kbserv, title);
            KBDoctorXMLWriter writer     = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Module", "Description", "Tables", "Public Tables", "Objects", "Public Obj", "Obj/Publ %", "In References", "Out References" });

            SelectObjectOptions selectObjectOption = new SelectObjectOptions();

            selectObjectOption.MultipleSelection = true;
            selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get <Module>());
            foreach (Module mdl in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
            {
                output.AddLine(mdl.Name + "....");
                string[] mdlStat = ModuleStats2(mdl);

                if (mdl.Name == "Root Module")
                {
                    objInRoot = Int32.Parse(mdlStat[4]);
                }
                else
                {
                    if (Int32.Parse(mdlStat[2]) != 0)
                    {
                        objSinRoot = objSinRoot + Int32.Parse(mdlStat[4]);
                    }
                }
                writer.AddTableData(mdlStat);
            }
            output.AddLine("");
            output.EndSection(title, success);
            int    ratio   = (objInRoot == 0) ? 0 : (objSinRoot * 100) / objInRoot;
            string Resumen = "Obj in Modules, Obj Root, Ratio  " + objSinRoot.ToString() + "," + objInRoot.ToString() + "," + ratio.ToString();

            writer.AddTableData(new string[] { Resumen });
            writer.AddFooter();
            writer.Close();
            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            Functions.AddLineSummary("moduleStats.txt", Resumen);
        }
예제 #23
0
        public static void UserControlUsageCheck(KBObject obj, KBDoctorXMLWriter writer, string mainss)
        {
            Artech.Genexus.Common.Parts.WebFormPart webpart = obj.Parts.Get <Artech.Genexus.Common.Parts.WebFormPart>();

            if (webpart != null)
            {
                foreach (Artech.Genexus.Common.Parts.WebForm.IWebTag tag in Artech.Genexus.Common.Parts.WebForm.WebFormHelper.EnumerateWebTag(webpart))
                {
                    if (tag.IsUserControl)
                    {
                        string ucType   = tag.Properties.GetPropertyValueString("UserControlType");
                        string ctrlName = tag.Properties.GetPropertyValueString("ControlName");
                        writer.AddTableData(new string[] { Functions.linkObject(obj), ctrlName, "UC." + ucType, mainss });
                    }
                }
            }
        }
예제 #24
0
        public static void ListKeyVarchar()
        {
            IKBService kbserv = UIServices.KB;

            string title      = "KBDoctor - Attributes Varchar that is Primary Key in some table";
            string outputFile = Functions.CreateOutputFile(kbserv, title);

            IOutputService output = CommonServices.Output;

            output.StartSection(title);

            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Attribute", "Description", "Data type", "Domain", "Tables" });

            foreach (Table t in Table.GetAll(kbserv.CurrentModel))
            {
                output.AddLine("Processing... " + t.Name);
                string objNameLink = Functions.linkObject(t); //"<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;OpenObject&name=" + t.Guid.ToString() + "\">" + t.Name + "</a>";


                foreach (TableAttribute attr in t.TableStructure.PrimaryKey)
                {
                    if ((attr.Attribute.Type == Artech.Genexus.Common.eDBType.VARCHAR) || (attr.Attribute.Type == Artech.Genexus.Common.eDBType.LONGVARCHAR))
                    {
                        output.AddLine("Processing " + attr.Name);
                        if (!Functions.AttIsSubtype(attr))
                        {
                            string domLink     = DomainLinkFromAttribute(attr);
                            string attNameLink = Functions.linkObject(attr); //"<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;OpenObject&name=" + attr.Guid.ToString() + "\">" + attr.Name + "</a>";
                            string Picture     = Functions.ReturnPicture(attr);
                            writer.AddTableData(new string[] { attNameLink, attr.Attribute.Description, Picture, domLink, t.Name });
                        }
                    }
                }
            }

            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(title, success);
        }
예제 #25
0
        public static void ListVarcharToChar()
        {
            IKBService kbserv = UIServices.KB;

            string title = "KBDoctor - Attributes Varchar that shoud be Char";

            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);

                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);


                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);
                writer.AddTableHeader(new string[] { "Attribute", "Description", "Data type", "Domain" });

                foreach (Artech.Genexus.Common.Objects.Attribute a in Artech.Genexus.Common.Objects.Attribute.GetAll(kbserv.CurrentModel))
                {
                    string Picture = Utility.FormattedTypeAttribute(a);
                    if (((a.Type == Artech.Genexus.Common.eDBType.VARCHAR) || (a.Type == Artech.Genexus.Common.eDBType.LONGVARCHAR)) && (a.Length <= 25) && !Functions.AttIsSubtype(a))
                    {
                        string domLink = DomainLinkFromAttribute(a);

                        string attNameLink = "";

                        attNameLink = Functions.linkObject(a); //"<a href=\"gx://?Command=fa2c542d-cd46-4df2-9317-bd5899a536eb;OpenObject&name=" + a.Guid.ToString() + "\">" + a.Name + "</a>";
                        writer.AddTableData(new string[] { attNameLink, a.Description, Picture, domLink });
                    }
                }

                writer.AddFooter();
                writer.Close();

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #26
0
        public static void BuildModule()
        {
            IKBService     kbserv  = UIServices.KB;
            KBModel        kbModel = UIServices.KB.CurrentModel;
            IOutputService output  = CommonServices.Output;

            bool   success = true;
            string title   = "KBDoctor - Build Module";

            output.StartSection(title);
            string            outputFile = Functions.CreateOutputFile(kbserv, title);
            KBDoctorXMLWriter writer     = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Object", "Description", "Visibility" });

            KBObjectCollection objToBuild = new KBObjectCollection();

            SelectObjectOptions selectObjectOption = new SelectObjectOptions();

            selectObjectOption.MultipleSelection = true;

            selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get <Module>());
            foreach (Module mdl in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
            {
                foreach (KBObject o in CreateListObjectsModuleAndReferences(kbModel, mdl, writer))
                {
                    objToBuild.Add(o);
                }
            }

            writer.AddFooter();
            writer.Close();
            KBDoctorHelper.ShowKBDoctorResults(outputFile);

            GenexusUIServices.Build.BuildWithTheseOnly(objToBuild.Keys);

            do
            {
                Application.DoEvents();
            } while (GenexusUIServices.Build.IsBuilding);

            output.EndSection("KBDoctor", true);
        }
예제 #27
0
        public static void AddINParmRule()
        {
            // Object with parm() rule without in: out: or inout:
            IKBService     kbserv = UIServices.KB;
            IOutputService output = CommonServices.Output;
            string         title  = "KBDoctor - ADD IN: to Parm() rule";

            output.StartSection(title);
            string outputFile = Functions.CreateOutputFile(kbserv, title);


            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Object", "Description", "Param rule" });
            int cantObjChanged = 0;

            SelectObjectOptions selectObjectOption = new SelectObjectOptions();

            selectObjectOption.MultipleSelection = true;
            selectObjectOption.ObjectTypes.Add(KBObjectDescriptor.Get <Procedure>());

            foreach (KBObject obj in UIServices.SelectObjectDialog.SelectObjects(selectObjectOption))
            {
                string oldParm = Functions.ExtractRuleParm(obj);
                string newParm = ChangeRuleParmWithIN(obj);
                if (newParm != "")
                {
                    cantObjChanged += 1;
                    PrintNewRuleParm(writer, obj, oldParm, newParm);
                }
            }

            writer.AddFooter();
            writer.Close();

            bool success = true;

            output.EndSection(title, success);
            output.AddLine("Object changed " + cantObjChanged.ToString());

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
        }
예제 #28
0
        internal static void ListAttributes()
        {
            IKBService kbserv = UIServices.KB;
            // Dictionary<string, string> myDict = new Dictionary<string, string>();

            string title = "KBDoctor - List Attributes";

            try
            {
                string outputFile = Functions.CreateOutputFile(kbserv, title);

                IOutputService output = CommonServices.Output;
                output.StartSection("KBDoctor", title);


                KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);
                writer.AddHeader(title);
                writer.AddTableHeader(new string[] { "Attribute", "Description", "Data type", "Domain", "ControlType", "Subtype", "Title", "Column Title", "Contextual", "IsFormula" });

                foreach (Artech.Genexus.Common.Objects.Attribute a in Artech.Genexus.Common.Objects.Attribute.GetAll(kbserv.CurrentModel))
                {
                    string Picture       = Utility.FormattedTypeAttribute(a);
                    string domlink       = a.DomainBasedOn == null ? " " : Functions.linkObject(a.DomainBasedOn);
                    string superTypeName = a.SuperTypeKey == null ? " " : a.SuperType.Name;
                    string controlType   = a.GetPropertyValueString("ControlType");
                    KBDoctorOutput.Message("Procesing " + a.Name);
                    string isFormula = a.Formula == null ? "" : "*";
                    writer.AddTableData(new string[] { Functions.linkObject(a), a.Description, Picture, domlink, controlType, superTypeName, a.Title, a.ColumnTitle, a.ContextualTitleProperty, isFormula });
                }

                writer.AddFooter();
                writer.Close();

                KBDoctorHelper.ShowKBDoctorResults(outputFile);
                bool success = true;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
            catch
            {
                bool success = false;
                KBDoctor.KBDoctorOutput.EndSection(title, success);
            }
        }
예제 #29
0
        private static void PrintNewRuleParm(KBDoctorXMLWriter writer, KBObject obj, string oldParm, string newParm)
        {
            ICallableObject callableObject = obj as ICallableObject;

            if (callableObject != null)
            {
                foreach (Signature signature in callableObject.GetSignatures())
                {
                    foreach (Parameter parm in signature.Parameters)
                    {
                        string nameParm = parm.IsAttribute ? parm.Name : "&" + parm.Name;
                        ListParmReferences(obj, nameParm, writer);
                    }
                }
            }
            writer.AddTableData(new string[] { Functions.linkObject(obj), oldParm, "====" });
            writer.AddTableData(new string[] { "", newParm, "=====" });
            writer.AddTableData(new string[] { "======", "======", "=======" });
        }
예제 #30
0
        public static void MarkPublicObjects()
        {
            IKBService     kbserv  = UIServices.KB;
            IOutputService output  = CommonServices.Output;
            bool           success = true;
            string         title   = "KBDoctor - Mark Public Object";

            output.StartSection(title);
            string            outputFile = Functions.CreateOutputFile(kbserv, title);
            KBDoctorXMLWriter writer     = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(title);
            writer.AddTableHeader(new string[] { "Object", "Type", "Description", "Visibility" });

            MakeAllObjectPublic(kbserv, output);

            foreach (KBObject obj in kbserv.CurrentModel.Objects.GetAll())
            {
                output.AddLine("Object " + obj.Name);
                ICallableObject callableObject = obj as ICallableObject;
                if (((callableObject != null) || obj is ExternalObject || obj is SDT || obj is DataSelector) && (!(obj is Transaction)))
                {
                    ObjectVisibility objVisibility = obj.GetPropertyValue <ObjectVisibility>("ObjectVisibility");

                    ObjectVisibility newObjVisibility = RecoverVisibility(obj);

                    if (objVisibility != newObjVisibility)
                    {
                        obj.SetPropertyValue("ObjectVisibility", newObjVisibility);
                        Functions.SaveObject(output, obj);
                        string objNameLink = Functions.linkObject(obj);
                        writer.AddTableData(new string[] { objNameLink, obj.TypeDescriptor.Name, obj.Description, newObjVisibility.ToString() });
                        output.AddLine("....Change Object " + obj.Name);
                    }
                }
            }
            output.AddLine("");
            output.EndSection(title, success);
            writer.AddFooter();
            writer.Close();
            KBDoctorHelper.ShowKBDoctorResults(outputFile);
        }