Exemplo n.º 1
0
        private void MethodAnalysis(Action <FeasibilityHandler, MethodInfo> analysisAction = null)
        {
            if (Methods != null)
            {
                foreach (var item in Methods)
                {
                    var handler = Handlers[item];
                    analysisAction?.Invoke(handler, item);
                }
            }

            Alignmentor.Alignment(InfosCache, Splite, Replace, AlignmentType.Center);
        }
Exemplo n.º 2
0
        public void Show()
        {
            InfosCache.ForEach(item => item.RemoveLastest(Splite.Length));

            int RealLength = Alignmentor.Packet(InfosCache, "││", AlignmentType.Even);

            _start.Append('┌');
            _split.Append('├');
            _end.Append('└');

            for (int i = 0; i < RealLength - 11; i += 1)
            {
                _split.Append('─');
                _start.Append('─');
                _end.Append('─');
            }
            _start.Append('┐');
            _split.Append('┤');
            _end.Append('┘');

            StringBuilder result = new StringBuilder();

            result.AppendLine(_start.ToString());
            result.AppendLine(TableHeader.ToString());
            result.AppendLine(_split.ToString());
            InfosCache.RemoveAt(0);
            InfosCache.ForEach(item => result.AppendLine(item.ToString()));
            result.AppendLine(_end.ToString());

            int fatherClassColor = 0;

            for (int i = 0; i < result.Length; i += 1)
            {
                if (fatherClassColor != 0)
                {
                    if (fatherClassColor == i)
                    {
                        Console.ForegroundColor = ConsoleColor.Cyan;
                    }
                    else if (fatherClassColor < i && result[i] == '│')
                    {
                        Console.ResetColor();
                        fatherClassColor = 0;
                    }
                    Console.Write(result[i]);
                }
                else
                {
                    if (result[i] == '父')
                    {
                        fatherClassColor = i + 5;
                    }

                    if (result[i] == 'X')
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                    }
                    else if (result[i] == '√')
                    {
                        Console.ForegroundColor = ConsoleColor.Green;
                    }
                    Console.Write(result[i]);
                    Console.ResetColor();
                }
            }
        }
Exemplo n.º 3
0
 static FeasibilityHandler()
 {
     Alignmentor.RegisterAlignmentPage();
 }