コード例 #1
0
ファイル: ResultInspector.cs プロジェクト: dfr0/moon
 /// <summary>
 /// Prepare the initial visual contents of the web control.
 /// </summary>
 private void InitializeComponent()
 {
     _details = Result.Exception != null && Result.Result != TestOutcome.Passed ? new ExceptionDetails(this) : new Details(this);
     bool hasDecorators = false;
     foreach (HtmlControlBase decoration in _details.DecorateContainer())
     {
         Controls.Add(decoration);
         hasDecorators = true;
     }
     Controls.Add(_details);
     if (hasDecorators)
     {
         BackgroundColor = Color.Manila;
         SetStyleAttribute(CssAttribute.Border, "1px solid " + Color.ManilaBorder);
         ForegroundColor = Color.DarkGray;
         Padding.Bottom = 2;
         Margin.Bottom = 2;
         Padding.Top = 6;
         SetStyleAttribute(CssAttribute.Position, "relative");
     }
     SetStyleAttribute(CssAttribute.Position, "relative");
 }
コード例 #2
0
        /// <summary>
        /// Prepare the initial visual contents of the web control.
        /// </summary>
        private void InitializeComponent()
        {
            _details = Result.Exception != null && Result.Result != TestOutcome.Passed ? new ExceptionDetails(this) : new Details(this);
            bool hasDecorators = false;

            foreach (HtmlControlBase decoration in _details.DecorateContainer())
            {
                Controls.Add(decoration);
                hasDecorators = true;
            }
            Controls.Add(_details);
            if (hasDecorators)
            {
                BackgroundColor = Color.Manila;
                SetStyleAttribute(CssAttribute.Border, "1px solid " + Color.ManilaBorder);
                ForegroundColor = Color.DarkGray;
                Padding.Bottom  = 2;
                Margin.Bottom   = 2;
                Padding.Top     = 6;
                SetStyleAttribute(CssAttribute.Position, "relative");
            }
            SetStyleAttribute(CssAttribute.Position, "relative");
        }