当前位置: 首页>>代码示例>>C#>>正文


C# ListBox.SelectItem方法代码示例

本文整理汇总了C#中ListBox.SelectItem方法的典型用法代码示例。如果您正苦于以下问题:C# ListBox.SelectItem方法的具体用法?C# ListBox.SelectItem怎么用?C# ListBox.SelectItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ListBox的用法示例。


在下文中一共展示了ListBox.SelectItem方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: winShopPanel

        public winShopPanel()
            : base("winShopPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Shop Panel";

            pnlShopList = new Panel("pnlShopList");
            pnlShopList.Size = new System.Drawing.Size(200, 230);
            pnlShopList.Location = new Point(0, 0);
            pnlShopList.BackColor = Color.White;
            pnlShopList.Visible = true;

            pnlShopEditor = new Panel("pnlShopEditor");
            pnlShopEditor.Size = new System.Drawing.Size(440, 380);
            pnlShopEditor.Location = new Point(0, 0);
            pnlShopEditor.BackColor = Color.White;
            pnlShopEditor.Visible = false;

            lbxShopList = new ListBox("lbxShopList");
            lbxShopList.Location = new Point(10, 10);
            lbxShopList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Shops.ShopHelper.Shops[(i + 1) + 10 * currentTen].Name);
                lbxShopList.Items.Add(lbiItem);
            }
            lbxShopList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(340, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(250, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Shop Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(420, 16);
            txtName.Location = new Point(10, 16);
            //txtName.Text = "Loading...";

            lblJoinSay = new Label("lblJoinSay");
            lblJoinSay.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblJoinSay.Text = "Join Say:";
            lblJoinSay.AutoSize = true;
            lblJoinSay.Location = new Point(10, 36);

            txtJoinSay = new TextBox("txtJoinSay");
            txtJoinSay.Size = new Size(420, 16);
//.........这里部分代码省略.........
开发者ID:blastboy,项目名称:Client,代码行数:101,代码来源:winShopPanel.cs

示例2: winEvolutionPanel

        public winEvolutionPanel()
            : base("winEvolutionPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Evolution Panel";

            pnlEvoList = new Panel("pnlEvoList");
            pnlEvoList.Size = new System.Drawing.Size(200, 230);
            pnlEvoList.Location = new Point(0, 0);
            pnlEvoList.BackColor = Color.White;
            pnlEvoList.Visible = true;

            pnlEvoEditor = new Panel("pnlEvoEditor");
            pnlEvoEditor.Size = new System.Drawing.Size(360, 400);
            pnlEvoEditor.Location = new Point(0, 0);
            pnlEvoEditor.BackColor = Color.White;
            pnlEvoEditor.Visible = false;

            lbxEvoList = new ListBox("lbxEvoList");
            lbxEvoList.Location = new Point(10, 10);
            lbxEvoList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {

                lbxEvoList.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Evolutions.EvolutionHelper.Evolutions[i].Name));
            }
            lbxEvoList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            //btnAddNew = new Button("btnAddNew");
            //btnAddNew.Location = new Point();
            //btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnAddNew.Size = new System.Drawing.Size(64, 16);
            //btnAddNew.Visible = true;
            //btnAddNew.Text = "Add New";
            //btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(100, 354);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(10, 354);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            //PictureBox picSprite;
            picSprite = new PictureBox("picSprite");
            picSprite.Size = new Size(32, 32);
            picSprite.BackColor = Color.Transparent;
            picSprite.Image = new SdlDotNet.Graphics.Surface(32, 32);
            picSprite.X = 175 - picSprite.Width;
            picSprite.Y = 120 - picSprite.Height / 2;

            //PictureBox picNewSprite;
            picNewSprite = new PictureBox("picNewSprite");
            picNewSprite.Size = new Size(32, 32);
//.........这里部分代码省略.........
开发者ID:ChaotixBluix,项目名称:PMU-Client,代码行数:101,代码来源:winEvolutionPanel.cs

示例3: winStoryPanel

        public winStoryPanel()
            : base("winStoryPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Story Editor";

            #region List
            pnlStoryList = new Panel("pnlStoryList");
            pnlStoryList.Size = new System.Drawing.Size(200, 230);
            pnlStoryList.Location = new Point(0, 0);
            pnlStoryList.BackColor = Color.White;
            pnlStoryList.Visible = true;

            lbxStoryList = new ListBox("lbxStoryList");
            lbxStoryList.Location = new Point(10, 10);
            lbxStoryList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": ");
                lbxStoryList.Items.Add(lbiItem);
            }
            lbxStoryList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);
            #endregion

            #region General
            pnlEditorGeneral = new Panel("pnlEditorGeneral");
            pnlEditorGeneral.Size = new System.Drawing.Size(300, 400);
            pnlEditorGeneral.Location = new Point(0, 0);
            pnlEditorGeneral.BackColor = Color.White;
            pnlEditorGeneral.Visible = false;

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(10, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(100, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            btnSegments = new Button("btnSegments");
            btnSegments.Location = new Point(215, 4);
            btnSegments.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSegments.Size = new System.Drawing.Size(64, 16);
            btnSegments.Text = "Segments";
            btnSegments.Click += new EventHandler<MouseButtonEventArgs>(btnSegments_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Story Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 16);
//.........这里部分代码省略.........
开发者ID:blastboy,项目名称:Client,代码行数:101,代码来源:winStoryPanel.cs

示例4: winItemPanel

        public winItemPanel()
            : base("winItemPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Item Panel";

            pnlItemList = new Panel("pnlItemList");
            pnlItemList.Size = new System.Drawing.Size(200, 230);
            pnlItemList.Location = new Point(0, 0);
            pnlItemList.BackColor = Color.White;
            pnlItemList.Visible = true;

            pnlItemEditor = new Panel("pnlItemEditor");
            pnlItemEditor.Size = new System.Drawing.Size(580, 380);
            pnlItemEditor.Location = new Point(0, 0);
            pnlItemEditor.BackColor = Color.White;
            pnlItemEditor.Visible = false;

            lbxItemList = new ListBox("lbxItemList");
            lbxItemList.Location = new Point(10, 10);
            lbxItemList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Items.ItemHelper.Items[(i + 1) + 10 * currentTen].Name);
                lbxItemList.Items.Add(lbiItem);
            }
            lbxItemList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            //btnAddNew = new Button("btnAddNew");
            //btnAddNew.Location = new Point();
            //btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnAddNew.Size = new System.Drawing.Size(64, 16);
            //btnAddNew.Visible = true;
            //btnAddNew.Text = "Add New";
            //btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(100, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(10, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Item Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 16);

            lblSprite = new Label("lblSprite");
//.........这里部分代码省略.........
开发者ID:ChaotixBluix,项目名称:PMU-Client,代码行数:101,代码来源:winItemPanel.cs

示例5: winMovePanel

        public winMovePanel()
            : base("winMovePanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Move Panel";

            pnlMoveList = new Panel("pnlMoveList");
            pnlMoveList.Size = new System.Drawing.Size(200, 230);
            pnlMoveList.Location = new Point(0, 0);
            pnlMoveList.BackColor = Color.White;
            pnlMoveList.Visible = true;

            pnlMoveEditor = new Panel("pnlMoveEditor");
            pnlMoveEditor.Size = new System.Drawing.Size(580, 380);
            pnlMoveEditor.Location = new Point(0, 0);
            pnlMoveEditor.BackColor = Color.White;
            pnlMoveEditor.Visible = false;

            pnlAttackerAnim = new Panel("pnlAttackerAnim");
            pnlAttackerAnim.Size = new System.Drawing.Size(234, 140);
            pnlAttackerAnim.Location = new Point(346, 60);
            pnlAttackerAnim.BackColor = Color.White;
            pnlAttackerAnim.Visible = true;

            pnlTravelingAnim = new Panel("pnlTravelingAnim");
            pnlTravelingAnim.Size = new System.Drawing.Size(234, 140);
            pnlTravelingAnim.Location = new Point(346, 60);
            pnlTravelingAnim.BackColor = Color.White;
            pnlTravelingAnim.Visible = false;

            pnlDefenderAnim = new Panel("pnlDefenderAnim");
            pnlDefenderAnim.Size = new System.Drawing.Size(234, 140);
            pnlDefenderAnim.Location = new Point(346, 60);
            pnlDefenderAnim.BackColor = Color.White;
            pnlDefenderAnim.Visible = false;

            lbxMoveList = new ListBox("lbxMoveList");
            lbxMoveList.Location = new Point(10, 10);
            lbxMoveList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Moves.MoveHelper.Moves[(i + 1) + 10 * currentTen].Name);
                lbxMoveList.Items.Add(lbiItem);
            }
            lbxMoveList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(10, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(100, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
//.........这里部分代码省略.........
开发者ID:blastboy,项目名称:Client,代码行数:101,代码来源:winMovePanel.cs


注:本文中的ListBox.SelectItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。