本文整理汇总了C#中Form.SuspendLayout方法的典型用法代码示例。如果您正苦于以下问题:C# Form.SuspendLayout方法的具体用法?C# Form.SuspendLayout怎么用?C# Form.SuspendLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form.SuspendLayout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DownloadLWJGL
public bool DownloadLWJGL()
{
Debug.WriteLine("[DownloadLWJGL] Creating DownloadLWJGLStatusForm form.");
DownloadLWJGLStatusForm = new Form();
Label DownloadStatusLabel = new Label();
DownloadLWJGLStatusForm.SuspendLayout();
DownloadStatusLabel.Text = "Downloading LWJGL...";
DownloadStatusLabel.Name = "DownloadStatusLabel";
DownloadStatusLabel.Location = new System.Drawing.Point(12, 0);
DownloadStatusLabel.Height = 48;
DownloadStatusLabel.Width = 192;
DownloadStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
DownloadStatusLabel.BackColor = System.Drawing.SystemColors.Control;
DownloadStatusLabel.ForeColor = System.Drawing.SystemColors.ControlText;
DownloadStatusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8);
DownloadLWJGLStatusForm.Height = 72;
DownloadLWJGLStatusForm.Width = 216;
DownloadLWJGLStatusForm.Controls.Add(DownloadStatusLabel);
DownloadLWJGLStatusForm.FormBorderStyle = FormBorderStyle.FixedToolWindow;
DownloadLWJGLStatusForm.ResumeLayout(false);
DownloadLWJGLStatusForm.Text = "launcher²";
DownloadLWJGLStatusForm.Icon = global::launcher2.Properties.Resources.l2_ico;
DownloadLWJGLStatusForm.FormClosing += new FormClosingEventHandler(DownloadLWJGLStatusForm_FormClosing);
DownloadLWJGLStatusForm.Refresh();
DownloadLWJGLStatusForm.Show();
DownloadLWJGLStatusForm.Activate();
DownloadLWJGLThread = new BackgroundWorker();
DownloadLWJGLThread.WorkerReportsProgress = true;
DownloadLWJGLThread.WorkerSupportsCancellation = true;
DownloadLWJGLThread.DoWork += new DoWorkEventHandler(DownloadLWJGLThread_DoWork);
DownloadLWJGLThread.ProgressChanged += new ProgressChangedEventHandler(DownloadLWJGLThread_ProgressChanged);
DownloadLWJGLThread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(DownloadLWJGLThread_RunWorkerCompleted);
DownloadLWJGLThread.RunWorkerAsync();
return true;
}
示例2: InitializeComponents
static void InitializeComponents()
{
hoverPlayer = new System.Media.SoundPlayer();
acceptPlayer = new System.Media.SoundPlayer();
denyPlayer = new System.Media.SoundPlayer();
hoverPlayer.Stream = GetStreamFromFomod("fomod/soundHover.wav");
acceptPlayer.Stream = GetStreamFromFomod("fomod/soundAccept.wav");
denyPlayer.Stream = GetStreamFromFomod("fomod/soundDeny.wav");
imageChecked = GetImageFromFomod("fomod/InstallerChecked.png");
imageUnchecked = GetImageFromFomod("fomod/InstallerUnchecked.png");
imageInstall = GetImageFromFomod("fomod/InstallerInstall.png");
imageInstallHi = GetImageFromFomod("fomod/InstallerInstallHi.png");
imageExit = GetImageFromFomod("fomod/InstallerExit.png");
imageExitHi = GetImageFromFomod("fomod/InstallerExitHi.png");
imageLogo = GetImageFromFomod("fomod/InstallerLogo.png");
imageCore = GetImageFromFomod("fomod/InstallerCore.png");
imageCoreHi = GetImageFromFomod("fomod/InstallerCoreHi.png");
imageCoreDesc = GetImageFromFomod("fomod/InstallerCoreDesc.png");
imageCyberware = GetImageFromFomod("fomod/InstallerCyberware.png");
imageCyberwareHi = GetImageFromFomod("fomod/InstallerCyberwareHi.png");
imageCyberwareDesc = GetImageFromFomod("fomod/InstallerCyberDesc.png");
imageEquipment = GetImageFromFomod("fomod/InstallerEquipment.png");
imageEquipmentHi = GetImageFromFomod("fomod/InstallerEquipmentHi.png");
imageEquipmentDesc = GetImageFromFomod("fomod/InstallerEquipmentDesc.png");
imageRebalance = GetImageFromFomod("fomod/InstallerRebalance.png");
imageRebalanceHi = GetImageFromFomod("fomod/InstallerRebalanceHi.png");
imageRebalanceDesc = GetImageFromFomod("fomod/InstallerRebalanceDesc.png");
imageDLC = GetImageFromFomod("fomod/InstallerDLC.png");
imageDLCHi = GetImageFromFomod("fomod/InstallerDLCHi.png");
imageDLCDesc = GetImageFromFomod("fomod/InstallerDLCDesc.png");
installerForm = CreateCustomForm();
dlcCheckbox = new System.Windows.Forms.PictureBox();
rebalanceCheckbox = new System.Windows.Forms.PictureBox();
equipmentCheckbox = new System.Windows.Forms.PictureBox();
cyberwareCheckbox = new System.Windows.Forms.PictureBox();
coreCheckbox = new System.Windows.Forms.PictureBox();
contentPicture = new System.Windows.Forms.PictureBox();
dlcButton = new System.Windows.Forms.PictureBox();
rebalanceButton = new System.Windows.Forms.PictureBox();
equipmentButton = new System.Windows.Forms.PictureBox();
cyberwareButton = new System.Windows.Forms.PictureBox();
coreButton = new System.Windows.Forms.PictureBox();
installButton = new System.Windows.Forms.PictureBox();
exitButton = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(dlcCheckbox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(rebalanceCheckbox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(equipmentCheckbox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(cyberwareCheckbox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(coreCheckbox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(contentPicture)).BeginInit();
((System.ComponentModel.ISupportInitialize)(dlcButton)).BeginInit();
((System.ComponentModel.ISupportInitialize)(rebalanceButton)).BeginInit();
((System.ComponentModel.ISupportInitialize)(equipmentButton)).BeginInit();
((System.ComponentModel.ISupportInitialize)(cyberwareButton)).BeginInit();
((System.ComponentModel.ISupportInitialize)(coreButton)).BeginInit();
((System.ComponentModel.ISupportInitialize)(installButton)).BeginInit();
((System.ComponentModel.ISupportInitialize)(exitButton)).BeginInit();
installerForm.SuspendLayout();
//
// dlcCheckbox
//
dlcCheckbox.Image = imageChecked;
dlcCheckbox.Location = new System.Drawing.Point(613, 115);
dlcCheckbox.Name = "dlcCheckbox";
dlcCheckbox.Size = new System.Drawing.Size(64, 62);
dlcCheckbox.TabIndex = 12;
dlcCheckbox.TabStop = false;
//
// rebalanceCheckbox
//
rebalanceCheckbox.Image = imageChecked;
rebalanceCheckbox.Location = new System.Drawing.Point(483, 115);
rebalanceCheckbox.Name = "rebalanceCheckbox";
rebalanceCheckbox.Size = new System.Drawing.Size(64, 62);
rebalanceCheckbox.TabIndex = 11;
rebalanceCheckbox.TabStop = false;
//
// equipmentCheckbox
//
equipmentCheckbox.Image = imageUnchecked;
equipmentCheckbox.Location = new System.Drawing.Point(353, 115);
equipmentCheckbox.Name = "equipmentCheckbox";
equipmentCheckbox.Size = new System.Drawing.Size(64, 62);
equipmentCheckbox.TabIndex = 10;
equipmentCheckbox.TabStop = false;
//
// cyberwareCheckbox
//
cyberwareCheckbox.Image = imageChecked;
cyberwareCheckbox.Location = new System.Drawing.Point(223, 115);
cyberwareCheckbox.Name = "cyberwareCheckbox";
cyberwareCheckbox.Size = new System.Drawing.Size(64, 62);
cyberwareCheckbox.TabIndex = 9;
cyberwareCheckbox.TabStop = false;
//
// coreCheckbox
//.........这里部分代码省略.........