コード例 #1
0
        public string ForgeRawLine(bool includeKey)
        {
            StringBuilder b = new StringBuilder();

            if (includeKey)
            {
                b.Append(StringEscaper.QuoteEscape(Key));
                b.Append("=");
            }

            b.Append(StringEscaper.QuoteEscape(Text));
            b.Append(",");
            if (Visibility)
            {
                b.Append("1,");
            }
            else
            {
                b.Append("0,");
            }
            b.Append((int)Type);
            b.Append(",");
            b.Append(Rect.Left);
            b.Append(",");
            b.Append(Rect.Top);
            b.Append(",");
            b.Append(Rect.Width);
            b.Append(",");
            b.Append(Rect.Height);
            b.Append(",");
            b.Append(Info.ForgeRawLine());
            return(b.ToString());
        }
コード例 #2
0
        public string ForgeRawLine(bool includeKey)
        {
            StringBuilder b = new StringBuilder();

            if (includeKey)
            {
                b.Append(StringEscaper.QuoteEscape(Key));
                b.Append("=");
            }

            b.Append(StringEscaper.QuoteEscape(Text));
            b.Append(",");
            if (Visibility)
            {
                b.Append("1,");
            }
            else
            {
                b.Append("0,");
            }
            b.Append((int)Type);
            b.Append(",");
            b.Append(Rect.Left);
            b.Append(",");
            b.Append(Rect.Top);
            b.Append(",");
            b.Append(Rect.Width);
            b.Append(",");
            b.Append(Rect.Height);

            b.Append(Info.ForgeRawLine());

            /*
             * string optionalArgs = Info.ForgeRawLine();
             * if (0 < optionalArgs.Length) // Only if optionalArgs is not empty
             * {
             *  b.Append(",");
             *  b.Append(optionalArgs);
             * }
             */

            return(b.ToString());
        }
コード例 #3
0
ファイル: UIControl.cs プロジェクト: mirsys/pebakery
        public string ForgeRawLine(bool includeKey)
        {
            StringBuilder b = new StringBuilder();

            if (includeKey)
            {
                b.Append(Key);
                b.Append("=");
            }
            b.Append(StringEscaper.DoubleQuote(Text));
            b.Append(",");
            b.Append(Visibility ? "1," : "0,");
            b.Append((int)Type);
            b.Append(",");
            b.Append(X);
            b.Append(",");
            b.Append(Y);
            b.Append(",");
            b.Append(Width);
            b.Append(",");
            b.Append(Height);
            b.Append(Info.ForgeRawLine());
            return(b.ToString());
        }