Exemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////


        #endregion

        #region //// Constructors //////

        ////////////////////////////////////////////////////////////////////////////
        public TaskControls(Manager manager) : base(manager)
        {
            MinimumWidth  = 340;
            MinimumHeight = 140;
            Height        = 480;
            Center();
            Text = "Controls Test";

            TopPanel.Visible  = true;
            Caption.Text      = "Information";
            Description.Text  = "Demonstration of various controls available in Neoforce Controls library.";
            Caption.TextColor = Description.TextColor = new Color(96, 96, 96);

            grpEdit = new GroupPanel(Manager);
            grpEdit.Init();
            grpEdit.Parent = this;
            grpEdit.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
            grpEdit.Width  = ClientWidth - 200;
            grpEdit.Height = 160;
            grpEdit.Left   = 8;
            grpEdit.Top    = TopPanel.Height + 8;
            grpEdit.Text   = "EditBox";

            pnlControls = new Panel(Manager);
            pnlControls.Init();
            pnlControls.Passive     = true;
            pnlControls.Parent      = this;
            pnlControls.Anchor      = Anchors.Left | Anchors.Top | Anchors.Right;
            pnlControls.Left        = 8;
            pnlControls.Top         = grpEdit.Top + grpEdit.Height + 8;
            pnlControls.Width       = ClientWidth - 200;
            pnlControls.Height      = BottomPanel.Top - 32 - pnlControls.Top;
            pnlControls.BevelBorder = BevelBorder.All;
            pnlControls.BevelMargin = 1;
            pnlControls.BevelStyle  = BevelStyle.Etched;
            pnlControls.Color       = Color.Transparent;

            lblEdit = new Label(manager);
            lblEdit.Init();
            lblEdit.Parent = grpEdit;
            lblEdit.Left   = 16;
            lblEdit.Top    = 8;
            lblEdit.Text   = "Testing field:";
            lblEdit.Width  = 128;
            lblEdit.Height = 16;

            txtEdit = new TextBox(manager);
            txtEdit.Init();
            txtEdit.Parent = grpEdit;
            txtEdit.Left   = 16;
            txtEdit.Top    = 24;
            txtEdit.Width  = grpEdit.ClientWidth - 32;
            txtEdit.Height = 20;
            txtEdit.Anchor = Anchors.Left | Anchors.Top | Anchors.Right | Anchors.Bottom;
            txtEdit.Text   = "Text";

            rdbNormal = new RadioButton(manager);
            rdbNormal.Init();
            rdbNormal.Parent          = grpEdit;
            rdbNormal.Left            = 16;
            rdbNormal.Top             = 52;
            rdbNormal.Width           = grpEdit.ClientWidth - 32;
            rdbNormal.Anchor          = Anchors.Left | Anchors.Bottom | Anchors.Right;
            rdbNormal.Checked         = true;
            rdbNormal.Text            = "Normal mode";
            rdbNormal.ToolTip.Text    = "Enables normal mode for TextBox control.";
            rdbNormal.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(ModeChanged);

            rdbPassword = new RadioButton(manager);
            rdbPassword.Init();
            rdbPassword.Parent          = grpEdit;
            rdbPassword.Left            = 16;
            rdbPassword.Top             = 68;
            rdbPassword.Width           = grpEdit.ClientWidth - 32;
            rdbPassword.Anchor          = Anchors.Left | Anchors.Bottom | Anchors.Right;
            rdbPassword.Checked         = false;
            rdbPassword.Text            = "Password mode";
            rdbPassword.ToolTip.Text    = "Enables password mode for TextBox control.";
            rdbPassword.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(ModeChanged);

            chkBorders = new CheckBox(manager);
            chkBorders.Init();
            chkBorders.Parent          = grpEdit;
            chkBorders.Left            = 16;
            chkBorders.Top             = 96;
            chkBorders.Width           = grpEdit.ClientWidth - 32;
            chkBorders.Anchor          = Anchors.Left | Anchors.Bottom | Anchors.Right;
            chkBorders.Checked         = false;
            chkBorders.Text            = "Borderless mode";
            chkBorders.ToolTip.Text    = "Enables or disables borderless mode for TextBox control.";
            chkBorders.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(chkBorders_CheckedChanged);

            chkReadOnly = new CheckBox(manager);
            chkReadOnly.Init();
            chkReadOnly.Parent          = grpEdit;
            chkReadOnly.Left            = 16;
            chkReadOnly.Top             = 110;
            chkReadOnly.Width           = grpEdit.ClientWidth - 32;
            chkReadOnly.Anchor          = Anchors.Left | Anchors.Bottom | Anchors.Right;
            chkReadOnly.Checked         = false;
            chkReadOnly.Text            = "Read only mode";
            chkReadOnly.ToolTip.Text    = "Enables or disables read only mode for TextBox control.\nThis mode is necessary to enable explicitly.";
            chkReadOnly.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(chkReadOnly_CheckedChanged);

            string[] colors = new string[] { "Red", "Green", "Blue", "Yellow", "Orange", "Purple", "White", "Black", "Magenta", "Cyan",
                                             "Brown", "Aqua", "Beige", "Coral", "Crimson", "Gray", "Azure", "Ivory", "Indigo", "Khaki",
                                             "Orchid", "Plum", "Salmon", "Silver", "Gold", "Pink", "Linen", "Lime", "Olive", "Slate" };

            spnMain = new SpinBox(manager, SpinBoxMode.List);
            spnMain.Init();
            spnMain.Parent = pnlControls;
            spnMain.Left   = 16;
            spnMain.Top    = 16;
            spnMain.Width  = pnlControls.Width - 32;
            spnMain.Height = 20;
            spnMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
            spnMain.Items.AddRange(colors);
            spnMain.Mode = SpinBoxMode.Range;

            spnMain.ItemIndex = 0;

            cmbMain = new ComboBox(manager);
            cmbMain.Init();
            cmbMain.Parent   = pnlControls;
            cmbMain.Left     = 16;
            cmbMain.Top      = 44;
            cmbMain.Width    = pnlControls.Width - 32;
            cmbMain.Height   = 20;
            cmbMain.ReadOnly = true;
            cmbMain.Anchor   = Anchors.Left | Anchors.Top | Anchors.Right;
            cmbMain.Items.AddRange(colors);
            cmbMain.ItemIndex     = 0;
            cmbMain.MaxItems      = 5;
            cmbMain.ToolTip.Color = Color.Yellow;
            cmbMain.Movable       = cmbMain.Resizable = true;
            cmbMain.OutlineMoving = cmbMain.OutlineResizing = true;

            trkMain = new TrackBar(manager);
            trkMain.Init();
            trkMain.Parent        = pnlControls;
            trkMain.Left          = 16;
            trkMain.Top           = 72;
            trkMain.Width         = pnlControls.Width - 32;
            trkMain.Anchor        = Anchors.Left | Anchors.Top | Anchors.Right;
            trkMain.Range         = 64;
            trkMain.Value         = 16;
            trkMain.ValueChanged += new TomShane.Neoforce.Controls.EventHandler(trkMain_ValueChanged);

            lblTrack = new Label(manager);
            lblTrack.Init();
            lblTrack.Parent    = pnlControls;
            lblTrack.Left      = 16;
            lblTrack.Top       = 96;
            lblTrack.Width     = pnlControls.Width - 32;
            lblTrack.Anchor    = Anchors.Left | Anchors.Top | Anchors.Right;
            lblTrack.Alignment = Alignment.TopRight;
            lblTrack.TextColor = new Color(32, 32, 32);
            trkMain_ValueChanged(this, null); // forcing label redraw with init values

            mnuListBox = new ContextMenu(manager);

            MenuItem i1 = new MenuItem("This is very long text");
            MenuItem i2 = new MenuItem("Menu", true);
            MenuItem i3 = new MenuItem("Item", false);
            //i3.Enabled = false;
            MenuItem i4 = new MenuItem("Separated", true);

            MenuItem i11 = new MenuItem();
            MenuItem i12 = new MenuItem();
            MenuItem i13 = new MenuItem();
            MenuItem i14 = new MenuItem();

            MenuItem i111 = new MenuItem();
            MenuItem i112 = new MenuItem();
            MenuItem i113 = new MenuItem();

            mnuListBox.Items.AddRange(new MenuItem[] { i1, i2, i3, i4 });
            i2.Items.AddRange(new MenuItem[] { i11, i12, i13, i14 });
            i13.Items.AddRange(new MenuItem[] { i111, i112, i113 });


            lstMain = new ListBox(manager);
            lstMain.Init();
            lstMain.Parent        = this;
            lstMain.Top           = TopPanel.Height + 8;
            lstMain.Left          = grpEdit.Left + grpEdit.Width + 8;
            lstMain.Width         = ClientWidth - lstMain.Left - 8;
            lstMain.Height        = ClientHeight - 16 - BottomPanel.Height - TopPanel.Height;
            lstMain.Anchor        = Anchors.Top | Anchors.Right | Anchors.Bottom;
            lstMain.HideSelection = false;
            lstMain.Items.AddRange(colors);
            lstMain.ContextMenu = mnuListBox;

            prgMain = new ProgressBar(manager);
            prgMain.Init();
            prgMain.Parent  = this.BottomPanel;
            prgMain.Left    = lstMain.Left;
            prgMain.Top     = 10;
            prgMain.Width   = lstMain.Width;
            prgMain.Height  = 16;
            prgMain.Anchor  = Anchors.Top | Anchors.Right;
            prgMain.Mode    = ProgressBarMode.Infinite;
            prgMain.Passive = false;

            btnDisable = new Button(manager);
            btnDisable.Init();
            btnDisable.Parent    = BottomPanel;
            btnDisable.Left      = 8;
            btnDisable.Top       = 8;
            btnDisable.Text      = "Disable";
            btnDisable.Click    += new Controls.EventHandler(btnDisable_Click);
            btnDisable.TextColor = Color.FromNonPremultiplied(255, 64, 32, 200);

            btnProgress = new Button(manager);
            btnProgress.Init();
            btnProgress.Parent = BottomPanel;
            btnProgress.Left   = prgMain.Left - 16;
            btnProgress.Top    = prgMain.Top;
            btnProgress.Height = 16;
            btnProgress.Width  = 16;
            btnProgress.Text   = "!";
            btnProgress.Anchor = Anchors.Top | Anchors.Right;
            btnProgress.Click += new Controls.EventHandler(btnProgress_Click);

            mnuMain = new MainMenu(manager);

            mnuMain.Items.Add(i2);
            mnuMain.Items.Add(i13);
            mnuMain.Items.Add(i3);
            mnuMain.Items.Add(i4);

            MainMenu = mnuMain;

            ToolBarPanel tlp = new ToolBarPanel(manager);

            ToolBarPanel = tlp;

            ToolBar tlb  = new ToolBar(manager);
            ToolBar tlbx = new ToolBar(manager);

            tlb.FullRow  = true;
            tlbx.Row     = 1;
            tlbx.FullRow = false;

            tlp.Add(tlb);
            tlp.Add(tlbx);

            /*
             * tlb.Init();
             * tlb.Width = 256;
             * tlb.Parent = ToolBarPanel;*/


            //tlbx.Init();

            /*
             * tlbx.Width = 512;
             * tlbx.Top = 25;
             * tlbx.Parent = ToolBarPanel;*/

            /*
             * ToolBarButton tb1 = new ToolBarButton(manager);
             * tb1.Init();
             * tb1.Parent = tlb;
             * tb1.Left = 10;
             * tb1.Top = 1;
             * tb1.Glyph = new Glyph(Manager.Skin.Images["Icon.Warning"].Resource);
             * tb1.Glyph.SizeMode = SizeMode.Stretched;  */

            StatusBar stb = new StatusBar(Manager);

            StatusBar = stb;

            DefaultControl = txtEdit;

            OutlineMoving   = true;
            OutlineResizing = true;

            BottomPanel.BringToFront();

            SkinChanged += new TomShane.Neoforce.Controls.EventHandler(TaskControls_SkinChanged);
            TaskControls_SkinChanged(null, null);
        }
Exemplo n.º 2
0
            internal void Load(TabPage TabPage)
            {
                Thread LoadItem = new Thread(delegate()
                {
                    Manager manager = TabPage.Manager;

                    //Add description, now saying "prgLoading..."
                    Label DescriptionLabel = new Label(manager)
                    {
                        Left = 8, Top = 8, Width = 400, Height = 12, TextColor = Color.LightGray, Text = "Loading..."
                    };
                    TabPage.Add(DescriptionLabel);
                    DescriptionLabel.BringToFront();

                    //List of labels for the news items
                    List <Label> TextItems = new List <Label>();

                    //Connect to the feed
                    HttpWebRequest request     = (HttpWebRequest)WebRequest.Create(FeedLink);
                    request.Proxy              = null;
                    XmlReaderSettings settings = new XmlReaderSettings {
                        CloseInput = true
                    };
                    SyndicationFeed feed = null;

                    // 2018: Since we no longer have these pages, just show a placeholder and don't try to load.
                    DescriptionLabel.Text = "Could not load.";
                    return;

                    try
                    {
                        using (XmlReader reader = XmlReader.Create(request.GetResponse().GetResponseStream(), settings))
                        {
                            feed = SyndicationFeed.Load(reader);
                        }
                    }
                    catch (Exception e)
                    {
                        DescriptionLabel.Text = e.Message;
                    }

                    if (feed != null)
                    {
                        //Setup the descripton link
                        DescriptionLabel.Text      = Description;
                        DescriptionLabel.TextColor = Color.LightGray;
                        TomShane.Neoforce.Controls.EventHandler r = new TomShane.Neoforce.Controls.EventHandler(delegate(object o, Controls.EventArgs e)
                        {
                            System.Diagnostics.Process.Start(Link);
                        });
                        DescriptionLabel.MouseOver += new TomShane.Neoforce.Controls.MouseEventHandler(delegate(object o, Controls.MouseEventArgs e)
                        {
                            ((Label)o).TextColor = Color.SkyBlue;
                        });
                        DescriptionLabel.MouseOut += new TomShane.Neoforce.Controls.MouseEventHandler(delegate(object o, Controls.MouseEventArgs e)
                        {
                            ((Label)o).TextColor = Color.LightGray;
                        });
                        DescriptionLabel.Click += new TomShane.Neoforce.Controls.EventHandler(delegate(object o, Controls.EventArgs e)
                        {
                            System.Diagnostics.Process.Start(Link);
                        });
                        DescriptionLabel.Passive = false;

                        int i = 0;
                        //Foreach item, add a new label_TextChanged and set the text/link
                        foreach (SyndicationItem item in feed.Items)
                        {
                            Label ItemLabel = new Label(manager);
                            ItemLabel.Init();
                            ItemLabel.Top       = DescriptionLabel.Top + ((DescriptionLabel.Height + 6) * (i + 1));
                            ItemLabel.Left      = DescriptionLabel.Left;
                            ItemLabel.Width     = DescriptionLabel.Width;
                            ItemLabel.Height    = DescriptionLabel.Height;
                            ItemLabel.Text      = item.Title.Text;
                            ItemLabel.Passive   = false;
                            ItemLabel.TextColor = Color.White;

                            //Add event handlers
                            ItemLabel.MouseOver += new TomShane.Neoforce.Controls.MouseEventHandler(delegate(object o, Controls.MouseEventArgs e)
                            {
                                ((Label)o).TextColor = Color.DeepSkyBlue;
                            });
                            ItemLabel.MouseOut += new TomShane.Neoforce.Controls.MouseEventHandler(delegate(object o, Controls.MouseEventArgs e)
                            {
                                ((Label)o).TextColor = Color.White;
                            });

                            ItemLabel.Click += new TomShane.Neoforce.Controls.EventHandler(delegate(object o, Controls.EventArgs e)
                            {
                                if (manager.Game.IsActive)
                                {
                                    System.Diagnostics.Process.Start(item.Links[0].Uri.ToString());
                                }
                            });

                            ItemLabel.ToolTip.Text = GetToolTip(this, item);

                            TextItems.Add((Label)ItemLabel.Clone());
                            i++;
                            //Max amount of items
                            if (i > 5)
                            {
                                break;
                            }
                        }
                    }
                    //Add each item in the temp list to the tabpage
                    foreach (Label l in TextItems)
                    {
                        TabPage.Add(l);
                        l.BringToFront();
                    }
                });

                LoadItem.Start();
                LoadItem.IsBackground = true;
            }
Exemplo n.º 3
0
        ////////////////////////////////////////////////////////////////////////////   
        public TaskControls(Manager manager)
            : base(manager)
        {
            MinimumWidth = 340;
              MinimumHeight = 140;
              Height = 480;
              Center();
              Text = "Controls Test";

              TopPanel.Visible = true;
              Caption.Text = "Information";
              Description.Text = "Demonstration of various controls available in Neoforce Controls library.";
              Caption.TextColor = Description.TextColor = new Color(96, 96, 96);

              grpEdit = new GroupPanel(Manager);
              grpEdit.Init();
              grpEdit.Parent = this;
              grpEdit.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
              grpEdit.Width = ClientWidth - 200;
              grpEdit.Height = 160;
              grpEdit.Left = 8;
              grpEdit.Top = TopPanel.Height + 8;
              grpEdit.Text = "EditBox";

              pnlControls = new Panel(Manager);
              pnlControls.Init();
              pnlControls.Passive = true;
              pnlControls.Parent = this;
              pnlControls.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
              pnlControls.Left = 8;
              pnlControls.Top = grpEdit.Top + grpEdit.Height + 8;
              pnlControls.Width = ClientWidth - 200;
              pnlControls.Height = BottomPanel.Top - 32 - pnlControls.Top;
              pnlControls.BevelBorder = BevelBorder.All;
              pnlControls.BevelMargin = 1;
              pnlControls.BevelStyle = BevelStyle.Etched;
              pnlControls.Color = Color.Transparent;

              lblEdit = new Label(manager);
              lblEdit.Init();
              lblEdit.Parent = grpEdit;
              lblEdit.Left = 16;
              lblEdit.Top = 8;
              lblEdit.Text = "Testing field:";
              lblEdit.Width = 128;
              lblEdit.Height = 16;

              txtEdit = new TextBox(manager);
              txtEdit.Init();
              txtEdit.Parent = grpEdit;
              txtEdit.Left = 16;
              txtEdit.Top = 24;
              txtEdit.Width = grpEdit.ClientWidth - 32;
              txtEdit.Height = 20;
              txtEdit.Anchor = Anchors.Left | Anchors.Top | Anchors.Right | Anchors.Bottom;
              txtEdit.Text = "Text";

              rdbNormal = new RadioButton(manager);
              rdbNormal.Init();
              rdbNormal.Parent = grpEdit;
              rdbNormal.Left = 16;
              rdbNormal.Top = 52;
              rdbNormal.Width = grpEdit.ClientWidth - 32;
              rdbNormal.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right;
              rdbNormal.Checked = true;
              rdbNormal.Text = "Normal mode";
              rdbNormal.ToolTip.Text = "Enables normal mode for TextBox control.";
              rdbNormal.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(ModeChanged);

              rdbPassword = new RadioButton(manager);
              rdbPassword.Init();
              rdbPassword.Parent = grpEdit;
              rdbPassword.Left = 16;
              rdbPassword.Top = 68;
              rdbPassword.Width = grpEdit.ClientWidth - 32;
              rdbPassword.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right;
              rdbPassword.Checked = false;
              rdbPassword.Text = "Password mode";
              rdbPassword.ToolTip.Text = "Enables password mode for TextBox control.";
              rdbPassword.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(ModeChanged);

              chkBorders = new CheckBox(manager);
              chkBorders.Init();
              chkBorders.Parent = grpEdit;
              chkBorders.Left = 16;
              chkBorders.Top = 96;
              chkBorders.Width = grpEdit.ClientWidth - 32;
              chkBorders.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right;
              chkBorders.Checked = false;
              chkBorders.Text = "Borderless mode";
              chkBorders.ToolTip.Text = "Enables or disables borderless mode for TextBox control.";
              chkBorders.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(chkBorders_CheckedChanged);

              chkReadOnly = new CheckBox(manager);
              chkReadOnly.Init();
              chkReadOnly.Parent = grpEdit;
              chkReadOnly.Left = 16;
              chkReadOnly.Top = 110;
              chkReadOnly.Width = grpEdit.ClientWidth - 32;
              chkReadOnly.Anchor = Anchors.Left | Anchors.Bottom | Anchors.Right;
              chkReadOnly.Checked = false;
              chkReadOnly.Text = "Read only mode";
              chkReadOnly.ToolTip.Text = "Enables or disables read only mode for TextBox control.\nThis mode is necessary to enable explicitly.";
              chkReadOnly.CheckedChanged += new TomShane.Neoforce.Controls.EventHandler(chkReadOnly_CheckedChanged);

              string[] colors = new string[] {"Red", "Green", "Blue", "Yellow", "Orange", "Purple", "White", "Black", "Magenta", "Cyan",
                                      "Brown", "Aqua", "Beige", "Coral", "Crimson", "Gray", "Azure", "Ivory", "Indigo", "Khaki",
                                      "Orchid", "Plum", "Salmon", "Silver", "Gold", "Pink", "Linen", "Lime", "Olive", "Slate"};

              spnMain = new SpinBox(manager, SpinBoxMode.List);
              spnMain.Init();
              spnMain.Parent = pnlControls;
              spnMain.Left = 16;
              spnMain.Top = 16;
              spnMain.Width = pnlControls.Width - 32;
              spnMain.Height = 20;
              spnMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
              spnMain.Items.AddRange(colors);
              spnMain.Mode = SpinBoxMode.Range;

              spnMain.ItemIndex = 0;

              cmbMain = new ComboBox(manager);
              cmbMain.Init();
              cmbMain.Parent = pnlControls;
              cmbMain.Left = 16;
              cmbMain.Top = 44;
              cmbMain.Width = pnlControls.Width - 32;
              cmbMain.Height = 20;
              cmbMain.ReadOnly = true;
              cmbMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
              cmbMain.Items.AddRange(colors);
              cmbMain.ItemIndex = 0;
              cmbMain.MaxItems = 5;
              cmbMain.ToolTip.Color = Color.Yellow;
              cmbMain.Movable = cmbMain.Resizable = true;
              cmbMain.OutlineMoving = cmbMain.OutlineResizing = true;

              trkMain = new TrackBar(manager);
              trkMain.Init();
              trkMain.Parent = pnlControls;
              trkMain.Left = 16;
              trkMain.Top = 72;
              trkMain.Width = pnlControls.Width - 32;
              trkMain.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
              trkMain.Range = 64;
              trkMain.Value = 16;
              trkMain.ValueChanged += new TomShane.Neoforce.Controls.EventHandler(trkMain_ValueChanged);

              lblTrack = new Label(manager);
              lblTrack.Init();
              lblTrack.Parent = pnlControls;
              lblTrack.Left = 16;
              lblTrack.Top = 96;
              lblTrack.Width = pnlControls.Width - 32;
              lblTrack.Anchor = Anchors.Left | Anchors.Top | Anchors.Right;
              lblTrack.Alignment = Alignment.TopRight;
              lblTrack.TextColor = new Color(32, 32, 32);
              trkMain_ValueChanged(this, null); // forcing label redraw with init values

              mnuListBox = new ContextMenu(manager);

              MenuItem i1 = new MenuItem("This is very long text");
              MenuItem i2 = new MenuItem("Menu", true);
              MenuItem i3 = new MenuItem("Item", false);
              //i3.Enabled = false;
              MenuItem i4 = new MenuItem("Separated", true);

              MenuItem i11 = new MenuItem();
              MenuItem i12 = new MenuItem();
              MenuItem i13 = new MenuItem();
              MenuItem i14 = new MenuItem();

              MenuItem i111 = new MenuItem();
              MenuItem i112 = new MenuItem();
              MenuItem i113 = new MenuItem();

              mnuListBox.Items.AddRange(new MenuItem[]{i1,i2, i3, i4});
              i2.Items.AddRange(new MenuItem[] { i11, i12, i13, i14 });
              i13.Items.AddRange(new MenuItem[] { i111, i112, i113 });

              lstMain = new ListBox(manager);
              lstMain.Init();
              lstMain.Parent = this;
              lstMain.Top = TopPanel.Height + 8;
              lstMain.Left = grpEdit.Left + grpEdit.Width + 8;
              lstMain.Width = ClientWidth - lstMain.Left - 8;
              lstMain.Height = ClientHeight - 16 - BottomPanel.Height - TopPanel.Height;
              lstMain.Anchor = Anchors.Top | Anchors.Right | Anchors.Bottom;
              lstMain.HideSelection = false;
              lstMain.Items.AddRange(colors);
              lstMain.ContextMenu = mnuListBox;

              prgMain = new ProgressBar(manager);
              prgMain.Init();
              prgMain.Parent = this.BottomPanel;
              prgMain.Left = lstMain.Left;
              prgMain.Top = 10;
              prgMain.Width = lstMain.Width;
              prgMain.Height = 16;
              prgMain.Anchor = Anchors.Top | Anchors.Right;
              prgMain.Mode = ProgressBarMode.Infinite;
              prgMain.Passive = false;

              btnDisable = new Button(manager);
              btnDisable.Init();
              btnDisable.Parent = BottomPanel;
              btnDisable.Left = 8;
              btnDisable.Top = 8;
              btnDisable.Text = "Disable";
              btnDisable.Click += new Controls.EventHandler(btnDisable_Click);
              btnDisable.TextColor = Color.FromNonPremultiplied(255, 64, 32, 200);

              btnProgress = new Button(manager);
              btnProgress.Init();
              btnProgress.Parent = BottomPanel;
              btnProgress.Left = prgMain.Left - 16;
              btnProgress.Top = prgMain.Top;
              btnProgress.Height = 16;
              btnProgress.Width = 16;
              btnProgress.Text = "!";
              btnProgress.Anchor = Anchors.Top | Anchors.Right;
              btnProgress.Click += new Controls.EventHandler(btnProgress_Click);

              mnuMain = new MainMenu(manager);

              mnuMain.Items.Add(i2);
              mnuMain.Items.Add(i13);
              mnuMain.Items.Add(i3);
              mnuMain.Items.Add(i4);

              MainMenu = mnuMain;

              ToolBarPanel tlp = new ToolBarPanel(manager);
              ToolBarPanel = tlp;

              ToolBar tlb = new ToolBar(manager);
              ToolBar tlbx = new ToolBar(manager);
              tlb.FullRow = true;
              tlbx.Row = 1;
              tlbx.FullRow = false;

              tlp.Add(tlb);
              tlp.Add(tlbx);

              /*
              tlb.Init();
              tlb.Width = 256;
              tlb.Parent = ToolBarPanel;*/

              //tlbx.Init();
              /*
              tlbx.Width = 512;
              tlbx.Top = 25;
              tlbx.Parent = ToolBarPanel;*/

             /*
              ToolBarButton tb1 = new ToolBarButton(manager);
              tb1.Init();
              tb1.Parent = tlb;
              tb1.Left = 10;
              tb1.Top = 1;
              tb1.Glyph = new Glyph(Manager.Skin.Images["Icon.Warning"].Resource);
              tb1.Glyph.SizeMode = SizeMode.Stretched;  */

              StatusBar stb = new StatusBar(Manager);
              StatusBar = stb;

              DefaultControl = txtEdit;

              OutlineMoving = true;
              OutlineResizing = true;

              BottomPanel.BringToFront();

              SkinChanged += new TomShane.Neoforce.Controls.EventHandler(TaskControls_SkinChanged);
              TaskControls_SkinChanged(null, null);
        }