示例#1
0
        private String ParseRuby()
        {
            FormatData       fd          = new FormatData();
            TextFramework    tf          = new TextFramework(VerticalIconInput.Text, HorizontalIconInput.Text, CrossIconInput.Text, Int32.Parse(TypeWidthInput.Text), Int32.Parse(MethodWidthInput.Text));
            DocumentStripper ds          = new DocumentStripper(InputBox.Text, fd, "Ruby");
            StringBuilder    displayText = new StringBuilder();


            return("Ruby");
        }
示例#2
0
        private String ParseCSharp()
        {
            FormatData       fd          = new FormatData();
            TextFramework    tf          = new TextFramework(VerticalIconInput.Text, HorizontalIconInput.Text, CrossIconInput.Text, Int32.Parse(TypeWidthInput.Text), Int32.Parse(MethodWidthInput.Text));
            DocumentStripper ds          = new DocumentStripper(InputBox.Text, fd, "C#");
            StringBuilder    displayText = new StringBuilder();

            if (!fd.IsClassContainerDescriptionSet())
            {
                displayText.Append(fd.ReturnClassContainerName());
            }
            else
            {
                displayText.Append(fd.GetClassContainerName() + " -- " + fd.GetClassContainerDescription());
                displayText.Append(Environment.NewLine + Environment.NewLine);
            }
            displayText.Append(tf.GetConstructorSummaryHeader() + Environment.NewLine);
            for (int p = 0; p < fd.ConstructorCount(); p++)
            {
                if (!fd.IsCommentSet(p))
                {
                    displayText.Append(tf.AssembleConstructorRow(fd.GetConstructorTitle(p)));
                }
                else
                {
                    displayText.Append(tf.AssembleConstructorRow(fd.GetConstructorTitle(p) + " -- " + fd.GetConstructorComment(p)));
                }
            }
            displayText.Append(Environment.NewLine + Environment.NewLine + tf.GetMethodSummaryHeader());
            for (int r = 0; r < fd.GetFunctionCount(); r++)
            {
                if (String.IsNullOrEmpty(fd.GetFunctionComment(r)))
                {
                    displayText.Append(tf.AssembleFunctionRow(fd.GetFunctionType(r), fd.GetFunctionTitle(r)));
                }
                else
                {
                    displayText.Append(tf.AssembleFunctionRow(fd.GetFunctionType(r), fd.GetFunctionTitle(r), fd.GetFunctionComment(r)));
                }
            }
            displayText.Append(DisplayCurrentDate());
            return(displayText.ToString());
        }