Exemplo n.º 1
0
        protected virtual InteractiveItemsStack PrepareMessageContent(string message, bool reply)
        {
            // пиктограмма стрелки
            DrawableItemsStack <VectorShape> image = new DrawableItemsStack <VectorShape>();

            image.OrientationAxis = Axis.X;          // stack image components one on top of the other
            image.KeepAspectRatio = true;
            image.Add(new ArrowShape());             //OptionsCircleShape
            image.Border = 1;

            // текст
            InteractiveItemsStack replyText = new InteractiveItemsStack();

            replyText.OrientationAxis = Axis.X;
            replyText.Border          = 1;
            replyText.Add(image);

            TextSegment text = new TextSegment(Graphics, message, GroupTitleFont, true);

            text.Brush = (reply) ? Brushes.DarkBlue : Brushes.Crimson;
            replyText.Add(text);

            // Background контейнер
            InteractiveItemsStack content = new InteractiveItemsStack();

            content.OrientationAxis = Axis.Z;
            content.Add(new DrawableRectangle((reply)? ReplyTextTitlesBackground : OptionTextTitlesBackground, null, 0, 0, 5, 5));
            content.Add(replyText);

            return(content);
        }
Exemplo n.º 2
0
        private InteractiveHeaderedItem MessageToContent(ContentBody content, InteractiveItemsStack item, bool reply)
        {
            InteractiveHeaderedItem headerContent = PrepareMessagesHeader(content, item, reply);

            nodeContents.Add(headerContent);
            nodeContentNames.Add(headerContent, lineHeaderContent.ToString());
            nodeContentsByName.Add(lineHeaderContent.ToString(), headerContent);

            lineHeaderContent++;

            return(headerContent);
        }