コード例 #1
0
ファイル: CheckBox.cs プロジェクト: CrazyLiu00/GMap
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            Alt.GUI.Temporary.Gwen.Control.CheckBox check = new Alt.GUI.Temporary.Gwen.Control.CheckBox(this);
            check.SetPosition(10, 10);
            check.Checked      += OnChecked;
            check.UnChecked    += OnUnchecked;
            check.CheckChanged += OnCheckChanged;

            Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox labeled = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            labeled.Text          = "Labeled CheckBox";
            labeled.Checked      += OnChecked;
            labeled.UnChecked    += OnUnchecked;
            labeled.CheckChanged += OnCheckChanged;
            Alt.GUI.Temporary.Gwen.Align.PlaceDownLeft(labeled, check, 10);

            Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox labeled2 = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            labeled2.Text = "I'm autosized";
            labeled2.SizeToChildren();
            Alt.GUI.Temporary.Gwen.Align.PlaceDownLeft(labeled2, labeled, 10);

            Alt.GUI.Temporary.Gwen.Control.CheckBox check2 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(this);
            check2.IsDisabled = true;
            Alt.GUI.Temporary.Gwen.Align.PlaceDownLeft(check2, labeled2, 20);
        }
コード例 #2
0
ファイル: Example_Contour.cs プロジェクト: CrazyLiu00/GMap
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            //  Top Label
            Alt.GUI.Temporary.Gwen.Control.Label m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_TopLabel.AutoSizeToContents = true;
            m_TopLabel.Text      = "Contour Tool (GeometryContour) & Polygon Orientation";
            m_TopLabel.TextColor = Color.Yellow;
            m_TopLabel.Dock      = Pos.Top;
            m_TopLabel.Margin    = new Margin(0, 3, 0, 5);


            //  Width
            m_WidthSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_WidthSlider.Dock = Pos.Bottom;
            m_WidthSlider.SetSize(150, 20);
            m_WidthSlider.SetRange(-100, 100);
            m_WidthSlider.NotchCount    = (int)(m_WidthSlider.Max - m_WidthSlider.Min);
            m_WidthSlider.SnapToNotches = true;
            m_WidthSlider.ValueChanged += WidthSlider_ValueChanged;

            m_WidthSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_WidthSliderLabel.AutoSizeToContents = true;
            m_WidthSliderLabel.Dock   = Pos.Bottom;
            m_WidthSliderLabel.Margin = new Margin(0, 10, 0, 0);

            m_WidthSlider.Value = 0;


            //  AutoDetect
            m_AutoDetectCheckBox           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_AutoDetectCheckBox.Text      = "Autodetect orientation if not defined";
            m_AutoDetectCheckBox.Dock      = Pos.Bottom;
            m_AutoDetectCheckBox.IsChecked = true;
            m_AutoDetectCheckBox.Margin    = new Margin(0, 10, 0, 0);


            //  PolyCloseType
            m_PolyCloseTypeGroupBox                    = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(this, string.Empty);
            m_PolyCloseTypeGroupBox.Text               = "Polygon Close Type:";
            m_PolyCloseTypeGroupBox.Margin             = new Margin(0, 0, 0, 0);
            m_PolyCloseTypeGroupBox.Dock               = Pos.Bottom;
            m_PolyCloseTypeGroupBox.AutoSizeToContents = true;

            rbClose        = m_PolyCloseTypeGroupBox.AddOption("Close");
            rbClose.Margin = new Margin(0, 5, 0, 0);
            rbCloseCW      = m_PolyCloseTypeGroupBox.AddOption("Close CW");
            rbCloseCCW     = m_PolyCloseTypeGroupBox.AddOption("Close CCW");

            rbClose.Select();


            //
            m_FillBrush  = new SolidColorBrush(Color.LimeGreen * 1.2);
            m_ContourPen = new Pen(new ColorR(0.8, 0.2, 0.2), 2);
        }
コード例 #3
0
            public Example_BSpline_FlowGeometryContainer(Base parent)
                : base(parent)
            {
                ClientBackColor   = Color.FromArgb(50, Color.Black);
                DrawClientBorder  = true;
                ClientBorderColor = Color.DodgerBlue;


                //  Top Label
                m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
                m_TopLabel.AutoSizeToContents = true;
                m_TopLabel.Text      = "Transformed B-Spline";
                m_TopLabel.TextColor = Color.Yellow;
                m_TopLabel.Dock      = Pos.Top;
                m_TopLabel.Margin    = new Margin(0, 3, 0, 5);


                //  Flip
                m_Flip        = new Alt.GUI.Temporary.Gwen.Control.Button(this);
                m_Flip.Dock   = Pos.Bottom;
                m_Flip.Text   = "Flip";
                m_Flip.Click += new EventHandler(Flip_Click);
                m_Flip.Margin = new Margin(0, 5, 0, 0);


                //  PointsNumberSlider
                m_PointsNumberSlider = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
                //slider.SetPosition(10, 40);
                m_PointsNumberSlider.Dock = Pos.Bottom;
                m_PointsNumberSlider.SetSize(150, 20);
                m_PointsNumberSlider.SetRange(1, 40);
                m_PointsNumberSlider.NotchCount    = (int)(m_PointsNumberSlider.Max - m_PointsNumberSlider.Min);
                m_PointsNumberSlider.SnapToNotches = true;
                m_PointsNumberSlider.ValueChanged += PointsNumberSlider_ValueChanged;

                m_PointsNumberSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
                m_PointsNumberSliderLabel.AutoSizeToContents = true;
                m_PointsNumberSliderLabel.Dock   = Pos.Bottom;
                m_PointsNumberSliderLabel.Margin = new Margin(0, 3, 0, 0);

                m_PointsNumberSlider.Value = 30;


                //  CloseCheckBox
                m_CloseCheckBox        = new LabeledCheckBox(this);
                m_CloseCheckBox.Text   = "Close";
                m_CloseCheckBox.Dock   = Pos.Bottom;
                m_CloseCheckBox.Margin = new Margin(0, 7, 0, 0);


                //  Graphics
                m_BSplinePen = new Pen(Color.Cyan, 2);
            }
コード例 #4
0
        public Example_AForge_BlobsExplorer(Base parent)
            : base(parent)
        {
#if SILVERLIGHT || UNITY_WEBPLAYER
            Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            label.AutoSizeToContents = true;
            label.Text = //Description + "\n" + "(This example is not available in this Demo, please download SDK)";
                         "THIS EXAMPLE IS NOT AVAILABLE IN THIS DEMO,\nPLEASE DOWNLOAD AltGUI SDK";
            label.TextColor = Color.Orange * 1.2;
            label.Dock      = Pos.Top;
            label.Margin    = new Margin(0, 0, 0, 5);
            label.Font      = Example_NotAvailable_ScreenShot.Font;
#endif


            //  GUI
            {
                Alt.GUI.Temporary.Gwen.Control.StatusBar status = new Alt.GUI.Temporary.Gwen.Control.StatusBar(this);
                {
                    status.ShouldDrawBackground = false;

                    blobsCountLabel = new Alt.GUI.Temporary.Gwen.Control.Label(status);
                    blobsCountLabel.AutoSizeToContents = true;
                    status.AddControl(blobsCountLabel, false);
                }

                m_BottomPanel = new Alt.GUI.Temporary.Gwen.Control.Base(this);
                {
                    m_BottomPanel.Dock   = Pos.Bottom;
                    m_BottomPanel.Height = 210;
                }


                m_TopPanel = new Alt.GUI.Temporary.Gwen.Control.Base(this);
                {
                    m_TopPanel.Dock   = Pos.Top;
                    m_TopPanel.Height = 30;

                    highlightTypeCombo = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_TopPanel);
                    highlightTypeCombo.AddItem("Convex Hull").UserData      = 0;
                    highlightTypeCombo.AddItem("Left/Right Edges").UserData = 1;
                    highlightTypeCombo.AddItem("Top/Bottom Edges").UserData = 2;
                    highlightTypeCombo.AddItem("Quadrilateral").UserData    = 3;
                    highlightTypeCombo.Location      = new PointI(0, 0);
                    highlightTypeCombo.Width         = 133;
                    highlightTypeCombo.ItemSelected += new GwenEventHandler(highlightTypeCombo_SelectedIndexChanged);

                    showRectangleAroundSelectionCheck                 = new LabeledCheckBox(m_TopPanel);
                    showRectangleAroundSelectionCheck.Location        = new PointI(143, 1);
                    showRectangleAroundSelectionCheck.Text            = "Show rectangle around selection";
                    showRectangleAroundSelectionCheck.Width          += 10;
                    showRectangleAroundSelectionCheck.CheckedChanged += new System.EventHandler(showRectangleAroundSelectionCheck_CheckedChanged);
                }


                blobsBrowser              = new BlobsBrowser(this);
                blobsBrowser.Dock         = Pos.Fill;
                blobsBrowser.Highlighting = BlobsExplorer.BlobsBrowser.HightlightType.ConvexHull;
#if !SILVERLIGHT && !UNITY_WEBPLAYER
                blobsBrowser.BlobSelected += new BlobsExplorer.BlobSelectionHandler(blobsBrowser_BlobSelected);
#endif
            }
        }
コード例 #5
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            m_HtmlContainer                 = new HtmlContainer();
            m_HtmlContainer.Refresh        += OnRefresh;
            m_HtmlContainer.RenderError    += OnRenderError;
            m_HtmlContainer.StylesheetLoad += OnStylesheetLoad;
            m_HtmlContainer.ImageLoad      += OnImageLoad;


            //  FillBackground
            m_FillBackground               = new LabeledCheckBox(m_LeftPanel);
            m_FillBackground.Text          = "Fill Background";
            m_FillBackground.Dock          = Pos.Bottom;
            m_FillBackground.Margin        = new Margin(2, 10, 2, 0);
            m_FillBackground.IsChecked     = true;
            m_FillBackground.CheckChanged += new GwenEventHandler(FillBackground_CheckChanged);


#if !SILVERLIGHT
            //  AntiAlias Text
            m_AntiAliasText        = new LabeledCheckBox(m_LeftPanel);
            m_AntiAliasText.Text   = "AntiAlias Text";
            m_AntiAliasText.Dock   = Pos.Bottom;
            m_AntiAliasText.Margin = new Margin(2, 10, 2, 2);
            //m_AntiAliasText.IsChecked = true;
            m_AntiAliasText.CheckChanged += new GwenEventHandler(AntiAliasText_CheckChanged);
#endif


            //  Width
            m_WidthSlider      = new HorizontalSlider(m_RightPanel);
            m_WidthSlider.Dock = Pos.Bottom;
            m_WidthSlider.SetRange(200, 1000);
            m_WidthSlider.Height        = 20;
            m_WidthSlider.ValueChanged += new GwenEventHandler(WidthSlider_ValueChanged);

            m_WidthSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(m_RightPanel);
            m_WidthSliderLabel.AutoSizeToContents = true;
            m_WidthSliderLabel.Dock   = Pos.Bottom;
            m_WidthSliderLabel.Margin = new Margin(0, 10, 0, 0);


            //  Image
            Base imageMainPanel = new Base(m_RightPanel);
            imageMainPanel.Dock = Pos.Fill;


            m_ImageScrollControl        = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(imageMainPanel);
            m_ImageScrollControl.Margin = Margin.One;
            m_ImageScrollControl.Dock   = Pos.Fill;
            m_ImageScrollControl.EnableScroll(true, true);
            m_ImageScrollControl.AutoHideBars         = true;
            m_ImageScrollControl.ShouldDrawBackground = false;


            m_ImagePanel          = new Base(m_ImageScrollControl);
            m_ImagePanel.Margin   = Margin.Two;
            m_ImagePanel.Location = PointI.Zero;
            m_ImagePanel.Size     = new SizeI(100, 100);
            m_ImagePanel.Paint   += new GUI.PaintEventHandler(ImagePanel_Paint);
            m_ImagePanel.Hide();


            m_WidthSlider.Value = 500;


            SelectFirstExample();
        }
コード例 #6
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            //  GUI
            {
                m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
                m_TopLabel.AutoSizeToContents = true;
                m_TopLabel.Text      = "Left click the image to draw passages (white), right click the image to draw walls (black).";
                m_TopLabel.Dock      = Pos.Top;
                m_TopLabel.TextColor = Color.Yellow;
                m_TopLabel.Margin    = new Margin(0, 5, 0, 5);


                m_ControlsPanel       = new Alt.GUI.Temporary.Gwen.Control.Base(this);
                m_ControlsPanel.Width = 139;
                m_ControlsPanel.Dock  = Pos.Right;


                pbTerrain              = new Alt.GUI.Temporary.Gwen.Control.PictureBox(this);
                pbTerrain.Dock         = Pos.Fill;
                pbTerrain.ErrorImage   = null;
                pbTerrain.Image        = Bitmap.FromFile("AltData/AForge/FuzzyAGV_BG.gif");
                pbTerrain.InitialImage = null;
                pbTerrain.SizeMode     = PictureBoxSizeMode.Normal;            // AutoSize;
                pbTerrain.MouseMove   += new GUI.MouseEventHandler(pbTerrain_MouseMove);
                pbTerrain.MouseDown   += new GUI.MouseEventHandler(pbTerrain_MouseDown);


                int groupBox_dy = -10;
                groupBox1 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel);
                {
                    groupBox1.Location = new PointI(0, 0);
                    groupBox1.Name     = "groupBox1";
                    groupBox1.Size     = new SizeI(139, 83);
                    groupBox1.Text     = "Sensor readings:";


                    lbl    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox1);
                    label2 = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox1);
                    label1 = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox1);

                    lbl.Location           = new PointI(0, 54 + groupBox_dy);
                    lbl.AutoSizeToContents = true;
                    lbl.Text = "Right (pixels):";

                    label2.Location           = new PointI(0, 35 + groupBox_dy);
                    label2.AutoSizeToContents = true;
                    label2.Text = "Left (pixels):";

                    label1.Location           = new PointI(0, 16 + groupBox_dy);
                    label1.AutoSizeToContents = true;
                    label1.Text = "Frontal (pixels):";


                    txtRight = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox1);
                    txtLeft  = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox1);
                    txtFront = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox1);

                    txtRight.Location           = new PointI(100, 54 + groupBox_dy);
                    txtRight.AutoSizeToContents = true;
                    txtRight.Text      = "0";
                    txtRight.TextAlign = ContentAlignment.MiddleLeft;

                    txtLeft.Location           = new PointI(100, 35 + groupBox_dy);
                    txtLeft.AutoSizeToContents = true;
                    txtLeft.Text      = "0";
                    txtLeft.TextAlign = ContentAlignment.MiddleLeft;

                    txtFront.Location           = new PointI(100, 16 + groupBox_dy);
                    txtFront.AutoSizeToContents = true;
                    txtFront.Text      = "0";
                    txtFront.TextAlign = ContentAlignment.MiddleLeft;
                }

                groupBox2 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel);
                {
                    groupBox2.Location = new PointI(0, 94);
                    groupBox2.Size     = new SizeI(139, 45);
                    groupBox2.Text     = "Output:";


                    label3   = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                    txtAngle = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);

                    label3.Location           = new PointI(0, 16 + groupBox_dy);
                    label3.AutoSizeToContents = true;
                    label3.Text = "Angle (degrees):";

                    txtAngle.Location           = new PointI(98, 16 + groupBox_dy);
                    txtAngle.AutoSizeToContents = true;
                    txtAngle.Text      = "0,00";
                    txtAngle.TextAlign = ContentAlignment.MiddleLeft;
                }

                gbComandos = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel);
                {
                    gbComandos.Location = new PointI(0, 150);
                    gbComandos.Size     = new SizeI(139, 205);
                    gbComandos.Text     = "Tools:";


                    btnStep     = new Alt.GUI.Temporary.Gwen.Control.Button(gbComandos);
                    btnRun      = new Alt.GUI.Temporary.Gwen.Control.Button(gbComandos);
                    txtInterval = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(gbComandos);
                    cbLasers    = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(gbComandos);

                    cbTrajeto = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(gbComandos);
                    btnReset  = new Alt.GUI.Temporary.Gwen.Control.Button(gbComandos);
                    label4    = new Alt.GUI.Temporary.Gwen.Control.Label(gbComandos);

                    btnStep.Location        = new PointI(0, 109 + groupBox_dy);
                    btnStep.Size            = new SizeI(128, 23);
                    btnStep.Text            = "One Step";
                    btnStep.Click          += new System.EventHandler(button3_Click);
                    btnStep.NormalTextColor = Color.Blue;

                    btnRun.Location        = new PointI(0, 138 + groupBox_dy);
                    btnRun.Size            = new SizeI(128, 23);
                    btnRun.Text            = "Run";
                    btnRun.Click          += new System.EventHandler(btnRun_Click);
                    btnRun.NormalTextColor = Color.Green;

                    txtInterval.Location = new PointI(0, 83 + groupBox_dy);
                    txtInterval.Size     = new SizeI(127, 20);
                    txtInterval.Min      = 1;
                    txtInterval.Max      = 100;
                    txtInterval.Value    = 20;

                    cbLasers.IsChecked = true;
                    cbLasers.Location  = new PointI(0, 40 + groupBox_dy);
                    cbLasers.Text      = "Show Beams";

                    cbTrajeto.Location = new PointI(0, 16 + groupBox_dy);
                    cbTrajeto.Text     = "Track Path";

                    btnReset.Location        = new PointI(0, 167 + groupBox_dy);
                    btnReset.Size            = new SizeI(128, 23);
                    btnReset.Text            = "Restart";
                    btnReset.Click          += new System.EventHandler(btnReset_Click);
                    btnReset.NormalTextColor = Color.Red * 0.8;

                    label4.Location           = new PointI(0, 65 + groupBox_dy);
                    label4.AutoSizeToContents = true;
                    label4.Text = "Move Interval (ms):";
                }


                Bitmap robot = new Bitmap(10, 10);
                using (Graphics graphics = Graphics.FromImage(robot))
                {
                    graphics.FillCircle(Brushes.Blue, robot.PixelRectangle);
                }
                pbRobot       = new Alt.GUI.Temporary.Gwen.Control.PictureBox(pbTerrain);
                pbRobot.Image = robot;
                pbRobot.Size  = robot.PixelSize;
            }


            Angle       = 0;
            OriginalMap = new Bitmap(pbTerrain.Image);
            InitialMap  = new Bitmap(pbTerrain.Image);

            InitFuzzyEngine();
            FirstInference = true;
            pbRobot.Top    = InitialMap.PixelHeight - 55;
            pbRobot.Left   = 60;
            InitialPos     = pbRobot.Location;
            RunLabel       = btnRun.Text;
        }
コード例 #7
0
        void CreateUI2()
        {
            Base rightPanel = new Base(m_MainSplitter);

            rightPanel.Dock = Pos.Fill;
            //rightPanel.Margin = new Margin(0);
            m_MainSplitter.SetPanel(0, rightPanel);


            Alt.GUI.Temporary.Gwen.Control.Label label_TOP = new Alt.GUI.Temporary.Gwen.Control.Label(rightPanel);
            label_TOP.TextColor          = LabelColor;
            label_TOP.AutoSizeToContents = true;
            label_TOP.Text      = "GMap.NET Interactive Example (use right mouse button to pan map)";
            label_TOP.TextColor = Color.Yellow;
            label_TOP.Dock      = Pos.Top;
            label_TOP.Margin    = new Margin(0, 3, 0, 7);


            //  cache Tab
            Alt.GUI.Temporary.Gwen.Control.TabButton button = m_TabControl.AddPage("cache");
            Alt.GUI.Temporary.Gwen.Control.Base      page   = button.Page;
            {
                int btn_offset = 7;

                button2      = new Alt.GUI.Temporary.Gwen.Control.Button(page);
                button2.Text = "Clear tiles in disk cache";
                button2.Dock = Pos.Top;
                //  set top offset
                button2.Margin = new Margin(0, btn_offset, 0, 0);
                button2.Click += new EventHandler(button2_Click);


                //  memory cache usage
                Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text = "memory cache usage:";
                label.Dock = Pos.Top;
                //  set top offset
                label.Margin = new Margin(0, 12, 0, 2);

                textBoxMemory          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxMemory.ReadOnly = true;
                textBoxMemory.Dock     = Pos.Top;


                //  disk cache size
                label                    = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text               = "disk cache size:";
                label.Dock               = Pos.Top;
                //  set top offset
                label.Margin = new Margin(0, 12, 0, 2);

                textBoxCacheSize          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxCacheSize.ReadOnly = true;
                textBoxCacheSize.Dock     = Pos.Top;


                //  disk cache status
                label                    = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text               = "disk cache status:";
                label.Dock               = Pos.Top;
                //  set top offset
                label.Margin = new Margin(0, 12, 0, 2);

                textBoxCacheStatus          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxCacheStatus.ReadOnly = true;
                textBoxCacheStatus.Dock     = Pos.Top;


                //  cache routing/geocodig/etc
                checkBoxUseRouteCache           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(page);
                checkBoxUseRouteCache.TextColor = LabelColor;
                checkBoxUseRouteCache.UseCurrentColorAsNormal = true;
                checkBoxUseRouteCache.Text = "cache routing/geocodig/etc";
                checkBoxUseRouteCache.Dock = Pos.Top;
                //  set top offset
                checkBoxUseRouteCache.Margin    = new Margin(0, 14, 0, 0);
                checkBoxUseRouteCache.IsChecked = true;
            }
#if UNITY_WEBPLAYER
            button.Hide();
#endif


            //  info Tab
            button = m_TabControl.AddPage("info");
            page   = button.Page;
            {
                //  lat
                Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text = "lat:";
                label.Dock = Pos.Top;
                //  set top offset
                label.Margin = new Margin(0, 4, 0, 0);

                textBoxLatCurrent          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxLatCurrent.ReadOnly = true;
                textBoxLatCurrent.Dock     = Pos.Top;


                //  lng
                label                    = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text               = "lng:";
                label.Dock               = Pos.Top;

                textBoxLngCurrent          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxLngCurrent.ReadOnly = true;
                textBoxLngCurrent.Dock     = Pos.Top;


                //  zoom
                label                    = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text               = "zoom:";
                label.Dock               = Pos.Top;
                //  set top offset
                label.Margin = new Margin(0, 12, 0, 0);

                textBoxZoomCurrent          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxZoomCurrent.ReadOnly = true;
                textBoxZoomCurrent.Dock     = Pos.Top;


                //  markers
                label                    = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text               = "markers:";
                label.Dock               = Pos.Top;

                textBoxMarkerCount          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxMarkerCount.ReadOnly = true;
                textBoxMarkerCount.Dock     = Pos.Top;


                //  routes
                label                    = new Alt.GUI.Temporary.Gwen.Control.Label(page);
                label.TextColor          = LabelColor;
                label.AutoSizeToContents = true;
                label.Text               = "routes:";
                label.Dock               = Pos.Top;

                textBoxrouteCount          = new Alt.GUI.Temporary.Gwen.Control.TextBox(page);
                textBoxrouteCount.ReadOnly = true;
                textBoxrouteCount.Dock     = Pos.Top;
            }


            //  MAP
            MainMap      = new Map(rightPanel);
            MainMap.Dock = Pos.Fill;
            //MainMap.Margin = new Margin(1, 0, 1, 0);
            //MainMap.DrawClientBorder = true;
            MainMap.DrawBorder = true;


            //  Scale
            Base m_ScaleControl = new Base(MainMap);
            m_ScaleControl.SetBounds(10, 10, 20, 200);

            Alt.GUI.Temporary.Gwen.Control.Button plus = new Alt.GUI.Temporary.Gwen.Control.Button(m_ScaleControl);
            plus.Text   = "+";
            plus.Dock   = Pos.Top;
            plus.Click += new EventHandler(buttonZoomUp_Click);

            Alt.GUI.Temporary.Gwen.Control.Button minus = new Alt.GUI.Temporary.Gwen.Control.Button(m_ScaleControl);
            minus.Text   = "-";
            minus.Dock   = Pos.Bottom;
            minus.Click += new EventHandler(buttonZoomDown_Click);

            m_ScaleTrackBar               = new Alt.GUI.Temporary.Gwen.Control.VerticalSlider(m_ScaleControl);
            m_ScaleTrackBar.Dock          = Pos.Fill;
            m_ScaleTrackBar.ValueChanged += new GwenEventHandler(trackBar1_ValueChanged);
        }
コード例 #8
0
        void CreateUI1()
        {
            m_MainSplitter      = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(this);
            m_MainSplitter.Dock = Pos.Fill;


            m_TabControl = new Alt.GUI.Temporary.Gwen.Control.TabControl(m_MainSplitter);
            m_TabControl.SetBounds(0, 0, 220, 200);
            m_TabControl.Dock = Pos.Right;


            m_MainSplitter.SetPanel(1, m_TabControl);
            m_MainSplitter.SetHValue(0.73f);


            //  map Tab
            Alt.GUI.Temporary.Gwen.Control.TabButton button = m_TabControl.AddPage("map");
            Base page = button.Page;
            {
                m_Page_map_ScrollControl      = new ScrollControl(page);
                m_Page_map_ScrollControl.Dock = Pos.Fill;
                m_Page_map_ScrollControl.EnableScroll(false, true);
                m_Page_map_ScrollControl.AutoHideBars = true;

                m_Page_map_MainPanel = new Base(m_Page_map_ScrollControl);
                m_Page_map_MainPanel.SetBounds(0, 0, 100, 500);
                m_Page_map_MainPanel.Dock = Pos.Top;


                int btn_offset = 7;


                //  coordinates
                m_Page_map_GroupBox_coordinates                    = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel);
                m_Page_map_GroupBox_coordinates.TextColor          = LabelColor;
                m_Page_map_GroupBox_coordinates.Text               = "coordinates";
                m_Page_map_GroupBox_coordinates.Dock               = Pos.Top;
                m_Page_map_GroupBox_coordinates.AutoSizeToContents = true;
                {
                    //  lat
                    Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_coordinates);
                    label.TextColor          = LabelColor;
                    label.AutoSizeToContents = true;
                    label.Text = "lat:";
                    label.Dock = Pos.Top;
                    //  set top offset
                    label.Margin = new Margin(0, 5, 0, 2);

                    textBoxLat          = new Alt.GUI.Temporary.Gwen.Control.TextBox(m_Page_map_GroupBox_coordinates);
                    textBoxLat.ReadOnly = true;
                    textBoxLat.Dock     = Pos.Top;
                    textBoxLat.Text     = "54.6961334816182";


                    //  lng
                    label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_coordinates);
                    label.TextColor          = LabelColor;
                    label.AutoSizeToContents = true;
                    label.Text               = "lng:";
                    label.Dock               = Pos.Top;
                    label.Margin             = new Margin(0, 0, 0, 2);

                    textBoxLng          = new Alt.GUI.Temporary.Gwen.Control.TextBox(m_Page_map_GroupBox_coordinates);
                    textBoxLng.ReadOnly = true;
                    textBoxLng.Dock     = Pos.Top;
                    textBoxLng.Text     = "25.2985095977783";


                    //  goto
                    label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_coordinates);
                    label.TextColor          = LabelColor;
                    label.AutoSizeToContents = true;
                    label.Text               = "goto:";
                    label.Dock               = Pos.Top;
                    label.Margin             = new Margin(0, 0, 0, 2);

                    textBoxGeo          = new Alt.GUI.Temporary.Gwen.Control.TextBox(m_Page_map_GroupBox_coordinates);
                    textBoxGeo.ReadOnly = true;
                    textBoxGeo.Dock     = Pos.Top;
                    textBoxGeo.Text     = "lietuva vilnius";


                    //  GoTo
                    button8      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_coordinates);
                    button8.Text = "GoTo !";
                    button8.Dock = Pos.Top;
                    //  set top offset
                    button8.Margin = new Margin(0, btn_offset, 0, 0);
                    button8.Click += new EventHandler(button8_Click);


                    //  Reload
                    button1      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_coordinates);
                    button1.Text = "Reload";
                    button1.Dock = Pos.Top;
                    //  set top offset
                    button1.Margin = new Margin(0, btn_offset, 0, 0);
                    button1.Click += new EventHandler(button1_Click);
                }


                //  gmap
                m_Page_map_GroupBox_gmap                    = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel);
                m_Page_map_GroupBox_gmap.TextColor          = LabelColor;
                m_Page_map_GroupBox_gmap.Text               = "gmap";
                m_Page_map_GroupBox_gmap.Dock               = Pos.Top;
                m_Page_map_GroupBox_gmap.AutoSizeToContents = true;
                //  set top offset
                m_Page_map_GroupBox_gmap.Margin = new Margin(0, 10, 0, 0);
                {
                    //  type
                    Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_gmap);
                    label.TextColor          = LabelColor;
                    label.AutoSizeToContents = true;
                    label.Text = "type:";
                    label.Dock = Pos.Top;
                    //  set top offset
                    label.Margin = new Margin(0, 5, 0, 0);

                    comboBoxMapType      = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_Page_map_GroupBox_gmap);
                    comboBoxMapType.Dock = Pos.Top;


                    //  mode
                    label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_Page_map_GroupBox_gmap);
                    label.TextColor          = LabelColor;
                    label.AutoSizeToContents = true;
                    label.Text               = "mode:";
                    label.Dock               = Pos.Top;

                    comboBoxMode      = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_Page_map_GroupBox_gmap);
                    comboBoxMode.Dock = Pos.Top;
#if UNITY_WEBPLAYER || UNITY_5
                    comboBoxMode.Disable();
#endif


                    //  Current Marker
                    checkBoxCurrentMarker           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_gmap);
                    checkBoxCurrentMarker.TextColor = LabelColor;
                    checkBoxCurrentMarker.UseCurrentColorAsNormal = true;
                    checkBoxCurrentMarker.Text = "Current Marker";
                    checkBoxCurrentMarker.Dock = Pos.Top;
                    //  set top offset
                    checkBoxCurrentMarker.Margin          = new Margin(0, btn_offset, 0, 0);
                    checkBoxCurrentMarker.CheckedChanged += new EventHandler(checkBoxCurrentMarker_CheckedChanged);


                    //  Grid
                    checkBoxDebug           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_gmap);
                    checkBoxDebug.TextColor = LabelColor;
                    checkBoxDebug.UseCurrentColorAsNormal = true;
                    checkBoxDebug.Text = "Grid";
                    checkBoxDebug.Dock = Pos.Top;
                    //  set top offset
                    checkBoxDebug.Margin          = new Margin(0, btn_offset, 0, 0);
                    checkBoxDebug.CheckedChanged += new EventHandler(checkBoxDebug_CheckedChanged);


                    //  Drag Map
                    checkBoxCanDrag           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_gmap);
                    checkBoxCanDrag.TextColor = LabelColor;
                    checkBoxCanDrag.UseCurrentColorAsNormal = true;
                    checkBoxCanDrag.Text = "Drag Map (right mouse button)";
                    checkBoxCanDrag.Dock = Pos.Top;
                    //  set top offset
                    checkBoxCanDrag.Margin          = new Margin(0, btn_offset, 0, 0);
                    checkBoxCanDrag.CheckedChanged += new EventHandler(checkBoxCanDrag_CheckedChanged);
                }


                //  routing
                m_Page_map_GroupBox_routing                    = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel);
                m_Page_map_GroupBox_routing.TextColor          = LabelColor;
                m_Page_map_GroupBox_routing.Text               = "routing";
                m_Page_map_GroupBox_routing.Dock               = Pos.Top;
                m_Page_map_GroupBox_routing.AutoSizeToContents = true;
                //  set top offset
                m_Page_map_GroupBox_routing.Margin = new Margin(0, 10, 0, 0);
                {
                    //  set Start
                    buttonSetStart      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing);
                    buttonSetStart.Text = "set Start";
                    buttonSetStart.Dock = Pos.Top;
                    //  set top offset
                    buttonSetStart.Margin = new Margin(0, 7, 0, 0);
                    buttonSetStart.Click += new EventHandler(buttonSetStart_Click);


                    //  set End
                    buttonSetEnd      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing);
                    buttonSetEnd.Text = "set End";
                    buttonSetEnd.Dock = Pos.Top;
                    //  set top offset
                    buttonSetEnd.Margin = new Margin(0, btn_offset, 0, 0);
                    buttonSetEnd.Click += new EventHandler(buttonSetEnd_Click);


                    //  Add Route
                    button3      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing);
                    button3.Text = "Add Route";
                    button3.Dock = Pos.Top;
                    //  set top offset
                    button3.Margin = new Margin(0, btn_offset, 0, 10);
                    button3.Click += new EventHandler(button3_Click);


                    //  Clear Routes
                    button6      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing);
                    button6.Text = "Clear Routes";
                    button6.Dock = Pos.Top;
                    //  set top offset
                    button6.Margin = new Margin(0, btn_offset, 0, 0);
                    button6.Click += new EventHandler(button6_Click);


                    //  Clear Polygons
                    button15      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_routing);
                    button15.Text = "Clear Polygons";
                    button15.Dock = Pos.Top;
                    //  set top offset
                    button15.Margin = new Margin(0, btn_offset, 0, 0);
                    button15.Click += new EventHandler(button15_Click);
                }


                //  markers
                m_Page_map_GroupBox_markers                    = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_Page_map_MainPanel);
                m_Page_map_GroupBox_markers.TextColor          = LabelColor;
                m_Page_map_GroupBox_markers.Text               = "markers";
                m_Page_map_GroupBox_markers.Dock               = Pos.Top;
                m_Page_map_GroupBox_markers.AutoSizeToContents = true;
                //  set top offset
                m_Page_map_GroupBox_markers.Margin = new Margin(0, 10, 0, 0);
                {
                    //  Add Marker
                    button4      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_markers);
                    button4.Text = "Add Marker";
                    button4.Dock = Pos.Top;
                    //  set top offset
                    button4.Margin = new Margin(0, 7, 0, 0);
                    button4.Click += new EventHandler(button4_Click);


                    //  place info
                    checkBoxPlacemarkInfo           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_Page_map_GroupBox_markers);
                    checkBoxPlacemarkInfo.TextColor = LabelColor;
                    checkBoxPlacemarkInfo.UseCurrentColorAsNormal = true;
                    checkBoxPlacemarkInfo.Text = "place info";
                    checkBoxPlacemarkInfo.Dock = Pos.Top;
                    //  set top offset
                    checkBoxPlacemarkInfo.Margin    = new Margin(0, btn_offset, 0, 0);
                    checkBoxPlacemarkInfo.IsChecked = true;


                    //  Zoom Center
                    button7      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_markers);
                    button7.Text = "Zoom Center";
                    button7.Dock = Pos.Top;
                    //  set top offset
                    button7.Margin = new Margin(0, btn_offset, 0, 0);
                    button7.Click += new EventHandler(button7_Click);


                    //  Clear All
                    button5      = new Alt.GUI.Temporary.Gwen.Control.Button(m_Page_map_GroupBox_markers);
                    button5.Text = "Clear All";
                    button5.Dock = Pos.Top;
                    //  set top offset
                    button5.Margin = new Margin(0, btn_offset, 0, 0);
                    button5.Click += new EventHandler(button5_Click);
                }
            }
        }
コード例 #9
0
        public Example_AltNETType_Outline_Transformations(Base parent)
            : base(parent)
        {
            //  OutlineThicknessSlider
            m_OutlineThicknessSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_OutlineThicknessSlider.Dock = Pos.Bottom;
            m_OutlineThicknessSlider.SetSize(150, 20);
            m_OutlineThicknessSlider.SetRange(0.5f, 3);
            m_OutlineThicknessSlider.ValueChanged += OutlineThicknessSlider_ValueChanged;

            m_OutlineThicknessSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_OutlineThicknessSliderLabel.AutoSizeToContents = true;
            m_OutlineThicknessSliderLabel.Dock   = Pos.Bottom;
            m_OutlineThicknessSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_OutlineThicknessSlider.Value = 0.6f;


            //  OutlineCheckBox
            m_OutlineCheckBox               = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_OutlineCheckBox.Margin        = new Margin(0, 5, 0, 0);
            m_OutlineCheckBox.Text          = "Outline";
            m_OutlineCheckBox.Dock          = Pos.Bottom;
            m_OutlineCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  FillCheckBox
            m_FillCheckBox               = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_FillCheckBox.Margin        = new Margin(0, 5, 0, 0);
            m_FillCheckBox.Text          = "Fill";
            m_FillCheckBox.Dock          = Pos.Bottom;
            m_FillCheckBox.IsChecked     = true;
            m_FillCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Faux Italic
            m_AuxItalicSlider      = new HorizontalSlider(this);
            m_AuxItalicSlider.Dock = Pos.Bottom;
            m_AuxItalicSlider.SetRange(-1.5f, 1.5f);
            m_AuxItalicSlider.Height        = 20;
            m_AuxItalicSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_AuxItalicSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_AuxItalicSliderLabel.AutoSizeToContents = true;
            m_AuxItalicSliderLabel.Dock   = Pos.Bottom;
            m_AuxItalicSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_AuxItalicSlider.Value = 0;


            //  Interval
            m_IntervalSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_IntervalSlider.Dock = Pos.Bottom;
            m_IntervalSlider.SetRange(-5, 5);
            m_IntervalSlider.Height        = 20;
            m_IntervalSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_IntervalSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_IntervalSliderLabel.AutoSizeToContents = true;
            m_IntervalSliderLabel.Dock   = Pos.Bottom;
            m_IntervalSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_IntervalSlider.Value = 0;


            //  Faux Weight
            m_AuxWeightSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_AuxWeightSlider.Dock = Pos.Bottom;
            m_AuxWeightSlider.SetRange(-0.2f, 1);
            m_AuxWeightSlider.Height        = 20;
            m_AuxWeightSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_AuxWeightSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_AuxWeightSliderLabel.AutoSizeToContents = true;
            m_AuxWeightSliderLabel.Dock   = Pos.Bottom;
            m_AuxWeightSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_AuxWeightSlider.Value = 0;


            //  Width
            m_WidthSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_WidthSlider.Dock = Pos.Bottom;
            m_WidthSlider.SetRange(0.75f, 1.25f);
            m_WidthSlider.Height        = 20;
            m_WidthSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_WidthSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_WidthSliderLabel.AutoSizeToContents = true;
            m_WidthSliderLabel.Dock   = Pos.Bottom;
            m_WidthSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_WidthSlider.Value = 1;


            //  Font Scale (Height)
            m_HeightSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_HeightSlider.Dock = Pos.Bottom;
            m_HeightSlider.SetRange(0.5f, 2);
            m_HeightSlider.Height        = 20;
            m_HeightSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_HeightSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_HeightSliderLabel.AutoSizeToContents = true;
            m_HeightSliderLabel.Dock   = Pos.Bottom;
            m_HeightSliderLabel.Margin = new Margin(0, 5, 0, 0);

            m_HeightSlider.Value = 1;


            //  m_Hinting
            m_HintingCheckBox               = new LabeledCheckBox(this);
            m_HintingCheckBox.Margin        = new Margin(0, 5, 0, 0);
            m_HintingCheckBox.Dock          = Pos.Bottom;
            m_HintingCheckBox.Text          = "Hinting";
            m_HintingCheckBox.IsChecked     = true;
            m_HintingCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Kerning
            m_KerningCheckBox               = new LabeledCheckBox(this);
            m_KerningCheckBox.Margin        = new Margin(0, 5, 0, 0);
            m_KerningCheckBox.Dock          = Pos.Bottom;
            m_KerningCheckBox.Text          = "Kerning";
            m_KerningCheckBox.IsChecked     = true;
            m_KerningCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Invert
            m_InvertCheckBox               = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_InvertCheckBox.Margin        = new Margin(0, 10, 0, 0);
            m_InvertCheckBox.Dock          = Pos.Bottom;
            m_InvertCheckBox.Text          = "Invert";
            m_InvertCheckBox.IsChecked     = false;
            m_InvertCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Font
            CreateFontPanel();
        }
コード例 #10
0
        public VectorText_TransformedCurve2(Base parent)
            : base(parent)
        {
            //  Top Label
            Alt.GUI.Temporary.Gwen.Control.Label TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            TopLabel.AutoSizeToContents = true;
            TopLabel.Text      = "Non-linear \"Along-A-Curve\" Double Path Transformer";
            TopLabel.TextColor = Color.Yellow;
            TopLabel.Dock      = Pos.Top;
            TopLabel.Margin    = new Margin(0, 3, 0, 5);


            //  OutlineThicknessSlider
            m_OutlineThicknessSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_OutlineThicknessSlider.Dock = Pos.Bottom;
            m_OutlineThicknessSlider.SetSize(150, 20);
            m_OutlineThicknessSlider.SetRange(0.5f, 3);
            m_OutlineThicknessSlider.ValueChanged += OutlineThicknessSlider_ValueChanged;

            m_OutlineThicknessSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_OutlineThicknessSliderLabel.AutoSizeToContents = true;
            m_OutlineThicknessSliderLabel.Dock   = Pos.Bottom;
            m_OutlineThicknessSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_OutlineThicknessSlider.Value = 0.7f;


            //  OutlineCheckBox
            m_OutlineCheckBox      = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_OutlineCheckBox.Text = "Outline";
            m_OutlineCheckBox.Dock = Pos.Bottom;


            //  FillCheckBox
            m_FillCheckBox           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_FillCheckBox.Text      = "Fill";
            m_FillCheckBox.Dock      = Pos.Bottom;
            m_FillCheckBox.IsChecked = true;



            //  PointsNumberSlider
            m_PointsNumberSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_PointsNumberSlider.Dock = Pos.Bottom;
            m_PointsNumberSlider.SetSize(150, 20);
            m_PointsNumberSlider.SetRange(10, 400);
            m_PointsNumberSlider.NotchCount    = (int)(m_PointsNumberSlider.Max - m_PointsNumberSlider.Min);
            m_PointsNumberSlider.SnapToNotches = true;
            m_PointsNumberSlider.ValueChanged += PointsNumberSlider_ValueChanged;

            m_PointsNumberSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_PointsNumberSliderLabel.AutoSizeToContents = true;
            m_PointsNumberSliderLabel.Dock   = Pos.Bottom;
            m_PointsNumberSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_PointsNumberSlider.Value = 200;


            //  PreserveXScaleCheckBox
            m_PreserveXScaleCheckBox           = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_PreserveXScaleCheckBox.Text      = "Preserve X scale";
            m_PreserveXScaleCheckBox.Dock      = Pos.Bottom;
            m_PreserveXScaleCheckBox.IsChecked = true;


            //  FixedLenCheckBox
            m_FixedLenCheckBox      = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_FixedLenCheckBox.Text = "Fixed Length";
            m_FixedLenCheckBox.Dock = Pos.Bottom;


            //  AnimateCheckBox
            m_AnimateCheckBox               = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this);
            m_AnimateCheckBox.Text          = "Animate";
            m_AnimateCheckBox.Dock          = Pos.Bottom;
            m_AnimateCheckBox.CheckChanged += new GwenEventHandler(AnimateCheckBox_CheckChanged);
            m_AnimateCheckBox.Margin        = new Margin(0, 7, 0, 0);
        }
コード例 #11
0
        public Example_AltNETType_SimpleFontCacheManager(Base parent)
            : base(parent)
        {
            //  OutlineThicknessSlider
            m_OutlineThicknessSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_OutlineThicknessSlider.Dock = Pos.Bottom;
            m_OutlineThicknessSlider.SetSize(150, 20);
            m_OutlineThicknessSlider.SetRange(0.5f, 3);
            m_OutlineThicknessSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_OutlineThicknessSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_OutlineThicknessSliderLabel.AutoSizeToContents = true;
            m_OutlineThicknessSliderLabel.Dock   = Pos.Bottom;
            m_OutlineThicknessSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_OutlineThicknessSlider.Value = 0.9f;


            //  Width
            m_WidthSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_WidthSlider.Dock = Pos.Bottom;
            m_WidthSlider.SetRange(8, 72);
            m_WidthSlider.NotchCount    = (int)(m_WidthSlider.Max - m_WidthSlider.Min);
            m_WidthSlider.SnapToNotches = true;
            m_WidthSlider.Height        = 20;
            m_WidthSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_WidthSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_WidthSliderLabel.AutoSizeToContents = true;
            m_WidthSliderLabel.Dock   = Pos.Bottom;
            m_WidthSliderLabel.Margin = new Margin(0, 3, 0, 0);

            m_WidthSlider.Value = 48;


            //  Height
            m_HeightSlider      = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this);
            m_HeightSlider.Dock = Pos.Bottom;
            m_HeightSlider.SetRange(8, 72);
            m_HeightSlider.NotchCount    = (int)(m_HeightSlider.Max - m_HeightSlider.Min);
            m_HeightSlider.SnapToNotches = true;
            m_HeightSlider.Height        = 20;
            m_HeightSlider.ValueChanged += new GwenEventHandler(control_ValueChanged);

            m_HeightSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_HeightSliderLabel.AutoSizeToContents = true;
            m_HeightSliderLabel.Dock   = Pos.Bottom;
            m_HeightSliderLabel.Margin = new Margin(0, 5, 0, 0);

            m_HeightSlider.Value = m_WidthSlider.Value;


            //  m_Hinting
            m_HintingCheckBox               = new LabeledCheckBox(this);
            m_HintingCheckBox.Margin        = new Margin(0, 5, 0, 0);
            m_HintingCheckBox.Dock          = Pos.Bottom;
            m_HintingCheckBox.Text          = "Hinting";
            m_HintingCheckBox.IsChecked     = true;
            m_HintingCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Kerning
            m_KerningCheckBox               = new LabeledCheckBox(this);
            m_KerningCheckBox.Margin        = new Margin(0, 5, 0, 0);
            m_KerningCheckBox.Dock          = Pos.Bottom;
            m_KerningCheckBox.Text          = "Kerning";
            m_KerningCheckBox.IsChecked     = true;
            m_KerningCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Invert
            m_InvertCheckBox               = new LabeledCheckBox(this);
            m_InvertCheckBox.Margin        = new Margin(0, 10, 0, 0);
            m_InvertCheckBox.Dock          = Pos.Bottom;
            m_InvertCheckBox.Text          = "Invert";
            m_InvertCheckBox.IsChecked     = false;
            m_InvertCheckBox.CheckChanged += new GwenEventHandler(control_CheckChanged);


            //  Font
            CreateFontPanel();
        }
コード例 #12
0
        public Example_AForge_2DOrganizing(Base parent)
            : base(parent)
        {
            //  GUI
            {
                m_RightPanel = new Alt.GUI.Temporary.Gwen.Control.Base(this);
                {
                    m_RightPanel.Dock   = Pos.Right;
                    m_RightPanel.Width  = 140;
                    m_RightPanel.Margin = new Margin(5, 0, 0, 0);

                    groupBox2 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_RightPanel);
                    {
                        groupBox2.Location = new PointI(0, 0);
                        groupBox2.Size     = new SizeI(140, 287);
                        groupBox2.Text     = "Neural Network";


                        Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        label.Location           = new PointI(0, 10);
                        label.AutoSizeToContents = true;
                        label.Text = "Size:";

                        sizeBox          = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox2);
                        sizeBox.Location = new PointI(0, 30);
                        sizeBox.Width    = 130;

                        label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        label.Location           = new PointI(0, 50);
                        label.AutoSizeToContents = true;
                        label.Text               = "(neurons count = size * size)";


                        label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        label.Location           = new PointI(0, 80);
                        label.AutoSizeToContents = true;
                        label.Text               = "Iteraions:";

                        iterationsBox          = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox2);
                        iterationsBox.Location = new PointI(0, 100);
                        iterationsBox.Width    = 130;

                        label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        label.Location           = new PointI(0, 125);
                        label.AutoSizeToContents = true;
                        label.Text               = "Initial learning rate:";

                        rateBox          = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox2);
                        rateBox.Location = new PointI(0, 145);
                        rateBox.Width    = 130;

                        label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        label.Location           = new PointI(0, 170);
                        label.AutoSizeToContents = true;
                        label.Text               = "Initial radius:";

                        radiusBox          = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox2);
                        radiusBox.Location = new PointI(0, 190);
                        radiusBox.Width    = 130;


                        label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        label.Location           = new PointI(0, 225);
                        label.AutoSizeToContents = true;
                        label.Text               = "Current iteration:";

                        currentIterationBox          = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox2);
                        currentIterationBox.Location = new PointI(0, 245);
                        currentIterationBox.Width    = 130;
                        currentIterationBox.ReadOnly = true;
                    }


                    startButton = new Alt.GUI.Temporary.Gwen.Control.Button(m_RightPanel);
                    stopButton  = new Alt.GUI.Temporary.Gwen.Control.Button(m_RightPanel);

                    startButton.Location        = new PointI(5, 315);
                    startButton.Width           = 130;
                    startButton.Text            = "Start";
                    startButton.Click          += new System.EventHandler(startButton_Click);
                    startButton.NormalTextColor = Color.Green;

                    stopButton.Enabled         = false;
                    stopButton.Location        = new PointI(5, 340);
                    stopButton.Width           = 130;
                    stopButton.Text            = "Stop";
                    stopButton.Click          += new System.EventHandler(stopButton_Click);
                    stopButton.NormalTextColor = Color.Red * 0.8;


                    Alt.GUI.Temporary.Gwen.Control.VerticalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(this);
                    {
                        splitter.Dock = Pos.Fill;
                        splitter.SetHValue(0.5);


                        Alt.GUI.Temporary.Gwen.Control.Base leftPanel = new Alt.GUI.Temporary.Gwen.Control.Base(splitter);
                        {
                            leftPanel.Dock = Pos.Fill;

                            m_TopPanel1 = new Base(leftPanel);
                            {
                                m_TopPanel1.Dock   = Pos.Top;
                                m_TopPanel1.Height = 70;

                                Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_TopPanel1);
                                label.Location           = new PointI(0, 2);
                                label.AutoSizeToContents = true;
                                label.TextColor          = Color.LightPink;
                                label.Text = "Points";


                                generateButton                    = new Alt.GUI.Temporary.Gwen.Control.Button(m_TopPanel1);
                                generateButton.Location           = new PointI(0, 25);
                                generateButton.Text               = "Generate";
                                generateButton.AutoSizeToContents = true;
                                generateButton.Click             += new System.EventHandler(generateButton_Click);
                                generateButton.NormalTextColor    = Color.Blue;
                            }


                            pointsPanel                 = new Base(leftPanel);
                            pointsPanel.Dock            = Pos.Fill;
                            pointsPanel.Paint          += new GUI.PaintEventHandler(this.pointsPanel_Paint);
                            pointsPanel.ClientBackColor = Color.White;
                            pointsPanel.DrawBorder      = true;
                            pointsPanel.BorderColor     = Color.DodgerBlue;


                            splitter.SetPanel(0, leftPanel);
                        }


                        Base rightPanel = new Base(splitter);
                        {
                            rightPanel.Dock = Pos.Fill;

                            m_TopPanel2 = new Base(rightPanel);
                            {
                                m_TopPanel2.Dock   = Pos.Top;
                                m_TopPanel2.Height = 70;

                                Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_TopPanel2);
                                label.Location           = new PointI(0, 2);
                                label.AutoSizeToContents = true;
                                label.TextColor          = Color.LightPink;
                                label.Text = "Map";


                                showConnectionsCheck                 = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_TopPanel2);
                                showConnectionsCheck.Location        = new PointI(0, 23);
                                showConnectionsCheck.Text            = "Show Connections";
                                showConnectionsCheck.IsChecked       = true;
                                showConnectionsCheck.CheckedChanged += new System.EventHandler(this.showConnectionsCheck_CheckedChanged);

                                showInactiveCheck                 = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_TopPanel2);
                                showInactiveCheck.Location        = new PointI(0, 45);
                                showInactiveCheck.Text            = "Show Inactive Neurons";
                                showInactiveCheck.IsChecked       = true;
                                showInactiveCheck.CheckedChanged += new System.EventHandler(this.showInactiveCheck_CheckedChanged);
                            }


                            mapPanel                 = new Base(rightPanel);
                            mapPanel.Dock            = Pos.Fill;
                            mapPanel.Paint          += new GUI.PaintEventHandler(this.mapPanel_Paint);
                            mapPanel.ClientBackColor = Color.White;
                            mapPanel.DrawBorder      = true;
                            mapPanel.BorderColor     = Color.DodgerBlue;


                            splitter.SetPanel(1, rightPanel);
                        }
                    }
                }
            }
        }
コード例 #13
0
ファイル: UnitTest.cs プロジェクト: CrazyLiu00/GMap
        public UnitTest(Base parent, bool showStatusBar) :
            base(parent)
        {
            Dock = Alt.GUI.Temporary.Gwen.Pos.Fill;
            //NoNeed    SetSize(1024, 768);

            m_List = new CollapsibleList(this);
            m_List.ShouldCacheToTexture = true;

            LeftDock.TabControl.AddPage("Unit tests", m_List);
            LeftDock.Width = 150;

            m_TextOutput = new Alt.GUI.Temporary.Gwen.Control.ListBox(BottomDock);
            m_TextOutput.ShouldCacheToTexture = true;

            m_Button = BottomDock.TabControl.AddPage("Output", m_TextOutput);
            m_Button.ShouldCacheToTexture = true;
            BottomDock.Height             = 120;

            m_StatusBar      = new Alt.GUI.Temporary.Gwen.Control.StatusBar(this);
            m_StatusBar.Dock = Alt.GUI.Temporary.Gwen.Pos.Bottom;
            //m_StatusBar.ShouldCacheToTexture = true;
            m_StatusBar.IsHidden = !showStatusBar;

            m_DebugCheck               = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_StatusBar);
            m_DebugCheck.Text          = "Debug outlines";
            m_DebugCheck.CheckChanged += DebugCheckChanged;
            m_StatusBar.AddControl(m_DebugCheck, true);

            m_Center      = new Center(this);
            m_Center.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill;
            GUnit test;

            bool cat_ShouldCacheToTexture = false;

            {
                CollapsibleCategory cat = m_List.Add("Non-Interactive");
                {
                    test = new GUnit_Label(m_Center);
                    RegisterUnitTest("Label", cat, test);
                    test = new GUnit_RichLabel(m_Center);
                    RegisterUnitTest("RichLabel", cat, test);
                    test = new GUnit_GroupBox(m_Center);
                    RegisterUnitTest("GroupBox", cat, test);
                    test = new GUnit_ProgressBar(m_Center);
                    RegisterUnitTest("ProgressBar", cat, test);
                    test = new GUnit_ImagePanel(m_Center);
                    RegisterUnitTest("ImagePanel", cat, test);
                    test = new GUnit_StatusBar(m_Center);
                    RegisterUnitTest("StatusBar", cat, test);
                }
                cat.ShouldCacheToTexture = cat_ShouldCacheToTexture;
            }

            {
                CollapsibleCategory cat = m_List.Add("Standard");
                {
                    test = new GUnit_Button(m_Center);
                    RegisterUnitTest("Button", cat, test);
                    test = new GUnit_TextBox(m_Center);
                    RegisterUnitTest("TextBox", cat, test);
                    test = new GUnit_CheckBox(m_Center);
                    RegisterUnitTest("CheckBox", cat, test);
                    test = new GUnit_RadioButton(m_Center);
                    RegisterUnitTest("RadioButton", cat, test);
                    test = new GUnit_ComboBox(m_Center);
                    RegisterUnitTest("ComboBox", cat, test);
                    test = new GUnit_ListBox(m_Center);
                    RegisterUnitTest("ListBox", cat, test);
                    test = new GUnit_NumericUpDown(m_Center);
                    RegisterUnitTest("NumericUpDown", cat, test);
                    test = new GUnit_Slider(m_Center);
                    RegisterUnitTest("Slider", cat, test);
                    test = new GUnit_MenuStrip(m_Center);
                    RegisterUnitTest("MenuStrip", cat, test);
                    test = new GUnit_CrossSplitter(m_Center);
                    RegisterUnitTest("CrossSplitter", cat, test);
                }
                cat.ShouldCacheToTexture = cat_ShouldCacheToTexture;
            }

            {
                CollapsibleCategory cat = m_List.Add("Containers");
                {
                    test = new GUnit_Window(m_Center);
                    RegisterUnitTest("Window", cat, test);
                    test = new GUnit_TreeControl(m_Center);
                    RegisterUnitTest("TreeControl", cat, test);
                    test = new GUnit_Properties(m_Center);
                    RegisterUnitTest("Properties", cat, test);
                    test = new GUnit_TabControl(m_Center);
                    RegisterUnitTest("TabControl", cat, test);
                    test = new GUnit_ScrollControl(m_Center);
                    RegisterUnitTest("ScrollControl", cat, test);
                    test = new GUnit_Docking(m_Center);
                    RegisterUnitTest("Docking", cat, test);
                }
                cat.ShouldCacheToTexture = cat_ShouldCacheToTexture;
            }

            {
                CollapsibleCategory cat = m_List.Add("Non-standard");
                {
                    test = new GUnit_CollapsibleList(m_Center);
                    RegisterUnitTest("CollapsibleList", cat, test);
                    test = new GUnit_ColorPickers(m_Center);
                    RegisterUnitTest("Color pickers", cat, test);
                    test = new GUnit_PictureBox(m_Center);
                    RegisterUnitTest("PictureBox", cat, test);
                }
                cat.ShouldCacheToTexture = cat_ShouldCacheToTexture;
            }

            m_StatusBar.SendToBack();
            PrintText("AltGUI.Temporary.Gwen Unit Test started!");
        }
コード例 #14
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            //  Opacity
            m_OpacityPlusButton        = new Alt.GUI.Temporary.Gwen.Control.Button(m_OpacityControl);
            m_OpacityPlusButton.Text   = "+";
            m_OpacityPlusButton.Dock   = Pos.Top;
            m_OpacityPlusButton.Click += new EventHandler(OpacityPlusButton_Click);

            m_OpacityMinusButton        = new Alt.GUI.Temporary.Gwen.Control.Button(m_OpacityControl);
            m_OpacityMinusButton.Text   = "-";
            m_OpacityMinusButton.Dock   = Pos.Bottom;
            m_OpacityMinusButton.Click += new EventHandler(OpacityMinusButton_Click);

            m_OpacitySlider      = new Alt.GUI.Temporary.Gwen.Control.VerticalSlider(m_OpacityControl);
            m_OpacitySlider.Dock = Pos.Fill;
            m_OpacitySlider.SetRange(0.05f, 1);
            m_OpacitySlider.Value = 1;


            //  Scale
            m_ScaleControl = new Alt.GUI.Temporary.Gwen.Control.Base(m_DrawingPanel);
            m_ScaleControl.SetBounds(10, 30, 20, 200);

            m_ScalePlusButton        = new Alt.GUI.Temporary.Gwen.Control.Button(m_ScaleControl);
            m_ScalePlusButton.Text   = "+";
            m_ScalePlusButton.Dock   = Pos.Top;
            m_ScalePlusButton.Click += new EventHandler(ScalePlusButton_Click);

            m_ScaleMinusButton        = new Alt.GUI.Temporary.Gwen.Control.Button(m_ScaleControl);
            m_ScaleMinusButton.Text   = "-";
            m_ScaleMinusButton.Dock   = Pos.Bottom;
            m_ScaleMinusButton.Click += new EventHandler(ScaleMinusButton_Click);

            m_ScaleSlider      = new Alt.GUI.Temporary.Gwen.Control.VerticalSlider(m_ScaleControl);
            m_ScaleSlider.Dock = Pos.Fill;
            m_ScaleSlider.SetRange(0.3f, 5);
            m_ScaleSlider.Value = 1;


            //  Rotate
            m_RotateControl = new Alt.GUI.Temporary.Gwen.Control.Base(m_DrawingPanel);
            m_RotateControl.SetBounds(30, 10, 200, 20);

            m_RotatePlusButton        = new Alt.GUI.Temporary.Gwen.Control.Button(m_RotateControl);
            m_RotatePlusButton.Text   = "+";
            m_RotatePlusButton.Dock   = Pos.Right;
            m_RotatePlusButton.Width  = m_RotateControl.Height;
            m_RotatePlusButton.Click += new EventHandler(RotatePlusButton_Click);

            m_RotateMinusButton        = new Alt.GUI.Temporary.Gwen.Control.Button(m_RotateControl);
            m_RotateMinusButton.Text   = "-";
            m_RotateMinusButton.Dock   = Pos.Left;
            m_RotateMinusButton.Width  = m_RotateControl.Height;
            m_RotateMinusButton.Click += new EventHandler(RotateMinusButton_Click);

            m_RotateSlider      = new HorizontalSlider(m_RotateControl);
            m_RotateSlider.Dock = Pos.Fill;
            m_RotateSlider.SetRange(-180, 180);
            m_RotateSlider.Value = 0;


            //  Magnification
            m_MagnificationSlider      = new HorizontalSlider(this);
            m_MagnificationSlider.Dock = Pos.Bottom;
            m_MagnificationSlider.SetRange(0.01f, 4);
            m_MagnificationSlider.ValueChanged += new GwenEventHandler(MagnificationSlider_ValueChanged);
            m_MagnificationSlider.Height        = 20;
            m_MagnificationSlider.Margin        = new Margin(0, 3, 0, 0);

            m_MagnificationLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_MagnificationLabel.AutoSizeToContents = true;
            m_MagnificationLabel.Dock = Pos.Bottom;

            m_MagnificationSlider.Value = 3.2f;


            //  Radius
            m_RadiusSlider      = new HorizontalSlider(this);
            m_RadiusSlider.Dock = Pos.Bottom;
            m_RadiusSlider.SetRange(10, 200);
            m_RadiusSlider.ValueChanged += new GwenEventHandler(RadiusSlider_ValueChanged);
            m_RadiusSlider.Height        = 20;
            m_RadiusSlider.Margin        = new Margin(0, 3, 0, 0);

            m_RadiusLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            m_RadiusLabel.AutoSizeToContents = true;
            m_RadiusLabel.Dock   = Pos.Bottom;
            m_RadiusLabel.Margin = new Margin(0, 10, 0, 0);

            m_RadiusSlider.Value = 100;


            //  Sight
            m_ShowSightCheckBox               = new LabeledCheckBox(this);
            m_ShowSightCheckBox.Dock          = Pos.Bottom;
            m_ShowSightCheckBox.Text          = "Show Sight";
            m_ShowSightCheckBox.Margin        = new Margin(0, 3, 0, 0);
            m_ShowSightCheckBox.IsChecked     = true;
            m_ShowSightCheckBox.CheckChanged += new GwenEventHandler(ShowSightCheckBox_CheckChanged);



            m_OpacitySlider.ValueChanged       += new GwenEventHandler(Slider_ValueChanged);
            m_ScaleSlider.ValueChanged         += new GwenEventHandler(Slider_ValueChanged);
            m_RotateSlider.ValueChanged        += new GwenEventHandler(Slider_ValueChanged);
            m_MagnificationSlider.ValueChanged += new GwenEventHandler(Slider_ValueChanged);
            m_RadiusSlider.ValueChanged        += new GwenEventHandler(Slider_ValueChanged);
            //  Preview
            m_OpacitySlider.ValueChanged += new GwenEventHandler(RotateAndOpacity_Slider_ValueChanged);
            m_RotateSlider.ValueChanged  += new GwenEventHandler(RotateAndOpacity_Slider_ValueChanged);



            //
            m_RadiusPen = new Pen(
                Color.FromArgb(0.7, Color.LimeGreen * 1.2),
                //Color.FromArgb(0.7, Color.Red),
                3);



            //
            m_SVGPath = new SVGPath();

            m_x        = m_DrawingPanel.ClientWidth / 2;
            m_y        = m_DrawingPanel.ClientHeight / 2;
            m_dx       = 0.0;
            m_dy       = 0.0;
            m_DragFlag = false;


            try
            {
                LoadSVG("AltData/SVG/tiger.svg");
            }
            catch (SVGException)
            {
                //TEMP  message(.ToString(e.Message));

                return;
            }
        }
コード例 #15
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            Alt.GUI.Temporary.Gwen.Control.Label label;
#if SILVERLIGHT || UNITY_WEBPLAYER
            label = new Alt.GUI.Temporary.Gwen.Control.Label(this);
            label.AutoSizeToContents = true;
            label.Text = //Description + "\n" + "(This example is not available in this Demo, please download SDK)";
                         "THIS EXAMPLE IS NOT AVAILABLE IN THIS DEMO,\nPLEASE DOWNLOAD AltGUI SDK";
            label.TextColor = Color.Orange * 1.2;
            label.Dock      = Pos.Top;
            label.Margin    = new Margin(0, 0, 0, 5);
            label.Font      = Example_NotAvailable_ScreenShot.Font;
#endif


            //  GUI
            {
                m_TopPanel = new Base(this);
                {
                    m_TopPanel.Dock   = Pos.Top;
                    m_TopPanel.Height = 30;

                    label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_TopPanel);
                    label.Location           = new PointI(0, 2);
                    label.AutoSizeToContents = true;
                    label.TextColor          = Color.LightGreen;
                    label.Text               = "Map";


                    label1            = new Alt.GUI.Temporary.Gwen.Control.Label(m_TopPanel);
                    citiesCountBox    = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_TopPanel);
                    generateMapButton = new Alt.GUI.Temporary.Gwen.Control.Button(m_TopPanel);

                    label1.Location           = new PointI(33, 2);
                    label1.Text               = "Cities:";
                    label1.AutoSizeToContents = true;

                    citiesCountBox.Location  = new PointI(75, 1);
                    citiesCountBox.Width     = 50;
                    citiesCountBox.Min       = 5;
                    citiesCountBox.Max       = 50;
                    citiesCountBox.Increment = 10;

                    generateMapButton.Location           = new PointI(135, 0);
                    generateMapButton.Text               = "Generate";
                    generateMapButton.AutoSizeToContents = true;
                    generateMapButton.Click             += new System.EventHandler(generateMapButton_Click);
                    generateMapButton.NormalTextColor    = Color.Blue;
                }


                m_RightPanel = new Base(this);
                {
                    m_RightPanel.Dock   = Pos.Right;
                    m_RightPanel.Width  = 140;
                    m_RightPanel.Margin = new Margin(5, 0, 0, 0);

                    groupBox2 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_RightPanel);
                    {
                        groupBox2.Location = new PointI(0, 0);
                        groupBox2.Size     = new SizeI(140, 223);
                        groupBox2.Text     = "Settings";

                        greedyCrossoverBox = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(groupBox2);
                        label5             = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        iterationsBox      = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox2);
                        label4             = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        selectionBox       = new Alt.GUI.Temporary.Gwen.Control.ComboBox(groupBox2);
                        label3             = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);
                        populationSizeBox  = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox2);
                        label2             = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox2);


                        label2.Location           = new PointI(0, 10);
                        label2.AutoSizeToContents = true;
                        label2.Text = "Population size:";

                        populationSizeBox.Location  = new PointI(0, 30);
                        populationSizeBox.Width     = 130;
                        populationSizeBox.Min       = 10;
                        populationSizeBox.Max       = 100;
                        populationSizeBox.Increment = 10;


                        label3.Location           = new PointI(0, 60);
                        label3.AutoSizeToContents = true;
                        label3.Text = "Selection method:";

                        selectionBox.AddItem("Elite").UserData    = 0;
                        selectionBox.AddItem("Rank").UserData     = 1;
                        selectionBox.AddItem("Roulette").UserData = 2;
                        selectionBox.Location = new PointI(0, 80);
                        selectionBox.Width    = 130;


                        greedyCrossoverBox.Location = new PointI(0, 115);
                        greedyCrossoverBox.Text     = "Greedy crossover";


                        label4.Location = new PointI(0, 145);
                        label4.Size     = new SizeI(60, 16);
                        label4.Text     = "Iterations:";

                        iterationsBox.Location  = new PointI(0, 165);
                        iterationsBox.Width     = 130;
                        iterationsBox.Min       = 0;
                        iterationsBox.Max       = 100000;
                        iterationsBox.Increment = 100;

                        label5.Location           = new PointI(0, 185);
                        label5.AutoSizeToContents = true;
                        label5.Text = "( 0 - inifinity )";
                    }


                    groupBox3 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_RightPanel);
                    {
                        groupBox3.Location = new PointI(0, 230);
                        groupBox3.Size     = new SizeI(140, 122);
                        groupBox3.Text     = "Current iteration";

                        pathLengthBox       = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox3);
                        label7              = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox3);
                        currentIterationBox = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox3);
                        label6              = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox3);


                        label6.Location           = new PointI(0, 10);
                        label6.AutoSizeToContents = true;
                        label6.Text = "Iteration:";

                        currentIterationBox.Location = new PointI(0, 30);
                        currentIterationBox.ReadOnly = true;
                        currentIterationBox.Width    = 130;
                        currentIterationBox.Text     = "";


                        label7.Location           = new PointI(0, 60);
                        label7.AutoSizeToContents = true;
                        label7.Text = "Path length:";

                        pathLengthBox.Location = new PointI(0, 80);
                        pathLengthBox.ReadOnly = true;
                        pathLengthBox.Width    = 130;
                        pathLengthBox.Text     = "";
                    }


                    startButton = new Alt.GUI.Temporary.Gwen.Control.Button(m_RightPanel);
                    stopButton  = new Alt.GUI.Temporary.Gwen.Control.Button(m_RightPanel);

                    startButton.Location        = new PointI(5, 370);
                    startButton.Width           = 130;
                    startButton.Text            = "Start";
                    startButton.Click          += new System.EventHandler(startButton_Click);
                    startButton.NormalTextColor = Color.Green;

                    stopButton.Enabled         = false;
                    stopButton.Location        = new PointI(5, 395);
                    stopButton.Width           = 130;
                    stopButton.Text            = "Stop";
                    stopButton.Click          += new System.EventHandler(stopButton_Click);
                    stopButton.NormalTextColor = Color.Red * 0.8;
                }


                mapControl      = new Chart(this);
                mapControl.Dock = Pos.Fill;
            }


            // set up map control
            mapControl.RangeX = new Range(0, 1000);
            mapControl.RangeY = new Range(0, 1000);
            mapControl.AddDataSeries("map", Color.Red, Chart.SeriesType.Dots, 5, false);
            mapControl.AddDataSeries("path", Color.Blue, Chart.SeriesType.Line, 1, false);


            //
            greedyCrossoverBox.IsChecked = greedyCrossover;
            UpdateSettings();
            GenerateMap();
        }
コード例 #16
0
ファイル: Example_PieChart.cs プロジェクト: CrazyLiu00/GMap
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);


            m_panelDrawing = new PieChartControl(this);
            //m_panelDrawing.DoubleBuffered = false;
            m_panelDrawing.Dock            = Pos.Fill;
            m_panelDrawing.ClientBackColor = Color.FromArgb(0, 128, 128, 128);// Color.Transparent;// WhiteSmoke;
            m_panelDrawing.TextColor       = Color.Black;
            //m_panelDrawing.DrawBorder = true;
            //m_panelDrawing.BorderColor = Color.DodgerBlue;
            m_panelDrawing.Margin   = new Margin(8, 8, 8, 8);
            m_panelDrawing.ToolTips = null;


            groupBox6          = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel);
            groupBox6.Location = new PointI(8, 8);
            groupBox6.Size     = new SizeI(320, 248);
            groupBox6.Text     = "Pie slices";

            int inGroupBoxOffset   = -12;
            int numericUpDownWidth = 45;

            Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6);
            label.Location           = new PointI(32, 20 + inGroupBoxOffset);
            label.Text               = "Value";
            label.TextAlign          = ContentAlignment.MiddleLeft;
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6);
            label.Location           = new PointI(80, 20 + inGroupBoxOffset);
            label.Text               = "Offset";
            label.TextAlign          = ContentAlignment.MiddleLeft;
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6);
            label.Location           = new PointI(128, 20 + inGroupBoxOffset);
            label.Text               = "Color";
            label.TextAlign          = ContentAlignment.MiddleCenter;
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6);
            label.Location           = new PointI(168, 20 + inGroupBoxOffset);
            label.Text               = "Text";
            label.TextAlign          = ContentAlignment.MiddleLeft;
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6);
            label.Location           = new PointI(248, 20 + inGroupBoxOffset);
            label.Text               = "ToolTip";
            label.TextAlign          = ContentAlignment.MiddleLeft;
            label.AutoSizeToContents = true;



            int checkBoxOffset = 4;

            checkBox1                 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6);
            checkBox1.IsChecked       = true;
            checkBox1.Location        = new PointI(8, 38 + inGroupBoxOffset + checkBoxOffset);
            checkBox1.CheckedChanged += new System.EventHandler(checkBox1_CheckedChanged);

            checkBox2                 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6);
            checkBox2.IsChecked       = true;
            checkBox2.Location        = new PointI(8, 73 + inGroupBoxOffset + checkBoxOffset);
            checkBox2.CheckedChanged += new System.EventHandler(checkBox2_CheckedChanged);

            checkBox3                 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6);
            checkBox3.IsChecked       = true;
            checkBox3.Location        = new PointI(8, 108 + inGroupBoxOffset + checkBoxOffset);
            checkBox3.CheckedChanged += new System.EventHandler(checkBox3_CheckedChanged);

            checkBox4                 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6);
            checkBox4.IsChecked       = true;
            checkBox4.Location        = new PointI(8, 143 + inGroupBoxOffset + checkBoxOffset);
            checkBox4.CheckedChanged += new System.EventHandler(checkBox4_CheckedChanged);

            checkBox5                 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6);
            checkBox5.IsChecked       = true;
            checkBox5.Location        = new PointI(8, 178 + inGroupBoxOffset + checkBoxOffset);
            checkBox5.CheckedChanged += new System.EventHandler(checkBox5_CheckedChanged);

            checkBox6                 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6);
            checkBox6.IsChecked       = true;
            checkBox6.Location        = new PointI(8, 213 + inGroupBoxOffset + checkBoxOffset);
            checkBox6.CheckedChanged += new System.EventHandler(checkBox6_CheckedChanged);


            numericUpDownValue1               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownValue1.Width         = numericUpDownWidth;
            numericUpDownValue1.Location      = new PointI(32, 40 + inGroupBoxOffset);
            numericUpDownValue1.Value         = 10;
            numericUpDownValue1.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged);

            numericUpDownValue2               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownValue2.Width         = numericUpDownWidth;
            numericUpDownValue2.Location      = new PointI(32, 75 + inGroupBoxOffset);
            numericUpDownValue2.Value         = 15;
            numericUpDownValue2.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged);

            numericUpDownValue3               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownValue3.Width         = numericUpDownWidth;
            numericUpDownValue3.Location      = new PointI(32, 110 + inGroupBoxOffset);
            numericUpDownValue3.Value         = 20;
            numericUpDownValue3.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged);

            numericUpDownValue4               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownValue4.Width         = numericUpDownWidth;
            numericUpDownValue4.Location      = new PointI(32, 145 + inGroupBoxOffset);
            numericUpDownValue4.Value         = 60;
            numericUpDownValue4.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged);

            numericUpDownValue5               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownValue5.Width         = numericUpDownWidth;
            numericUpDownValue5.Location      = new PointI(32, 180 + inGroupBoxOffset);
            numericUpDownValue5.Value         = 25;
            numericUpDownValue5.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged);

            numericUpDownValue6               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownValue6.Width         = numericUpDownWidth;
            numericUpDownValue6.Location      = new PointI(32, 215 + inGroupBoxOffset);
            numericUpDownValue6.Value         = 25;
            numericUpDownValue6.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged);


            numericUpDownDisplacement1               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownDisplacement1.Width         = numericUpDownWidth;
            numericUpDownDisplacement1.DecimalPlaces = 2;
            numericUpDownDisplacement1.Increment     = 0.05f;
            numericUpDownDisplacement1.Location      = new PointI(80, 40 + inGroupBoxOffset);
            numericUpDownDisplacement1.Maximum       = 1;
            numericUpDownDisplacement1.Minimum       = 0;
            numericUpDownDisplacement1.Value         = 0.2f;
            numericUpDownDisplacement1.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged);

            numericUpDownDisplacement2               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownDisplacement2.Width         = numericUpDownWidth;
            numericUpDownDisplacement2.DecimalPlaces = 2;
            numericUpDownDisplacement2.Increment     = 0.05f;
            numericUpDownDisplacement2.Location      = new PointI(80, 75 + inGroupBoxOffset);
            numericUpDownDisplacement2.Maximum       = 1;
            numericUpDownDisplacement2.Minimum       = 0;
            numericUpDownDisplacement2.Value         = 0.05f;
            numericUpDownDisplacement2.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged);

            numericUpDownDisplacement3               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownDisplacement3.Width         = numericUpDownWidth;
            numericUpDownDisplacement3.DecimalPlaces = 2;
            numericUpDownDisplacement3.Increment     = 0.05f;
            numericUpDownDisplacement3.Location      = new PointI(80, 110 + inGroupBoxOffset);
            numericUpDownDisplacement3.Maximum       = 1;
            numericUpDownDisplacement3.Minimum       = 0;
            numericUpDownDisplacement3.Value         = 0.05f;
            numericUpDownDisplacement3.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged);

            numericUpDownDisplacement4               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownDisplacement4.Width         = numericUpDownWidth;
            numericUpDownDisplacement4.DecimalPlaces = 2;
            numericUpDownDisplacement4.Increment     = 0.05f;
            numericUpDownDisplacement4.Location      = new PointI(80, 145 + inGroupBoxOffset);
            numericUpDownDisplacement4.Maximum       = 1;
            numericUpDownDisplacement4.Minimum       = 0;
            numericUpDownDisplacement4.Value         = 0.05f;
            numericUpDownDisplacement4.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged);

            numericUpDownDisplacement5               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownDisplacement5.Width         = numericUpDownWidth;
            numericUpDownDisplacement5.DecimalPlaces = 2;
            numericUpDownDisplacement5.Increment     = 0.05f;
            numericUpDownDisplacement5.Location      = new PointI(80, 180 + inGroupBoxOffset);
            numericUpDownDisplacement5.Maximum       = 1;
            numericUpDownDisplacement5.Minimum       = 0;
            numericUpDownDisplacement5.Value         = 0.05f;
            numericUpDownDisplacement5.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged);

            numericUpDownDisplacement6               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6);
            numericUpDownDisplacement6.Width         = numericUpDownWidth;
            numericUpDownDisplacement6.DecimalPlaces = 2;
            numericUpDownDisplacement6.Increment     = 0.05f;
            numericUpDownDisplacement6.Location      = new PointI(80, 215 + inGroupBoxOffset);
            numericUpDownDisplacement6.Maximum       = 1;
            numericUpDownDisplacement6.Minimum       = 0;
            numericUpDownDisplacement6.Value         = 0.05f;
            numericUpDownDisplacement6.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged);


            buttonColor1          = new ColorButton(groupBox6);
            buttonColor1.Color    = Color.Red;
            buttonColor1.Location = new PointI(136, 40 + inGroupBoxOffset);
            buttonColor1.Size     = new SizeI(20, 20);
            buttonColor1.Click   += new System.EventHandler(buttonColor1_Click);

            buttonColor2          = new ColorButton(groupBox6);
            buttonColor2.Color    = Color.LimeGreen;
            buttonColor2.Location = new PointI(136, 75 + inGroupBoxOffset);
            buttonColor2.Size     = new SizeI(20, 20);
            buttonColor2.Click   += new System.EventHandler(buttonColor2_Click);

            buttonColor3          = new ColorButton(groupBox6);
            buttonColor3.Color    = Color.Blue;
            buttonColor3.Location = new PointI(136, 110 + inGroupBoxOffset);
            buttonColor3.Size     = new SizeI(20, 20);
            buttonColor3.Click   += new System.EventHandler(buttonColor3_Click);

            buttonColor4          = new ColorButton(groupBox6);
            buttonColor4.Color    = Color.Yellow;
            buttonColor4.Location = new PointI(136, 145 + inGroupBoxOffset);
            buttonColor4.Size     = new SizeI(20, 20);
            buttonColor4.Click   += new System.EventHandler(buttonColor4_Click);

            buttonColor5          = new ColorButton(groupBox6);
            buttonColor5.Color    = Color.Firebrick;
            buttonColor5.Location = new PointI(136, 180 + inGroupBoxOffset);
            buttonColor5.Size     = new SizeI(20, 20);
            buttonColor5.Click   += new System.EventHandler(buttonColor5_Click);

            buttonColor6          = new ColorButton(groupBox6);
            buttonColor6.Color    = Color.DeepSkyBlue;
            buttonColor6.Location = new PointI(136, 215 + inGroupBoxOffset);
            buttonColor6.Size     = new SizeI(20, 20);
            buttonColor6.Click   += new System.EventHandler(buttonColor6_Click);


            textBoxText1              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxText1.Location     = new PointI(168, 40 + inGroupBoxOffset);
            textBoxText1.Size         = new SizeI(72, 20);
            textBoxText1.Text         = "red";
            textBoxText1.TextChanged += new GwenEventHandler(textBoxText_TextChanged);

            textBoxText2              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxText2.Location     = new PointI(168, 75 + inGroupBoxOffset);
            textBoxText2.Size         = new SizeI(72, 20);
            textBoxText2.Text         = "green";
            textBoxText2.TextChanged += new GwenEventHandler(textBoxText_TextChanged);

            textBoxText3              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxText3.Location     = new PointI(168, 110 + inGroupBoxOffset);
            textBoxText3.Size         = new SizeI(72, 20);
            textBoxText3.Text         = "blue";
            textBoxText3.TextChanged += new GwenEventHandler(textBoxText_TextChanged);

            textBoxText4              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxText4.Location     = new PointI(168, 145 + inGroupBoxOffset);
            textBoxText4.Size         = new SizeI(72, 20);
            textBoxText4.Text         = "yellow";
            textBoxText4.TextChanged += new GwenEventHandler(textBoxText_TextChanged);

            textBoxText5              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxText5.Location     = new PointI(168, 180 + inGroupBoxOffset);
            textBoxText5.Size         = new SizeI(72, 20);
            textBoxText5.Text         = "brown";
            textBoxText5.TextChanged += new GwenEventHandler(textBoxText_TextChanged);

            textBoxText6              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxText6.Location     = new PointI(168, 215 + inGroupBoxOffset);
            textBoxText6.Size         = new SizeI(72, 20);
            textBoxText6.Text         = "cyan";
            textBoxText6.TextChanged += new GwenEventHandler(textBoxText_TextChanged);


            textBoxToolTip1              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxToolTip1.Location     = new PointI(248, 40 + inGroupBoxOffset);
            textBoxToolTip1.Size         = new SizeI(64, 20);
            textBoxToolTip1.Text         = "";
            textBoxToolTip1.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged);

            textBoxToolTip2              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxToolTip2.Location     = new PointI(248, 75 + inGroupBoxOffset);
            textBoxToolTip2.Size         = new SizeI(64, 20);
            textBoxToolTip2.Text         = "";
            textBoxToolTip2.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged);

            textBoxToolTip3              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxToolTip3.Location     = new PointI(248, 110 + inGroupBoxOffset);
            textBoxToolTip3.Size         = new SizeI(64, 20);
            textBoxToolTip3.Text         = "";
            textBoxToolTip3.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged);

            textBoxToolTip4              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxToolTip4.Location     = new PointI(248, 145 + inGroupBoxOffset);
            textBoxToolTip4.Size         = new SizeI(64, 20);
            textBoxToolTip4.Text         = "";
            textBoxToolTip4.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged);

            textBoxToolTip5              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxToolTip5.Location     = new PointI(248, 180 + inGroupBoxOffset);
            textBoxToolTip5.Size         = new SizeI(64, 20);
            textBoxToolTip5.Text         = "";
            textBoxToolTip5.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged);

            textBoxToolTip6              = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6);
            textBoxToolTip6.Location     = new PointI(248, 215 + inGroupBoxOffset);
            textBoxToolTip6.Size         = new SizeI(64, 20);
            textBoxToolTip6.Text         = "";
            textBoxToolTip6.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged);



            groupBox4          = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel);
            groupBox4.Location = new PointI(336, 8);
            groupBox4.Size     = new SizeI(248, 72);
            groupBox4.Text     = "Margins";

            inGroupBoxOffset = -15;


            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4);
            label.Location           = new PointI(12, 22 + inGroupBoxOffset);
            label.Size               = new SizeI(40, 16);
            label.Text               = "Left:";
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4);
            label.Location           = new PointI(12, 46 + inGroupBoxOffset);
            label.Size               = new SizeI(40, 16);
            label.Text               = "Right:";
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4);
            label.Location           = new PointI(132, 22 + inGroupBoxOffset);
            label.Size               = new SizeI(40, 16);
            label.Text               = "Top:";
            label.AutoSizeToContents = true;

            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4);
            label.Location           = new PointI(132, 46 + inGroupBoxOffset);
            label.Size               = new SizeI(44, 16);
            label.Text               = "Bottom:";
            label.AutoSizeToContents = true;


            numericUpDownLeftMargin               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4);
            numericUpDownLeftMargin.Location      = new PointI(64, 20 + inGroupBoxOffset);
            numericUpDownLeftMargin.Maximum       = 20;
            numericUpDownLeftMargin.Size          = new SizeI(48, 20);
            numericUpDownLeftMargin.Value         = 10;
            numericUpDownLeftMargin.ValueChanged += new GwenEventHandler(numericUpDownLeftMargin_ValueChanged);

            numericUpDownRightMargin               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4);
            numericUpDownRightMargin.Location      = new PointI(64, 44 + inGroupBoxOffset);
            numericUpDownRightMargin.Maximum       = 20;
            numericUpDownRightMargin.Size          = new SizeI(48, 20);
            numericUpDownRightMargin.Value         = 10;
            numericUpDownRightMargin.ValueChanged += new GwenEventHandler(numericUpDownRightMargin_ValueChanged);

            numericUpDownTopMargin               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4);
            numericUpDownTopMargin.Location      = new PointI(188, 20 + inGroupBoxOffset);
            numericUpDownTopMargin.Maximum       = 20;
            numericUpDownTopMargin.Size          = new SizeI(48, 20);
            numericUpDownTopMargin.Value         = 10;
            numericUpDownTopMargin.ValueChanged += new GwenEventHandler(numericUpDownTopMargin_ValueChanged);

            numericUpDownBottomMargin               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4);
            numericUpDownBottomMargin.Location      = new PointI(188, 44 + inGroupBoxOffset);
            numericUpDownBottomMargin.Maximum       = 20;
            numericUpDownBottomMargin.Size          = new SizeI(48, 20);
            numericUpDownBottomMargin.Value         = 10;
            numericUpDownBottomMargin.ValueChanged += new GwenEventHandler(numericUpDownBottomMargin_ValueChanged);



            checkBoxFitChart                 = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_ControlsPanel);
            checkBoxFitChart.Location        = new PointI(336, 88);
            checkBoxFitChart.Text            = "Fit chart to panel";
            checkBoxFitChart.CheckedChanged += new System.EventHandler(checkBoxFitChart_CheckedChanged);



            groupBox1          = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(m_ControlsPanel, "Shadow style");
            groupBox1.Location = new PointI(485, 95); //84);
            groupBox1.Size     = new SizeI(104, 62);  //82);


            radioButtonShadowStyleNone                 = groupBox1.AddOption("None");
            radioButtonShadowStyleNone.Tag             = "";
            radioButtonShadowStyleNone.CheckedChanged += new System.EventHandler(radioButtonShadowStyle_Changed);

            radioButtonShadowStyleUniform = groupBox1.AddOption("Uniform");
            radioButtonShadowStyleUniform.Select();
            radioButtonShadowStyleUniform.Tag             = "";
            radioButtonShadowStyleUniform.CheckedChanged += new System.EventHandler(radioButtonShadowStyle_Changed);

            /*TEMP
             * radioButtonShadowStyleGradual = groupBox1.AddOption("Gradual");
             * //radioButtonShadowStyleGradual.Select();
             * radioButtonShadowStyleGradual.Tag = "";
             * radioButtonShadowStyleGradual.CheckedChanged += new System.EventHandler(radioButtonShadowStyle_Changed);*/



            numericUpDownPieHeight = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel);
            numericUpDownPieHeight.DecimalPlaces = 2;
            numericUpDownPieHeight.Increment     = 0.05f;
            numericUpDownPieHeight.Location      = new PointI(408, 114);
            numericUpDownPieHeight.Maximum       = 0.5f;
            numericUpDownPieHeight.Size          = new SizeI(48, 20);
            numericUpDownPieHeight.Value         = 0.25f;
            numericUpDownPieHeight.ValueChanged += new GwenEventHandler(numericUpDownPieHeight_ValueChanged);


            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel);
            label.Location           = new PointI(336, 116);
            label.Size               = new SizeI(72, 16);
            label.Text               = "Pie Height:";
            label.TextAlign          = ContentAlignment.MiddleLeft;
            label.AutoSizeToContents = true;


            numericUpDownAngle               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel);
            numericUpDownAngle.Increment     = 10;
            numericUpDownAngle.Location      = new PointI(408, 144);
            numericUpDownAngle.Maximum       = 400;
            numericUpDownAngle.Minimum       = -360;
            numericUpDownAngle.Size          = new SizeI(48, 20);
            numericUpDownAngle.Value         = -30;
            numericUpDownAngle.ValueChanged += new GwenEventHandler(numericUpDownAngle_ValueChanged);


            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel);
            label.Location           = new PointI(336, 146);
            label.Size               = new SizeI(72, 16);
            label.Text               = "Initial angle:";
            label.AutoSizeToContents = true;



            comboBoxEdgeType               = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_ControlsPanel);
            comboBoxEdgeType.Location      = new PointI(408, 178);
            comboBoxEdgeType.Size          = new SizeI(176, 21);
            comboBoxEdgeType.ItemSelected += new GwenEventHandler(comboBoxEdgeType_SelectedIndexChanged);


            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel);
            label.Location           = new PointI(336, 180);
            label.Size               = new SizeI(72, 16);
            label.Text               = "Edge color:";
            label.AutoSizeToContents = true;



            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel);
            label.Location           = new PointI(336, 208);
            label.Size               = new SizeI(72, 16);
            label.Text               = "Edge width:";
            label.AutoSizeToContents = true;


            numericUpDownEdgeLineWidth = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel);
            numericUpDownEdgeLineWidth.DecimalPlaces = 1;
            numericUpDownEdgeLineWidth.Increment     = 0.5f;
            numericUpDownEdgeLineWidth.Location      = new PointI(408, 206);
            numericUpDownEdgeLineWidth.Maximum       = 5;
            numericUpDownEdgeLineWidth.Size          = new SizeI(48, 20);
            numericUpDownEdgeLineWidth.Value         = 3;
            numericUpDownEdgeLineWidth.ValueChanged += new GwenEventHandler(numericUpDownEdgeLineWidth_ValueChanged);


            label                    = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel);
            label.Location           = new PointI(336, 236);
            label.Size               = new SizeI(48, 16);
            label.Text               = "Alpha:";
            label.AutoSizeToContents = true;


            m_numericUpDownAlpha               = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel);
            m_numericUpDownAlpha.Increment     = 5;
            m_numericUpDownAlpha.Location      = new PointI(408, 234);
            m_numericUpDownAlpha.Maximum       = 255;
            m_numericUpDownAlpha.Size          = new SizeI(48, 20);
            m_numericUpDownAlpha.Value         = 130;
            m_numericUpDownAlpha.ValueChanged += new GwenEventHandler(m_numericUpDownAlpha_ValueChanged);



            FillEdgeColorTypeListBox();

            InitializeChart();
        }