本文整理匯總了C#中System.Windows.Forms.NumericUpDown.Show方法的典型用法代碼示例。如果您正苦於以下問題:C# NumericUpDown.Show方法的具體用法?C# NumericUpDown.Show怎麽用?C# NumericUpDown.Show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.NumericUpDown
的用法示例。
在下文中一共展示了NumericUpDown.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);
}