Пример #1
0
        private void InitContent(Page page, string author, string date, string version)
        {
            Log.Debug("Started itialization of information container");
            PaddedTextLabel authorLabel = new PaddedTextLabel(page, "Author: ")
            {
                BackgroundColor = "RGB(255,255,255)",
                FontColor       = "RGB(89,131,168)",
                Height          = 0.38,
                Order           = 0
            };

            authorLabel.ToggleBoldFont(true);
            authorLabel.SetUsedSizingPolicy(SizingPolicy.ExpandXIfNeeded | SizingPolicy.ShrinkXIfNeeded);
            authorLabel.RationallyType = "informationAuthorLabel";
            //authorLabel.MarginTop = 0.1;

            AuthorLabel authorLabelContent = new AuthorLabel(page, author)
            {
                BackgroundColor = "RGB(255,255,255)",
                FontColor       = "RGB(89,131,168)",
                Height          = 0.38,
                HAlign          = Constants.LeftAlignment,
                Order           = 1,
                LockTextEdit    = true,
                EventDblClick   = "QUEUEMARKEREVENT(\"openWizard\")"
            };

            //authorLabelContent.
            Log.Debug("Created Author Label");

            PaddedTextLabel dateLabel = new PaddedTextLabel(page, "Date: ")
            {
                Height          = 0.38,
                BackgroundColor = "RGB(255,255,255)",
                FontColor       = "RGB(89,131,168)",
                Order           = 2
            };

            dateLabel.ToggleBoldFont(true);
            dateLabel.SetUsedSizingPolicy(SizingPolicy.ExpandXIfNeeded | SizingPolicy.ShrinkXIfNeeded);
            dateLabel.RationallyType = "informationDateLabel";
            //dateLabel.SetMargin(0.02);

            DateLabel dateLabelContent = new DateLabel(page, date)
            {
                Height          = 0.38,
                BackgroundColor = "RGB(255,255,255)",
                FontColor       = "RGB(89,131,168)",
                HAlign          = Constants.LeftAlignment,
                Order           = 3,
                LockTextEdit    = true,
                EventDblClick   = "QUEUEMARKEREVENT(\"openWizard\")"
            };

            dateLabelContent.SetUsedSizingPolicy(SizingPolicy.ExpandXIfNeeded | SizingPolicy.ShrinkXIfNeeded);

            Log.Debug("Created Date Label");

            PaddedTextLabel versionLabel = new PaddedTextLabel(page, "Version: ")
            {
                Height          = 0.38,
                BackgroundColor = "RGB(255,255,255)",
                FontColor       = "RGB(89,131,168)",
                Order           = 4
            };

            versionLabel.ToggleBoldFont(true);
            versionLabel.SetUsedSizingPolicy(SizingPolicy.ExpandXIfNeeded | SizingPolicy.ShrinkXIfNeeded);
            versionLabel.RationallyType = "informationVersionLabel";
            //versionLabel.SetMargin(0.1);

            VersionLabel versionLabelContent = new VersionLabel(page, version)
            {
                Height          = 0.38,
                BackgroundColor = "RGB(255,255,255)",
                FontColor       = "RGB(89,131,168)",
                HAlign          = Constants.LeftAlignment,
                Order           = 5,
                LockTextEdit    = true,
                EventDblClick   = "QUEUEMARKEREVENT(\"openWizard\")"
            };

            versionLabelContent.SetUsedSizingPolicy(SizingPolicy.ExpandXIfNeeded | SizingPolicy.ShrinkXIfNeeded);

            Log.Debug("Created Version Label");

            Children.Add(authorLabel);
            Children.Add(authorLabelContent);
            Children.Add(dateLabel);
            Children.Add(dateLabelContent);
            Children.Add(versionLabel);
            Children.Add(versionLabelContent);

            Log.Debug("Finished initialization of information container");
        }