|
@@ -29,42 +29,47 @@ namespace ISCSIConsole
|
|
|
private void InitializeComponent()
|
|
|
{
|
|
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreateDiskImageForm));
|
|
|
- this.saveVirtualDiskFileDialog = new System.Windows.Forms.SaveFileDialog();
|
|
|
- this.numericDiskSize = new System.Windows.Forms.NumericUpDown();
|
|
|
+ this.ImageSizeUpDown = new System.Windows.Forms.NumericUpDown();
|
|
|
this.lblSize = new System.Windows.Forms.Label();
|
|
|
- this.label1 = new System.Windows.Forms.Label();
|
|
|
+ this.MbLabel = new System.Windows.Forms.Label();
|
|
|
this.lblFilePath = new System.Windows.Forms.Label();
|
|
|
- this.txtFilePath = new System.Windows.Forms.TextBox();
|
|
|
- this.btnBrowse = new System.Windows.Forms.Button();
|
|
|
+ this.ImageFileTextBox = new System.Windows.Forms.TextBox();
|
|
|
+ this.ImageFileButton = new System.Windows.Forms.Button();
|
|
|
this.btnOK = new System.Windows.Forms.Button();
|
|
|
this.btnCancel = new System.Windows.Forms.Button();
|
|
|
- ((System.ComponentModel.ISupportInitialize)(this.numericDiskSize)).BeginInit();
|
|
|
+ this.FormatLabel = new System.Windows.Forms.Label();
|
|
|
+ this.FormatComboBox = new System.Windows.Forms.ComboBox();
|
|
|
+ this.TypeLabel = new System.Windows.Forms.Label();
|
|
|
+ this.TypeComboBox = new System.Windows.Forms.ComboBox();
|
|
|
+ this.SnapshotLabel = new System.Windows.Forms.Label();
|
|
|
+ this.SnapshotTextBox = new System.Windows.Forms.TextBox();
|
|
|
+ this.SnapshotButton = new System.Windows.Forms.Button();
|
|
|
+ this.BlockSizeLabel = new System.Windows.Forms.Label();
|
|
|
+ this.KbLabel = new System.Windows.Forms.Label();
|
|
|
+ this.AheadLabel = new System.Windows.Forms.Label();
|
|
|
+ this.BlockSizeUpDown = new System.Windows.Forms.DomainUpDown();
|
|
|
+ ((System.ComponentModel.ISupportInitialize)(this.ImageSizeUpDown)).BeginInit();
|
|
|
this.SuspendLayout();
|
|
|
//
|
|
|
- // saveVirtualDiskFileDialog
|
|
|
+ // ImageSizeUpDown
|
|
|
//
|
|
|
- this.saveVirtualDiskFileDialog.FileName = "Disk.vhd";
|
|
|
- this.saveVirtualDiskFileDialog.Filter = "Virtual Hard Disk (*.vhd)|*.vhd";
|
|
|
- //
|
|
|
- // numericDiskSize
|
|
|
- //
|
|
|
- this.numericDiskSize.Location = new System.Drawing.Point(56, 41);
|
|
|
- this.numericDiskSize.Maximum = new decimal(new int[] {
|
|
|
+ this.ImageSizeUpDown.Location = new System.Drawing.Point(106, 64);
|
|
|
+ this.ImageSizeUpDown.Maximum = new decimal(new int[] {
|
|
|
16777215,
|
|
|
0,
|
|
|
0,
|
|
|
0});
|
|
|
- this.numericDiskSize.Minimum = new decimal(new int[] {
|
|
|
+ this.ImageSizeUpDown.Minimum = new decimal(new int[] {
|
|
|
1,
|
|
|
0,
|
|
|
0,
|
|
|
0});
|
|
|
- this.numericDiskSize.Name = "numericDiskSize";
|
|
|
- this.numericDiskSize.Size = new System.Drawing.Size(86, 20);
|
|
|
- this.numericDiskSize.TabIndex = 0;
|
|
|
- this.numericDiskSize.ThousandsSeparator = true;
|
|
|
- this.numericDiskSize.Value = new decimal(new int[] {
|
|
|
- 100,
|
|
|
+ this.ImageSizeUpDown.Name = "ImageSizeUpDown";
|
|
|
+ this.ImageSizeUpDown.Size = new System.Drawing.Size(77, 21);
|
|
|
+ this.ImageSizeUpDown.TabIndex = 0;
|
|
|
+ this.ImageSizeUpDown.ThousandsSeparator = true;
|
|
|
+ this.ImageSizeUpDown.Value = new decimal(new int[] {
|
|
|
+ 512,
|
|
|
0,
|
|
|
0,
|
|
|
0});
|
|
@@ -72,50 +77,50 @@ namespace ISCSIConsole
|
|
|
// lblSize
|
|
|
//
|
|
|
this.lblSize.AutoSize = true;
|
|
|
- this.lblSize.Location = new System.Drawing.Point(12, 43);
|
|
|
+ this.lblSize.Location = new System.Drawing.Point(12, 66);
|
|
|
this.lblSize.Name = "lblSize";
|
|
|
- this.lblSize.Size = new System.Drawing.Size(30, 13);
|
|
|
+ this.lblSize.Size = new System.Drawing.Size(35, 12);
|
|
|
this.lblSize.TabIndex = 1;
|
|
|
this.lblSize.Text = "Size:";
|
|
|
//
|
|
|
- // label1
|
|
|
+ // MbLabel
|
|
|
//
|
|
|
- this.label1.AutoSize = true;
|
|
|
- this.label1.Location = new System.Drawing.Point(148, 43);
|
|
|
- this.label1.Name = "label1";
|
|
|
- this.label1.Size = new System.Drawing.Size(23, 13);
|
|
|
- this.label1.TabIndex = 2;
|
|
|
- this.label1.Text = "MB";
|
|
|
+ this.MbLabel.AutoSize = true;
|
|
|
+ this.MbLabel.Location = new System.Drawing.Point(189, 66);
|
|
|
+ this.MbLabel.Name = "MbLabel";
|
|
|
+ this.MbLabel.Size = new System.Drawing.Size(17, 12);
|
|
|
+ this.MbLabel.TabIndex = 2;
|
|
|
+ this.MbLabel.Text = "MB";
|
|
|
//
|
|
|
// lblFilePath
|
|
|
//
|
|
|
this.lblFilePath.AutoSize = true;
|
|
|
- this.lblFilePath.Location = new System.Drawing.Point(12, 18);
|
|
|
+ this.lblFilePath.Location = new System.Drawing.Point(12, 40);
|
|
|
this.lblFilePath.Name = "lblFilePath";
|
|
|
- this.lblFilePath.Size = new System.Drawing.Size(26, 13);
|
|
|
+ this.lblFilePath.Size = new System.Drawing.Size(71, 12);
|
|
|
this.lblFilePath.TabIndex = 3;
|
|
|
- this.lblFilePath.Text = "File:";
|
|
|
+ this.lblFilePath.Text = "Image File:\r\n";
|
|
|
//
|
|
|
- // txtFilePath
|
|
|
+ // ImageFileTextBox
|
|
|
//
|
|
|
- this.txtFilePath.Location = new System.Drawing.Point(56, 15);
|
|
|
- this.txtFilePath.Name = "txtFilePath";
|
|
|
- this.txtFilePath.Size = new System.Drawing.Size(243, 20);
|
|
|
- this.txtFilePath.TabIndex = 4;
|
|
|
+ this.ImageFileTextBox.Location = new System.Drawing.Point(107, 37);
|
|
|
+ this.ImageFileTextBox.Name = "ImageFileTextBox";
|
|
|
+ this.ImageFileTextBox.Size = new System.Drawing.Size(284, 21);
|
|
|
+ this.ImageFileTextBox.TabIndex = 4;
|
|
|
//
|
|
|
- // btnBrowse
|
|
|
+ // ImageFileButton
|
|
|
//
|
|
|
- this.btnBrowse.Location = new System.Drawing.Point(305, 13);
|
|
|
- this.btnBrowse.Name = "btnBrowse";
|
|
|
- this.btnBrowse.Size = new System.Drawing.Size(75, 23);
|
|
|
- this.btnBrowse.TabIndex = 5;
|
|
|
- this.btnBrowse.Text = "Browse..";
|
|
|
- this.btnBrowse.UseVisualStyleBackColor = true;
|
|
|
- this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
|
|
|
+ this.ImageFileButton.Location = new System.Drawing.Point(397, 35);
|
|
|
+ this.ImageFileButton.Name = "ImageFileButton";
|
|
|
+ this.ImageFileButton.Size = new System.Drawing.Size(75, 23);
|
|
|
+ this.ImageFileButton.TabIndex = 5;
|
|
|
+ this.ImageFileButton.Text = "Browse..";
|
|
|
+ this.ImageFileButton.UseVisualStyleBackColor = true;
|
|
|
+ this.ImageFileButton.Click += new System.EventHandler(this.ImageFileButton_Click);
|
|
|
//
|
|
|
// btnOK
|
|
|
//
|
|
|
- this.btnOK.Location = new System.Drawing.Point(224, 88);
|
|
|
+ this.btnOK.Location = new System.Drawing.Point(164, 161);
|
|
|
this.btnOK.Name = "btnOK";
|
|
|
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
|
|
this.btnOK.TabIndex = 6;
|
|
@@ -126,7 +131,7 @@ namespace ISCSIConsole
|
|
|
// btnCancel
|
|
|
//
|
|
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
|
|
- this.btnCancel.Location = new System.Drawing.Point(305, 88);
|
|
|
+ this.btnCancel.Location = new System.Drawing.Point(245, 161);
|
|
|
this.btnCancel.Name = "btnCancel";
|
|
|
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
|
|
this.btnCancel.TabIndex = 7;
|
|
@@ -134,45 +139,174 @@ namespace ISCSIConsole
|
|
|
this.btnCancel.UseVisualStyleBackColor = true;
|
|
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
|
|
//
|
|
|
+ // FormatLabel
|
|
|
+ //
|
|
|
+ this.FormatLabel.AutoSize = true;
|
|
|
+ this.FormatLabel.Location = new System.Drawing.Point(12, 14);
|
|
|
+ this.FormatLabel.Name = "FormatLabel";
|
|
|
+ this.FormatLabel.Size = new System.Drawing.Size(47, 12);
|
|
|
+ this.FormatLabel.TabIndex = 1;
|
|
|
+ this.FormatLabel.Text = "Format:";
|
|
|
+ //
|
|
|
+ // FormatComboBox
|
|
|
+ //
|
|
|
+ this.FormatComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
|
+ this.FormatComboBox.FormattingEnabled = true;
|
|
|
+ this.FormatComboBox.Location = new System.Drawing.Point(107, 11);
|
|
|
+ this.FormatComboBox.Name = "FormatComboBox";
|
|
|
+ this.FormatComboBox.Size = new System.Drawing.Size(198, 20);
|
|
|
+ this.FormatComboBox.TabIndex = 8;
|
|
|
+ this.FormatComboBox.SelectedIndexChanged += new System.EventHandler(this.FormatComboBox_SelectedIndexChanged);
|
|
|
+ //
|
|
|
+ // TypeLabel
|
|
|
+ //
|
|
|
+ this.TypeLabel.AutoSize = true;
|
|
|
+ this.TypeLabel.Location = new System.Drawing.Point(311, 14);
|
|
|
+ this.TypeLabel.Name = "TypeLabel";
|
|
|
+ this.TypeLabel.Size = new System.Drawing.Size(35, 12);
|
|
|
+ this.TypeLabel.TabIndex = 1;
|
|
|
+ this.TypeLabel.Text = "Type:";
|
|
|
+ //
|
|
|
+ // TypeComboBox
|
|
|
+ //
|
|
|
+ this.TypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
|
+ this.TypeComboBox.FormattingEnabled = true;
|
|
|
+ this.TypeComboBox.Location = new System.Drawing.Point(352, 11);
|
|
|
+ this.TypeComboBox.Name = "TypeComboBox";
|
|
|
+ this.TypeComboBox.Size = new System.Drawing.Size(120, 20);
|
|
|
+ this.TypeComboBox.TabIndex = 8;
|
|
|
+ //
|
|
|
+ // SnapshotLabel
|
|
|
+ //
|
|
|
+ this.SnapshotLabel.AutoSize = true;
|
|
|
+ this.SnapshotLabel.Location = new System.Drawing.Point(12, 94);
|
|
|
+ this.SnapshotLabel.Name = "SnapshotLabel";
|
|
|
+ this.SnapshotLabel.Size = new System.Drawing.Size(89, 12);
|
|
|
+ this.SnapshotLabel.TabIndex = 3;
|
|
|
+ this.SnapshotLabel.Text = "Snapshot File:";
|
|
|
+ //
|
|
|
+ // SnapshotTextBox
|
|
|
+ //
|
|
|
+ this.SnapshotTextBox.Location = new System.Drawing.Point(107, 91);
|
|
|
+ this.SnapshotTextBox.Name = "SnapshotTextBox";
|
|
|
+ this.SnapshotTextBox.Size = new System.Drawing.Size(284, 21);
|
|
|
+ this.SnapshotTextBox.TabIndex = 4;
|
|
|
+ //
|
|
|
+ // SnapshotButton
|
|
|
+ //
|
|
|
+ this.SnapshotButton.Location = new System.Drawing.Point(397, 89);
|
|
|
+ this.SnapshotButton.Name = "SnapshotButton";
|
|
|
+ this.SnapshotButton.Size = new System.Drawing.Size(75, 23);
|
|
|
+ this.SnapshotButton.TabIndex = 5;
|
|
|
+ this.SnapshotButton.Text = "Browse..";
|
|
|
+ this.SnapshotButton.UseVisualStyleBackColor = true;
|
|
|
+ this.SnapshotButton.Click += new System.EventHandler(this.SnapshotButton_Click);
|
|
|
+ //
|
|
|
+ // BlockSizeLabel
|
|
|
+ //
|
|
|
+ this.BlockSizeLabel.AutoSize = true;
|
|
|
+ this.BlockSizeLabel.Location = new System.Drawing.Point(13, 120);
|
|
|
+ this.BlockSizeLabel.Name = "BlockSizeLabel";
|
|
|
+ this.BlockSizeLabel.Size = new System.Drawing.Size(71, 12);
|
|
|
+ this.BlockSizeLabel.TabIndex = 1;
|
|
|
+ this.BlockSizeLabel.Text = "Block Size:";
|
|
|
+ //
|
|
|
+ // KbLabel
|
|
|
+ //
|
|
|
+ this.KbLabel.AutoSize = true;
|
|
|
+ this.KbLabel.Location = new System.Drawing.Point(166, 120);
|
|
|
+ this.KbLabel.Name = "KbLabel";
|
|
|
+ this.KbLabel.Size = new System.Drawing.Size(17, 12);
|
|
|
+ this.KbLabel.TabIndex = 2;
|
|
|
+ this.KbLabel.Text = "KB";
|
|
|
+ //
|
|
|
+ // AheadLabel
|
|
|
+ //
|
|
|
+ this.AheadLabel.AutoSize = true;
|
|
|
+ this.AheadLabel.Location = new System.Drawing.Point(203, 120);
|
|
|
+ this.AheadLabel.Name = "AheadLabel";
|
|
|
+ this.AheadLabel.Size = new System.Drawing.Size(77, 12);
|
|
|
+ this.AheadLabel.TabIndex = 9;
|
|
|
+ this.AheadLabel.Text = "____(____KB)";
|
|
|
+ //
|
|
|
+ // BlockSizeUpDown
|
|
|
+ //
|
|
|
+ this.BlockSizeUpDown.Items.Add("1024");
|
|
|
+ this.BlockSizeUpDown.Items.Add("512");
|
|
|
+ this.BlockSizeUpDown.Items.Add("256");
|
|
|
+ this.BlockSizeUpDown.Items.Add("128");
|
|
|
+ this.BlockSizeUpDown.Items.Add("64");
|
|
|
+ this.BlockSizeUpDown.Items.Add("32");
|
|
|
+ this.BlockSizeUpDown.Items.Add("16");
|
|
|
+ this.BlockSizeUpDown.Location = new System.Drawing.Point(107, 118);
|
|
|
+ this.BlockSizeUpDown.Name = "BlockSizeUpDown";
|
|
|
+ this.BlockSizeUpDown.ReadOnly = true;
|
|
|
+ this.BlockSizeUpDown.Size = new System.Drawing.Size(55, 21);
|
|
|
+ this.BlockSizeUpDown.TabIndex = 10;
|
|
|
+ this.BlockSizeUpDown.Text = "512";
|
|
|
+ this.BlockSizeUpDown.SelectedItemChanged += new System.EventHandler(this.BlockSizeUpDown_SelectedItemChanged);
|
|
|
+ //
|
|
|
// CreateDiskImageForm
|
|
|
//
|
|
|
this.AcceptButton = this.btnOK;
|
|
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
|
|
this.CancelButton = this.btnCancel;
|
|
|
- this.ClientSize = new System.Drawing.Size(394, 125);
|
|
|
+ this.ClientSize = new System.Drawing.Size(484, 211);
|
|
|
+ this.Controls.Add(this.BlockSizeUpDown);
|
|
|
+ this.Controls.Add(this.AheadLabel);
|
|
|
+ this.Controls.Add(this.TypeComboBox);
|
|
|
+ this.Controls.Add(this.FormatComboBox);
|
|
|
this.Controls.Add(this.btnCancel);
|
|
|
this.Controls.Add(this.btnOK);
|
|
|
- this.Controls.Add(this.btnBrowse);
|
|
|
- this.Controls.Add(this.txtFilePath);
|
|
|
+ this.Controls.Add(this.SnapshotButton);
|
|
|
+ this.Controls.Add(this.ImageFileButton);
|
|
|
+ this.Controls.Add(this.SnapshotTextBox);
|
|
|
+ this.Controls.Add(this.SnapshotLabel);
|
|
|
+ this.Controls.Add(this.ImageFileTextBox);
|
|
|
this.Controls.Add(this.lblFilePath);
|
|
|
- this.Controls.Add(this.label1);
|
|
|
+ this.Controls.Add(this.TypeLabel);
|
|
|
+ this.Controls.Add(this.KbLabel);
|
|
|
+ this.Controls.Add(this.MbLabel);
|
|
|
+ this.Controls.Add(this.FormatLabel);
|
|
|
+ this.Controls.Add(this.BlockSizeLabel);
|
|
|
this.Controls.Add(this.lblSize);
|
|
|
- this.Controls.Add(this.numericDiskSize);
|
|
|
+ this.Controls.Add(this.ImageSizeUpDown);
|
|
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
|
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
|
this.MaximizeBox = false;
|
|
|
- this.MaximumSize = new System.Drawing.Size(400, 150);
|
|
|
- this.MinimumSize = new System.Drawing.Size(400, 150);
|
|
|
+ this.MaximumSize = new System.Drawing.Size(500, 250);
|
|
|
+ this.MinimumSize = new System.Drawing.Size(500, 250);
|
|
|
this.Name = "CreateDiskImageForm";
|
|
|
+ this.ShowInTaskbar = false;
|
|
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
|
|
this.Text = "Create Virtual Disk";
|
|
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CreateDiskImageForm_FormClosing);
|
|
|
- ((System.ComponentModel.ISupportInitialize)(this.numericDiskSize)).EndInit();
|
|
|
+ this.Shown += new System.EventHandler(this.CreateDiskImageForm_Shown);
|
|
|
+ ((System.ComponentModel.ISupportInitialize)(this.ImageSizeUpDown)).EndInit();
|
|
|
this.ResumeLayout(false);
|
|
|
this.PerformLayout();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
-
|
|
|
- private System.Windows.Forms.SaveFileDialog saveVirtualDiskFileDialog;
|
|
|
- private System.Windows.Forms.NumericUpDown numericDiskSize;
|
|
|
+ private System.Windows.Forms.NumericUpDown ImageSizeUpDown;
|
|
|
private System.Windows.Forms.Label lblSize;
|
|
|
- private System.Windows.Forms.Label label1;
|
|
|
+ private System.Windows.Forms.Label MbLabel;
|
|
|
private System.Windows.Forms.Label lblFilePath;
|
|
|
- private System.Windows.Forms.TextBox txtFilePath;
|
|
|
- private System.Windows.Forms.Button btnBrowse;
|
|
|
+ private System.Windows.Forms.TextBox ImageFileTextBox;
|
|
|
+ private System.Windows.Forms.Button ImageFileButton;
|
|
|
private System.Windows.Forms.Button btnOK;
|
|
|
private System.Windows.Forms.Button btnCancel;
|
|
|
+ private System.Windows.Forms.Label FormatLabel;
|
|
|
+ private System.Windows.Forms.ComboBox FormatComboBox;
|
|
|
+ private System.Windows.Forms.Label TypeLabel;
|
|
|
+ private System.Windows.Forms.ComboBox TypeComboBox;
|
|
|
+ private System.Windows.Forms.Label SnapshotLabel;
|
|
|
+ private System.Windows.Forms.TextBox SnapshotTextBox;
|
|
|
+ private System.Windows.Forms.Button SnapshotButton;
|
|
|
+ private System.Windows.Forms.Label BlockSizeLabel;
|
|
|
+ private System.Windows.Forms.Label KbLabel;
|
|
|
+ private System.Windows.Forms.Label AheadLabel;
|
|
|
+ private System.Windows.Forms.DomainUpDown BlockSizeUpDown;
|
|
|
}
|
|
|
}
|