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


C# CheckedListBox.Show方法代码示例

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


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

示例1: MainWindow

        public MainWindow()
        {
            this.Size = new System.Drawing.Size(500, 380);
            this.Text = "Untitled Application";
            Application.EnableVisualStyles();

            selectFolderBtn = new Button();
            selectFolderBtn.Text = "Add folder with images...";
            selectFolderBtn.Click += HandleSelectFolderBtnClick;
            selectFolderBtn.Location = new System.Drawing.Point(5, 210);
            selectFolderBtn.Size = new System.Drawing.Size(200, 30);
            selectFolderBtn.Show();
            this.Controls.Add(selectFolderBtn);

            selectImageBtn = new Button();
            selectImageBtn.Text = "Add single images...";
            selectImageBtn.Click += HandleSelectImageBtnClick;
            selectImageBtn.Location = new System.Drawing.Point(5, 245);
            selectImageBtn.Size = new System.Drawing.Size(200, 30);
            selectImageBtn.Show();
            this.Controls.Add(selectImageBtn);

            deleteSelectedBtn = new Button();
            deleteSelectedBtn.Text = "Remove selected image from list";
            deleteSelectedBtn.Click += HandleDeleteSelectedBtnClick;
            deleteSelectedBtn.Location = new System.Drawing.Point(5, 280);
            deleteSelectedBtn.Size = new System.Drawing.Size(200, 30);
            deleteSelectedBtn.Show();
            this.Controls.Add(deleteSelectedBtn);

            clearListBtn = new Button();
            clearListBtn.Text = "Clear list";
            clearListBtn.Click += HandleClearListBtnClick;
            clearListBtn.Location = new System.Drawing.Point(5, 315);
            clearListBtn.Size = new System.Drawing.Size(200, 30);
            clearListBtn.Show();
            this.Controls.Add(clearListBtn);

            fileSelectList = new CheckedListBox();
            fileSelectList.Location = new System.Drawing.Point(5, 5);
            fileSelectList.Size = new System.Drawing.Size(200, 200);
            fileSelectList.Show();
            this.Controls.Add(fileSelectList);

            startPresentationBtn = new Button();
            startPresentationBtn.Text = "Start Presentation";
            startPresentationBtn.Location = new System.Drawing.Point(250, 210);
            startPresentationBtn.Size = new System.Drawing.Size(200, 30);
            startPresentationBtn.Click += HandleStartPresentationBtnClick;
            startPresentationBtn.Show();
            this.Controls.Add(startPresentationBtn);

            Label numOfSecondsLbl = new Label();
            numOfSecondsLbl.Text = "Delay in seconds:";
            numOfSecondsLbl.Location = new System.Drawing.Point(250, 45);
            numOfSecondsLbl.Size = new System.Drawing.Size(100, 30);
            numOfSecondsLbl.Show();
            this.Controls.Add(numOfSecondsLbl);

            Label numOfTilesLbl = new Label();
            numOfTilesLbl.Text = "Number of tiles:";
            numOfTilesLbl.Location = new System.Drawing.Point(250, 85);
            numOfTilesLbl.Size = new System.Drawing.Size(100, 30);
            numOfTilesLbl.Show();
            this.Controls.Add(numOfTilesLbl);

            numOfTilesBox = new ComboBox();
            numOfTilesBox.DropDownStyle = ComboBoxStyle.DropDownList;
            for (int i = 1; i < 21; i++)
            {
                numOfTilesBox.Items.Add(i*i);
            }
            numOfTilesBox.SelectedItem = 16;
            numOfTilesBox.Location = new System.Drawing.Point(380, 85);
            numOfTilesBox.Size = new System.Drawing.Size(100, 30);
            numOfTilesBox.Show();
            this.Controls.Add(numOfTilesBox);

            secondsBox = new NumericUpDown();
            secondsBox.Maximum = 60;
            secondsBox.Minimum = 1;
            secondsBox.Value = 5;
            secondsBox.Location = new System.Drawing.Point(380, 45);
            secondsBox.Size = new System.Drawing.Size(100, 30);
            secondsBox.Show();
            this.Controls.Add(secondsBox);
        }
开发者ID:rgcjonas,项目名称:tmp,代码行数:87,代码来源:MainWindow.cs


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