Пример #1
0
 public void SetTestEnvironment(TestDefinition input)
 {
     CleanTestArea();
     HideButtons();
     if (input.buttonClick1 != null)
     {
         btnClick1.Clicked += input.buttonClick1;
         oldClick1          = input.buttonClick1;
     }
     if (input.buttonClick2 != null)
     {
         btnClick2.Clicked += input.buttonClick2;
         oldClick2          = input.buttonClick2;
     }
     if (input.buttonClick3 != null)
     {
         btnClick3.Clicked += input.buttonClick3;
         oldClick3          = input.buttonClick3;
     }
     ShowActiveButtons();
     lblTestDesc.Text = input.testDesc;
     lblTestName.Text = input.testName;
     vboxWidget.Add(input.testWidget);
     foreach (Gtk.Widget w in vboxWidget.Children)
     {
         w.Show();
     }
     vboxWidget.Show();
 }
Пример #2
0
        public TestDefinition GridSelector_ElementList()
        {
            // create the control array
            selector1Array = new Gtk.Button[18];
            for (int i = 0; i < 18; i++)
            {
                Gtk.Button newButton = new Gtk.Button();
                newButton.Label   = i.ToString();
                selector1Array[i] = newButton;
            }

            // create the control
            selector1.NbCol = 4;
            selector1.NbRow = 4;
            selector1State  = GridSelector.eState.Horizontal;
            selector1.Initialize(GridSelector.eState.Horizontal, selector1Array);

            // prepare the  testDefinition
            TestDefinition info = new TestDefinition();

            info.testName     = "GrisSelector_ElementList";
            info.testDesc     = "Test where the GridSelector is initialize with an array of controls. Button 1 will switch intween the differnt mode,";
            info.testWidget   = selector1;
            info.buttonClick1 = new EventHandler(onClickSel1SwitchMode);

            return(info);
        }
Пример #3
0
        public TestDefinition GrisSelector_EmptyElements()
        {
            // create the control array
            selector2Array = new Gtk.Button[18];
            for (int i = 0; i < 18; i++)
            {
                Gtk.Button newButton = new Gtk.Button();
                newButton.Label   = i.ToString();
                selector2Array[i] = newButton;
            }

            // create the control
            selector2.NbCol = 4;
            selector2.NbRow = 4;
            selector2State  = GridSelector.eState.Horizontal;
            selector2.SetFillerControlType(typeof(Gtk.Button));
            selector2.Initialize(GridSelector.eState.Horizontal, selector2Array);

            // prepare the  testDefinition
            TestDefinition info = new TestDefinition();

            info.testName     = "GrisSelector_EmptyElements";
            info.testDesc     = "Test where the GridSelector has a disabled button when the max element is being reached. Button 1 will switch intween the differnt mode,";
            info.testWidget   = selector2;
            info.buttonClick1 = new EventHandler(onClickSel2SwitchMode);

            return(info);
        }
Пример #4
0
        public TestDefinition DynamicRow_ControlArray()
        {
            DynRow1 = new DynamicRow(typeof(Gtk.Button), new object[] { "button" });

            TestDefinition info = new TestDefinition();

            info.testName   = "DynamicRow_ControlArray";
            info.testDesc   = "Test that sets a DynamicRow with a control type.";
            info.testWidget = DynRow1;

            return(info);
        }
Пример #5
0
        public TestDefinition DynamicRow_UpdatedArray()
        {
            DynRow3 = new DynamicRow(typeof(Gtk.Button), new object[] { "button" });

            TestDefinition info = new TestDefinition();

            info.testName     = "DynamicRow_UpdatedArray";
            info.testDesc     = "Test that sets a DynamicRow and on the button click, updates the set of control.";
            info.testWidget   = DynRow3;
            info.buttonClick1 = OnClickUpdateArray;

            return(info);
        }
Пример #6
0
        public TestDefinition DynamicRow_ChangedMax()
        {
            DynRow2 = new DynamicRow(typeof(Gtk.Button), new object[] { "button" });
            DynRow2.UpdateMaxCount(12);

            TestDefinition info = new TestDefinition();

            info.testName   = "DynamicRow_ChangedMax";
            info.testDesc   = "Test that sets a DynamicRow with a larger number of controls.";
            info.testWidget = DynRow2;

            return(info);
        }
Пример #7
0
        public TestDefinition test1()
        {
            lbl1.Text = "Test";

            TestDefinition info = new TestDefinition();

            info.testName     = "LabelTest_Normal";
            info.testDesc     = "Test that uses the GTK.Label as a Proof Of Concept";
            info.testWidget   = lbl1;
            info.buttonClick1 = new EventHandler(onClickIncrement);
            info.buttonClick2 = new EventHandler(onClickZero);

            return(info);
        }
Пример #8
0
        public TestDefinition ButtonImage_ChangeSize()
        {
            // create the control
            bImg2 = new ButtonImage(16);

            // prepare the testDefinition
            TestDefinition info = new TestDefinition();

            info.testName     = "ButtonImage_ChangeSize";
            info.testDesc     = "Test where the button Image is Switching the size of the image. B1 is 16px, B2 is 32px, B3 is 128px";
            info.testWidget   = bImg2;
            info.buttonClick1 = new EventHandler(onClick2set16);
            info.buttonClick2 = new EventHandler(onClick2set32);
            info.buttonClick3 = new EventHandler(onClick2set128);

            return(info);
        }
Пример #9
0
        public TestDefinition ButtonImage_NormalUsage()
        {
            // create the control
            bImg1 = new ButtonImage();

            // prepare the  testDefinition
            TestDefinition info = new TestDefinition();

            info.testName     = "ButtonImage_NormalUsage";
            info.testDesc     = "Test where the button Image is used in normal conditions. B1 will get the image, B2 will get the filename, B3 will clear.";
            info.testWidget   = bImg1;
            info.buttonClick1 = new EventHandler(onClick1GetImage);
            info.buttonClick2 = new EventHandler(onClick1GetFilename);
            info.buttonClick3 = new EventHandler(onClick1Clear);

            return(info);
        }
Пример #10
0
        public TestDefinition OutputList_SlowSpeed()
        {
            // create the control
            ol3.Identifier = "WidgetTest3";
            ol3.TickSpeed  = 3000;
            ol3.Initialize();

            // prepare the  testDefinition
            TestDefinition info = new TestDefinition();

            info.testName     = "OutputList_Slow";
            info.testDesc     = "Test where the OutputList is put in 'slow' conditioons. Button 1 will add new text, Button 2 will Clear, and Button 3 will not be used.";
            info.testWidget   = ol3;
            info.buttonClick1 = new EventHandler(onClickOl3AddText);
            info.buttonClick2 = new EventHandler(onClickOl3ClearText);

            return(info);
        }
Пример #11
0
        public TestDefinition ButtonImage_LoadImages()
        {
            // create the control
            bImg3 = new ButtonImage();


            // prepare the  testDefinition
            TestDefinition info = new TestDefinition();

            info.testName     = "ButtonImage_LoadImages";
            info.testDesc     = "Test where the button Image is used to display an image. B1 will set an image, B2 will set a stock, B3 will clear.";
            info.testWidget   = bImg3;
            info.buttonClick1 = new EventHandler(onClick3SetImage);
            info.buttonClick2 = new EventHandler(onClick3SetStock);
            info.buttonClick3 = new EventHandler(onClick3Clear);

            return(info);
        }