public CaptionedControl(WebInterfaceControl control, Label caption, CaptionedControlOrientation position = CaptionedControlOrientation.AboveCaption)
 {
     content     = control;
     text        = caption;
     orientation = position;
     GuessJustification();
 }
        public string GetTestSuiteLaunchPane(string remoteUrlTarget)
        {
            WebInterface testSuiteLaunchPane = new WebInterface();

            testSuiteLaunchPane       = null;
            testSuiteLaunchPane       = new WebInterface();
            testSuiteLaunchPane.Title = "Test Suites";
            testSuiteLaunchPane.ControlsInOrder.Add(new RawCodeSegment("<center>"));
            if (this.IsReady)
            {
                // List available tests
                testSuiteLaunchPane.ControlsInOrder.Add(new Label("AVAILABLE TEST SUITES", 200));


                ControlCluster cluster = new ControlCluster();
                cluster.columns = 3;
                foreach (string thisTestSuite in tests.AllTestSuites.Keys)
                {
                    WebInterfaceControl icon = null;
                    int size = tests.AllTestSuites[thisTestSuite].Count;
                    if (size < SMALL_SUITE_THRESHOLD)
                    {
                        icon = ICON_SMALLTEST;
                    }
                    else if (size > LARGE_SUITE_THRESHOLD)
                    {
                        icon = ICON_LARGETEST;
                    }
                    else
                    {
                        icon = ICON_MEDIUMTEST;
                    }
                    cluster.Add(new Link(remoteUrlTarget + "/" + RUN_SUITE_PATH + '/' + thisTestSuite, new CaptionedControl(icon, thisTestSuite, CaptionedControlOrientation.AboveCaption, ICON_TEXT_SIZE).ToString()));
                    icon = null;
                }
                testSuiteLaunchPane.ControlsInOrder.Add(cluster);
                cluster = null;
            }
            else
            {
                testSuiteLaunchPane.RefreshIntervalSeconds = 3;
                testSuiteLaunchPane.ControlsInOrder.Add(new Label("Tests are setting up...", 300));
            }


            testSuiteLaunchPane.ControlsInOrder.Add(new RawCodeSegment("</center>"));
            return(testSuiteLaunchPane.ToString());
        }
 public ConjoinedControls(WebInterfaceControl alpha, WebInterfaceControl omega, ConjoinedControlsOrientation position)
 {
     contentAlpha = alpha;
     contentOmega = omega;
     orientation  = position;
 }
예제 #4
0
 public Link(string destinationUrl, WebInterfaceControl innerControl, string targetFrame = default(string)) : this(destinationUrl, innerControl.ToString(), targetFrame)
 {
 }
 public TiledControl(WebInterfaceControl control)
 {
     content = control;
 }
 public CaptionedControl(WebInterfaceControl control, string caption, CaptionedControlOrientation position = CaptionedControlOrientation.AboveCaption, int fontSize = 100) : this(control, new Label(caption, fontSize), position)
 {
 }