public CheckNRadioTestDialog()
            : base("Check And Radio Test", 100, 100, 320, 200)
        {
            girdLayout = new GirdLayout(4, 2);

            girdLayout.SetHorizontalAlignment(0, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(1, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(2, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(3, 0, EHAlignment.HCenter);

            girdLayout.SetHorizontalAlignment(0, 1, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(1, 1, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(2, 1, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(3, 1, EHAlignment.HCenter);

            girdLayout.SetVerticalAlignment(0, 0, EVAlignment.VCenter);
            girdLayout.SetVerticalAlignment(1, 0, EVAlignment.VCenter);
            girdLayout.SetVerticalAlignment(2, 0, EVAlignment.VCenter);
            girdLayout.SetVerticalAlignment(3, 0, EVAlignment.VCenter);

            girdLayout.SetVerticalAlignment(0, 1, EVAlignment.VCenter);
            girdLayout.SetVerticalAlignment(1, 1, EVAlignment.VCenter);
            girdLayout.SetVerticalAlignment(2, 1, EVAlignment.VCenter);
            girdLayout.SetVerticalAlignment(3, 1, EVAlignment.VCenter);

            girdLayout.Right  = 16;
            girdLayout.Left   = 16;
            girdLayout.Top    = 8;
            girdLayout.Bottom = 8;
            girdLayout.Spacer = 4;

            closeButton  = new Button("Close");
            checkButton1 = new CheckButton("Check 1");
            checkButton2 = new CheckButton("Check 2");
            checkButton3 = new CheckButton("Check 3");
            radioGroup   = new RadioGroup();
            radioButton1 = new RadioButton("Radio 1", radioGroup);
            radioButton2 = new RadioButton("Radio 2", radioGroup);
            radioButton3 = new RadioButton("Radio 3", radioGroup);
            spacer       = new Spacer(ESpacerType.Fit);

            Add(checkButton1);
            Add(radioButton1);
            Add(checkButton2);
            Add(radioButton2);
            Add(checkButton3);
            Add(radioButton3);
            Add(spacer);
            Add(closeButton);
            Layout = girdLayout;

            Pack();

            closeButton.MouseReleasedEvent += new MouseReleasedHandler(closeButton_MouseReleasedEvent);
        }
        public MessageBox(string title)
            : base(title, 250, 250, 260, 180)
        {
            girdLayout = new GirdLayout(2, 2);

            // row. col
            girdLayout.SetHorizontalAlignment(0, 0, EHAlignment.HLeft);
            girdLayout.SetHorizontalAlignment(1, 0, EHAlignment.HRight);

            Layout = girdLayout;

            Resizable = false;
            Dragable  = true;
        }
        public TextNDropTestDialog()
            : base("TextField and DropList Test", 200, 200, 320, 200)
        {
            girdLayout        = new GirdLayout(4, 1);
            girdLayout.Right  = 16;
            girdLayout.Left   = 16;
            girdLayout.Top    = 8;
            girdLayout.Bottom = 8;
            girdLayout.Spacer = 4;

            girdLayout.SetHorizontalAlignment(1, 0, EHAlignment.HLeft);
            girdLayout.SetHorizontalAlignment(2, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(3, 0, EHAlignment.HRight);

            closeButton = new Button("Close");
            //textField=new TextField(160);
            dropList = new DropList();
            option1  = new DropListItem("Option one");
            option2  = new DropListItem("Option Two");
            option3  = new DropListItem("Option Three");
            dropList.Add(option1);
            dropList.Add(option2);
            dropList.Add(option3);

            textLabel   = new Label("Text input here:");
            optionLabel = new Label("Drop List test:");

            Layout = girdLayout;

            Add(textLabel);
            //Add(textField);
            Add(optionLabel);
            Add(dropList);
            Add(closeButton);

            Pack();

            closeButton.MouseReleasedEvent += new MouseReleasedHandler(closeButton_MouseReleasedEvent);
        }
        public ScrollPanelTestDialog()
            : base("Scroll Panel Test", 400, 400, 320, 240)
        {
            girdLayout        = new GirdLayout(2, 1);
            girdLayout.Right  = 16;
            girdLayout.Left   = 16;
            girdLayout.Top    = 8;
            girdLayout.Bottom = 8;
            girdLayout.Spacer = 4;

            girdLayout.SetHorizontalAlignment(1, 0, EHAlignment.HRight);

            closeButton = new Button("Close");
            panel       = new ScrollPanel();

            Layout = girdLayout;
            Add(panel);
            Add(closeButton);

            Pack();

            closeButton.MouseReleasedEvent += new MouseReleasedHandler(closeButton_MouseReleasedEvent);
        }
        public DialogTestDialog()
            : base("Dialog Test", 500, 500, 260, 180)
        {
            girdLayout = new GirdLayout(4, 1);

            girdLayout.SetHorizontalAlignment(0, 0, EHAlignment.HLeft);
            girdLayout.SetHorizontalAlignment(1, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(2, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(3, 0, EHAlignment.HRight);

            girdLayout.Right  = 16;
            girdLayout.Left   = 16;
            girdLayout.Top    = 8;
            girdLayout.Bottom = 8;
            girdLayout.Spacer = 4;

            closeButton = new Button("Close");
            //closeButton.HorizontalStyle = EElementStyle.Stretch;

            dragAble = new CheckButton("Dragable", true);
            SizeAble = new CheckButton("Resizable", true);

            label = new Label("This is a modal dialog.");

            Layout = girdLayout;

            Add(label);
            Add(dragAble);
            Add(SizeAble);
            Add(closeButton);

            Pack();

            closeButton.MouseReleasedEvent += new MouseReleasedHandler(closeButton_MouseReleasedEvent);
            dragAble.MousePressedEvent     += new MousePressedHandler(dragAble_MousePressedEvent);
            SizeAble.MousePressedEvent     += new MousePressedHandler(SizeAble_MousePressedEvent);
        }
Exemple #6
0
        public ProgressNSliderTestDialog()
            : base("Progress and Slider Test", 150, 150, 320, 200)
        {
            /*
             *          borderLayout=new BorderLayout(16,16,16,16,8);
             *          borderLayout.SouthHAlignment = EHorizontalAlignment.HRight;
             *
             *          closeButton=new Button("Close");
             *          closeButton.LayoutProperty = EArea.South;
             *
             *          valueLabel=new Label("Value:0%");
             *          valueLabel.LayoutProperty = EArea.North;
             *
             *          centerPanel=new Panel();
             *          centerGirdLayout=new GirdLayout(2,1);
             *          centerPanel.Layout = centerGirdLayout;
             *
             *          horizontalPBar=new ProgressBar(0.0f,100.0f,0.0f);
             *          horizontalSBar=new SlideBar(0.0f,100.0f,0.0f);
             *
             *          centerPanel.Add(horizontalPBar);
             *          centerPanel.Add(horizontalSBar);
             *          centerPanel.LayoutProperty = EArea.Center;
             *          centerPanel.Pack();
             *
             *          verticalPBar=new ProgressBar(0.0f,100.0f,0.0f, ETypeOrientation.Vertical);
             *          verticalSBar=new SlideBar(0.0f,100.0f,0.0f, ETypeOrientation.Vertical);
             *
             *          verticalPBar.LayoutProperty = EArea.East;
             * verticalSBar.LayoutProperty = EArea.East;
             *
             *          Add(closeButton);
             *          Add(valueLabel);
             *          Add(centerPanel);
             *          Add(verticalPBar);
             *          Add(verticalSBar);
             *
             *          Layout = borderLayout;
             *
             *          Pack();
             */

            girdLayout = new GirdLayout(4, 1);

            girdLayout.SetHorizontalAlignment(0, 0, EHAlignment.HLeft);
            girdLayout.SetHorizontalAlignment(1, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(2, 0, EHAlignment.HCenter);
            girdLayout.SetHorizontalAlignment(3, 0, EHAlignment.HRight);

            girdLayout.Right  = 16;
            girdLayout.Left   = 16;
            girdLayout.Top    = 8;
            girdLayout.Bottom = 8;
            girdLayout.Spacer = 4;

            closeButton = new Button("Close");
            closeButton.LayoutProperty = EArea.South;

            valueLabel = new Label("Value: 0%");
            valueLabel.LayoutProperty = EArea.North;

            horizontalPBar = new ProgressBar(0.0f, 100.0f, ETypeOrientation.Horizontal);
            horizontalSBar = new SlideBar(0.0f, 100.0f, ETypeOrientation.Horizontal);

            Button button1 = new Button("button1");
            Button button2 = new Button("button2");

            Add(valueLabel);
            Add(horizontalPBar);
            Add(horizontalSBar);
            //Add(button1);
            //Add(button2);
            Add(closeButton);

            Layout = girdLayout;

            Pack();

            horizontalSBar.Slider.DragMovedEvent += new DragMovedHandler(Slider_DragMovedEvent);
            closeButton.MouseReleasedEvent       += new MouseReleasedHandler(closeButton_MouseReleasedEvent);
        }
Exemple #7
0
        public MultipleLayoutTestDialog()
            : base("MultipleLayout Test", 350, 350, 400, 180)
        {
            girdLayout        = new GirdLayout(1, 2);
            girdLayout.Right  = 16;
            girdLayout.Left   = 16;
            girdLayout.Top    = 8;
            girdLayout.Bottom = 8;
            girdLayout.Spacer = 4;

            flowLayout = new FlowLayout(2, 2, 2, 2, 4);

            TheLabel = new Label("The");
            TheLabel.SetDrawBackground(true);

            quickLabel = new Label("quick");
            quickLabel.SetDrawBackground(true);

            brownLabel = new Label("brown");
            brownLabel.SetDrawBackground(true);

            foxLabel = new Label("Fox");
            foxLabel.SetDrawBackground(true);

            jumpsLabel = new Label("jumps");
            jumpsLabel.SetDrawBackground(true);

            overLabel = new Label("over");
            overLabel.SetDrawBackground(true);

            theLabel = new Label("a");
            theLabel.SetDrawBackground(true);

            lazyDogLabel = new Label("lazy dog.");
            lazyDogLabel.SetDrawBackground(true);

            flowPanel        = new Panel();
            flowPanel.Layout = flowLayout;
            flowPanel.Add(TheLabel);
            flowPanel.Add(quickLabel);
            flowPanel.Add(brownLabel);
            flowPanel.Add(foxLabel);
            flowPanel.Add(jumpsLabel);
            flowPanel.Add(overLabel);
            flowPanel.Add(theLabel);
            flowPanel.Add(lazyDogLabel);

            flowPanel.Pack();

            borderLayout = new BorderLayout(2, 2, 2, 2, 4);
            closeButton  = new Button("Close");
            closeButton.LayoutProperty = EArea.South;

            northLabel = new Label("North");
            northLabel.HorizontalStyle = EElementStyle.Stretch;
            northLabel.SetDrawBackground(true);
            northLabel.LayoutProperty = EArea.North;

            southLabel = new Label("South");
            southLabel.HorizontalStyle = EElementStyle.Stretch;
            southLabel.SetDrawBackground(true);
            southLabel.LayoutProperty = EArea.South;

            westLabel = new Label("West");
            westLabel.VerticalStyle = EElementStyle.Stretch;
            westLabel.SetDrawBackground(true);
            westLabel.LayoutProperty = EArea.West;

            eastLabel = new Label("East");
            eastLabel.VerticalStyle = EElementStyle.Stretch;
            eastLabel.SetDrawBackground(true);
            eastLabel.LayoutProperty = EArea.East;

            centerLabel = new Label("Center");
            centerLabel.HorizontalStyle = EElementStyle.Stretch;
            centerLabel.VerticalStyle   = EElementStyle.Stretch;
            centerLabel.SetDrawBackground(true);
            centerLabel.LayoutProperty = EArea.Center;

            borderPanel        = new Panel();
            borderPanel.Layout = borderLayout;

            borderPanel.Add(northLabel);
            borderPanel.Add(southLabel);
            borderPanel.Add(closeButton);
            borderPanel.Add(westLabel);
            borderPanel.Add(eastLabel);
            borderPanel.Add(centerLabel);

            borderPanel.Pack();

            Layout = girdLayout;
            Add(flowPanel);
            Add(borderPanel);
            Pack();

            closeButton.MouseReleasedEvent += new MouseReleasedHandler(closeButton_MouseReleasedEvent);
        }