Esempio n. 1
0
 protected TabControlOverlayHeader()
 {
     HeaderInfo.Add(new Container
     {
         RelativeSizeAxes = Axes.X,
         AutoSizeAxes     = Axes.Y,
         Children         = new Drawable[]
         {
             controlBackground = new Box
             {
                 RelativeSizeAxes = Axes.Both,
             },
             TabControl = CreateTabControl().With(control => control.Margin = new MarginPadding {
                 Left = UserProfileOverlay.CONTENT_X_MARGIN
             })
         }
     });
 }
Esempio n. 2
0
        public void ParseHeader()
        {
            string lastLine = "";
            int    row      = 0;

            string lastKey   = "";
            string lastValue = "";
            bool   isNew     = false;

            m_HeaderStartRow = -1;
            foreach (string line in m_MailMessageLines)
            {
                if (row == 0 && line == "")
                {
                    continue;
                }
                else if (line == "")
                {
                    break;
                }

                if (m_HeaderStartRow == -1)
                {
                    m_HeaderStartRow = row;                             /// 헤더 시작
                }
                row += 1;

                lastLine  = line;
                lastValue = "";
                isNew     = false;

                if (line.Length > 0 &&
                    line.Substring(0, 1) != "\t" &&
                    line.Substring(0, 1) != " " &&
                    line.IndexOf(":") > 0)
                {
                    int lineIndex = line.IndexOf(":");

                    lastKey  = line.Substring(0, lineIndex);
                    lastLine = line.Substring(lineIndex + 1);

                    isNew = true;
                }
                lastValue = DeleteSpecialCharacter(DecodingOneLine(lastLine));

                if (isNew == false &&
                    HeaderInfo.Count > 0 &&
                    HeaderInfo[HeaderInfo.Count].Keys.ToArray()[0] == lastKey)
                {
                    HeaderInfo[HeaderInfo.Count][lastKey] += lastValue;
                }
                else
                {
                    Dictionary <string, string> headerLine = new Dictionary <string, string>();
                    headerLine.Add(lastKey, lastValue);
                    HeaderInfo.Add(HeaderInfo.Count + 1, headerLine);
                }
                lastValue = HeaderInfo[HeaderInfo.Count][lastKey];
                ParseHeaderType(lastKey.ToUpper(), lastValue); /// 헤더 정보 분석
            }
            m_HeaderEndRow = row;                              /// 헤더 종료
        }