本文整理汇总了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);
}