CP-28676: XC: Allow choosing boot options during new VM wizard

1. Update the duplicated shortcuts on CPU&Mem Page
2. Default radio boxes invisible
3. Move hardcoded logic to VM.cs
4. BIOS boot should be always enabled
5. Move radio boxes to Installation Media page
6. Extract radio boxes as a user control
7. Update summary

Signed-off-by: Tim Liu <tim.liu@citrix.com>
This commit is contained in:
Tim Liu 2018-08-23 14:41:35 +08:00 committed by Konstantina Chremmou
parent 98207906d7
commit f0b1e6b3af
19 changed files with 1223 additions and 269 deletions

View File

@ -0,0 +1,101 @@
using System.Drawing;
namespace XenAdmin.Wizards
{
partial class BootModesControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BootModesControl));
this.groupBoxBootMode = new System.Windows.Forms.GroupBox();
this.tableLayoutPanelBootMode = new System.Windows.Forms.TableLayoutPanel();
this.radioButtonUEFISecureBoot = new System.Windows.Forms.RadioButton();
this.radioButtonBIOSBoot = new System.Windows.Forms.RadioButton();
this.radioButtonUEFIBoot = new System.Windows.Forms.RadioButton();
this.groupBoxBootMode.SuspendLayout();
this.tableLayoutPanelBootMode.SuspendLayout();
this.SuspendLayout();
//
// groupBoxBootMode
//
this.groupBoxBootMode.Controls.Add(this.tableLayoutPanelBootMode);
resources.ApplyResources(this.groupBoxBootMode, "groupBoxBootMode");
this.groupBoxBootMode.Name = "groupBoxBootMode";
this.groupBoxBootMode.TabStop = false;
//
// tableLayoutPanelBootMode
//
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFISecureBoot, 0, 2);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonBIOSBoot, 0, 0);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFIBoot, 0, 1);
resources.ApplyResources(this.tableLayoutPanelBootMode, "tableLayoutPanelBootMode");
this.tableLayoutPanelBootMode.Name = "tableLayoutPanelBootMode";
//
// radioButtonUEFISecureBoot
//
resources.ApplyResources(this.radioButtonUEFISecureBoot, "radioButtonUEFISecureBoot");
this.radioButtonUEFISecureBoot.Name = "radioButtonUEFISecureBoot";
this.radioButtonUEFISecureBoot.UseVisualStyleBackColor = true;
//
// radioButtonBIOSBoot
//
resources.ApplyResources(this.radioButtonBIOSBoot, "radioButtonBIOSBoot");
this.radioButtonBIOSBoot.Checked = true;
this.radioButtonBIOSBoot.Name = "radioButtonBIOSBoot";
this.radioButtonBIOSBoot.TabStop = true;
this.radioButtonBIOSBoot.UseVisualStyleBackColor = true;
//
// radioButtonUEFIBoot
//
resources.ApplyResources(this.radioButtonUEFIBoot, "radioButtonUEFIBoot");
this.radioButtonUEFIBoot.Name = "radioButtonUEFIBoot";
this.radioButtonUEFIBoot.UseVisualStyleBackColor = true;
//
// BootModesControl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.groupBoxBootMode);
this.DoubleBuffered = true;
this.Name = "BootModesControl";
this.groupBoxBootMode.ResumeLayout(false);
this.tableLayoutPanelBootMode.ResumeLayout(false);
this.tableLayoutPanelBootMode.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBoxBootMode;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelBootMode;
private System.Windows.Forms.RadioButton radioButtonUEFISecureBoot;
private System.Windows.Forms.RadioButton radioButtonBIOSBoot;
private System.Windows.Forms.RadioButton radioButtonUEFIBoot;
}
}

View File

@ -0,0 +1,82 @@
/* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.Windows.Forms;
using XenAPI;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards
{
public partial class BootModesControl : UserControl
{
public BootModesControl()
{
InitializeComponent();
}
public VM TemplateVM
{
get { return _templateVM; }
set
{
if (_templateVM == value)
return;
_templateVM = value;
if (_templateVM != null && _templateVM.IsHVM())
{
radioButtonUEFIBoot.Enabled = _templateVM.CanSupportUEFIBoot();
radioButtonUEFISecureBoot.Enabled = _templateVM.CanSupportUEFISecureBoot();
if (_templateVM.IsUEFIEnabled())
if (_templateVM.IsSecureBootEnabled())
radioButtonUEFISecureBoot.Checked = true;
else
radioButtonUEFIBoot.Checked = true;
else
radioButtonBIOSBoot.Checked = true;
}
else
{
radioButtonBIOSBoot.Checked = false;
radioButtonUEFIBoot.Checked = false;
radioButtonUEFISecureBoot.Checked = false;
}
}
}
private VM _templateVM;
public BootMode SelectedOption
{
get { return radioButtonUEFISecureBoot.Checked ? BootMode.UEFI_SECURE_BOOT: (radioButtonUEFIBoot.Checked ? BootMode.UEFI_BOOT : BootMode.BIOS_BOOT); }
}
}
}

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonUEFISecureBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonUEFISecureBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="radioButtonUEFISecureBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 56</value>
</data>
<data name="radioButtonUEFISecureBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 17</value>
</data>
<data name="radioButtonUEFISecureBoot.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="radioButtonUEFISecureBoot.Text" xml:space="preserve">
<value>UEFI &amp;Secure Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonBIOSBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonBIOSBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 6</value>
</data>
<data name="radioButtonBIOSBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 17</value>
</data>
<data name="radioButtonBIOSBoot.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.Text" xml:space="preserve">
<value>&amp;BIOS Boot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Name" xml:space="preserve">
<value>radioButtonBIOSBoot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFIBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonUEFIBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 31</value>
</data>
<data name="radioButtonUEFIBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 17</value>
</data>
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
<value>&amp;UEFI Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Name" xml:space="preserve">
<value>radioButtonUEFIBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanelBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanelBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
</data>
<data name="tableLayoutPanelBootMode.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tableLayoutPanelBootMode.RowCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>138, 80</value>
</data>
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0" /&gt;&lt;Rows Styles="Absolute,25,Absolute,25,Absolute,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBoxBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="groupBoxBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 99</value>
</data>
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBoxBootMode.Text" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Name" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>150, 105</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 105</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>BootModesControl</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonUEFISecureBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonUEFISecureBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="radioButtonUEFISecureBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 56</value>
</data>
<data name="radioButtonUEFISecureBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 17</value>
</data>
<data name="radioButtonUEFISecureBoot.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="radioButtonUEFISecureBoot.Text" xml:space="preserve">
<value>UEFI &amp;Secure Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonBIOSBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonBIOSBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 6</value>
</data>
<data name="radioButtonBIOSBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 17</value>
</data>
<data name="radioButtonBIOSBoot.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.Text" xml:space="preserve">
<value>&amp;BIOS Boot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Name" xml:space="preserve">
<value>radioButtonBIOSBoot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFIBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonUEFIBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 31</value>
</data>
<data name="radioButtonUEFIBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 17</value>
</data>
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
<value>&amp;UEFI Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Name" xml:space="preserve">
<value>radioButtonUEFIBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanelBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanelBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
</data>
<data name="tableLayoutPanelBootMode.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tableLayoutPanelBootMode.RowCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>138, 80</value>
</data>
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0" /&gt;&lt;Rows Styles="Absolute,25,Absolute,25,Absolute,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBoxBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="groupBoxBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 99</value>
</data>
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBoxBootMode.Text" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Name" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>150, 105</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 105</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>BootModesControl</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonUEFISecureBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonUEFISecureBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="radioButtonUEFISecureBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 56</value>
</data>
<data name="radioButtonUEFISecureBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 17</value>
</data>
<data name="radioButtonUEFISecureBoot.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="radioButtonUEFISecureBoot.Text" xml:space="preserve">
<value>UEFI &amp;Secure Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonBIOSBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonBIOSBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 6</value>
</data>
<data name="radioButtonBIOSBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 17</value>
</data>
<data name="radioButtonBIOSBoot.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.Text" xml:space="preserve">
<value>&amp;BIOS Boot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Name" xml:space="preserve">
<value>radioButtonBIOSBoot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFIBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonUEFIBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 31</value>
</data>
<data name="radioButtonUEFIBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 17</value>
</data>
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
<value>&amp;UEFI Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Name" xml:space="preserve">
<value>radioButtonUEFIBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanelBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanelBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
</data>
<data name="tableLayoutPanelBootMode.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tableLayoutPanelBootMode.RowCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>138, 80</value>
</data>
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0" /&gt;&lt;Rows Styles="Absolute,25,Absolute,25,Absolute,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBoxBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="groupBoxBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 99</value>
</data>
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBoxBootMode.Text" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Name" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>150, 105</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 105</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>BootModesControl</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -167,13 +167,13 @@ namespace XenAdmin.Wizards.NewVMWizard
page_3_InstallationMedia.SelectedPvArgs,
page_3_InstallationMedia.SelectedCD,
page_3_InstallationMedia.SelectedUrl,
page_3_InstallationMedia.SelectedBootMode,
m_affinity,
page_5_CpuMem.SelectedVcpusMax,
page_5_CpuMem.SelectedVcpusAtStartup,
(long)page_5_CpuMem.SelectedMemoryDynamicMin,
(long)page_5_CpuMem.SelectedMemoryDynamicMax,
(long)page_5_CpuMem.SelectedMemoryStaticMax,
page_5_CpuMem.SelectedBootMode,
page_6b_LunPerVdi.MapLunsToVdisRequired
? page_6b_LunPerVdi.MappedDisks
: page_6_Storage.SelectedDisks,

View File

@ -44,16 +44,9 @@ namespace XenAdmin.Wizards.NewVMWizard
this.comboBoxTopology = new XenAdmin.Controls.CPUTopologyComboBox();
this.labelTopology = new System.Windows.Forms.Label();
this.comboBoxVCPUs = new System.Windows.Forms.ComboBox();
this.groupBoxBootMode = new System.Windows.Forms.GroupBox();
this.tableLayoutPanelBootMode = new System.Windows.Forms.TableLayoutPanel();
this.radioButtonUEFISecureBoot = new System.Windows.Forms.RadioButton();
this.radioButtonBIOSBoot = new System.Windows.Forms.RadioButton();
this.radioButtonUEFIBoot = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.ErrorPanel.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.groupBoxBootMode.SuspendLayout();
this.tableLayoutPanelBootMode.SuspendLayout();
this.SuspendLayout();
//
// labelVCPUs
@ -124,7 +117,6 @@ namespace XenAdmin.Wizards.NewVMWizard
this.tableLayoutPanel1.Controls.Add(this.spinnerDynMin, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.labelTopology, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.comboBoxVCPUs, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.groupBoxBootMode, 0, 8);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// comboBoxInitialVCPUs
@ -166,42 +158,6 @@ namespace XenAdmin.Wizards.NewVMWizard
this.comboBoxVCPUs.Name = "comboBoxVCPUs";
this.comboBoxVCPUs.SelectedIndexChanged += new System.EventHandler(this.vCPU_ValueChanged);
//
// groupBoxBootMode
//
this.tableLayoutPanel1.SetColumnSpan(this.groupBoxBootMode, 2);
this.groupBoxBootMode.Controls.Add(this.tableLayoutPanelBootMode);
resources.ApplyResources(this.groupBoxBootMode, "groupBoxBootMode");
this.groupBoxBootMode.Name = "groupBoxBootMode";
this.groupBoxBootMode.TabStop = false;
//
// tableLayoutPanelBootMode
//
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFISecureBoot, 0, 2);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonBIOSBoot, 0, 0);
this.tableLayoutPanelBootMode.Controls.Add(this.radioButtonUEFIBoot, 0, 1);
resources.ApplyResources(this.tableLayoutPanelBootMode, "tableLayoutPanelBootMode");
this.tableLayoutPanelBootMode.Name = "tableLayoutPanelBootMode";
//
// radioButtonUEFISecureBoot
//
resources.ApplyResources(this.radioButtonUEFISecureBoot, "radioButtonUEFISecureBoot");
this.radioButtonUEFISecureBoot.Name = "radioButtonUEFISecureBoot";
this.radioButtonUEFISecureBoot.UseVisualStyleBackColor = true;
//
// radioButtonBIOSBoot
//
resources.ApplyResources(this.radioButtonBIOSBoot, "radioButtonBIOSBoot");
this.radioButtonBIOSBoot.Name = "radioButtonBIOSBoot";
this.radioButtonBIOSBoot.TabStop = true;
this.radioButtonBIOSBoot.UseVisualStyleBackColor = true;
//
// radioButtonUEFIBoot
//
resources.ApplyResources(this.radioButtonUEFIBoot, "radioButtonUEFIBoot");
this.radioButtonUEFIBoot.Name = "radioButtonUEFIBoot";
this.radioButtonUEFIBoot.TabStop = true;
this.radioButtonUEFIBoot.UseVisualStyleBackColor = true;
//
// Page_CpuMem
//
resources.ApplyResources(this, "$this");
@ -214,9 +170,6 @@ namespace XenAdmin.Wizards.NewVMWizard
this.ErrorPanel.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.groupBoxBootMode.ResumeLayout(false);
this.tableLayoutPanelBootMode.ResumeLayout(false);
this.tableLayoutPanelBootMode.PerformLayout();
this.ResumeLayout(false);
}
@ -238,10 +191,5 @@ namespace XenAdmin.Wizards.NewVMWizard
private System.Windows.Forms.ComboBox comboBoxVCPUs;
private System.Windows.Forms.ComboBox comboBoxInitialVCPUs;
private System.Windows.Forms.Label labelInitialVCPUs;
private System.Windows.Forms.GroupBox groupBoxBootMode;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelBootMode;
private System.Windows.Forms.RadioButton radioButtonUEFISecureBoot;
private System.Windows.Forms.RadioButton radioButtonBIOSBoot;
private System.Windows.Forms.RadioButton radioButtonUEFIBoot;
}
}

View File

@ -37,7 +37,6 @@ using XenAdmin.Controls;
using XenAdmin.Controls.Ballooning;
using XenAdmin.Core;
using XenAPI;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards.NewVMWizard
{
@ -119,8 +118,6 @@ namespace XenAdmin.Wizards.NewVMWizard
SetSpinnerLimitsAndIncrement();
InitialiseBootModeControls();
ValuesUpdated();
initialising = false;
@ -131,42 +128,6 @@ namespace XenAdmin.Wizards.NewVMWizard
comboBoxVCPUs.Select();
}
private void InitialiseBootModeControls()
{
if (Template.IsHVM())
{
groupBoxBootMode.Visible = true;
radioButtonBIOSBoot.Enabled = Template.CanSupportBIOSBoot();
radioButtonUEFIBoot.Enabled = Template.CanSupportUEFIBoot();
radioButtonUEFISecureBoot.Enabled = Template.CanSupportUEFISecureBoot();
var firmware = string.Empty;
if (Template.HVM_boot_params != null)
Template.HVM_boot_params.TryGetValue("firmware", out firmware);
var secureboot = string.Empty;
if (Template.platform != null)
Template.platform.TryGetValue("secureboot", out secureboot);
if (firmware != null && firmware.ToLower() == "uefi")
{
var isSecurebootEnabled = secureboot != null && secureboot.ToLower() == "true";
radioButtonUEFIBoot.Checked = !isSecurebootEnabled;
radioButtonUEFISecureBoot.Checked = isSecurebootEnabled;
}
else
{
radioButtonBIOSBoot.Checked = true;
}
}
else
{
groupBoxBootMode.Visible = false;
radioButtonBIOSBoot.Checked = false;
radioButtonUEFIBoot.Checked = false;
radioButtonUEFISecureBoot.Checked = false;
}
}
private void InitialiseVcpuControls()
{
labelVCPUs.Text = isVcpuHotplugSupported
@ -321,14 +282,6 @@ namespace XenAdmin.Wizards.NewVMWizard
}
}
public BootMode SelectedBootMode
{
get
{
return radioButtonUEFISecureBoot.Checked ? BootMode.UEFI_SECURE_BOOT : (radioButtonUEFIBoot.Checked ? BootMode.UEFI_BOOT : BootMode.BIOS_BOOT);
}
}
public override List<KeyValuePair<string, string>> PageSummary
{
get

View File

@ -139,7 +139,7 @@
<value>1</value>
</data>
<data name="labelVCPUs.Text" xml:space="preserve">
<value>Number of v&amp;CPUs:</value>
<value>&amp;Number of vCPUs:</value>
</data>
<data name="labelVCPUs.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@ -414,141 +414,6 @@
<data name="&gt;&gt;comboBoxVCPUs.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="radioButtonUEFISecureBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFISecureBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 49</value>
</data>
<data name="radioButtonUEFISecureBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 17</value>
</data>
<data name="radioButtonUEFISecureBoot.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="radioButtonUEFISecureBoot.Text" xml:space="preserve">
<value>UEFI &amp;Secure Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Name" xml:space="preserve">
<value>radioButtonUEFISecureBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFISecureBoot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="radioButtonBIOSBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonBIOSBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="radioButtonBIOSBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 17</value>
</data>
<data name="radioButtonBIOSBoot.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="radioButtonBIOSBoot.Text" xml:space="preserve">
<value>&amp;BIOS Boot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Name" xml:space="preserve">
<value>radioButtonBIOSBoot</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonBIOSBoot.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="radioButtonUEFIBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonUEFIBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 26</value>
</data>
<data name="radioButtonUEFIBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 17</value>
</data>
<data name="radioButtonUEFIBoot.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="radioButtonUEFIBoot.Text" xml:space="preserve">
<value>&amp;UEFI Boot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Name" xml:space="preserve">
<value>radioButtonUEFIBoot</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.Parent" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;radioButtonUEFIBoot.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanelBootMode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanelBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 16</value>
</data>
<data name="tableLayoutPanelBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>244, 75</value>
</data>
<data name="tableLayoutPanelBootMode.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Name" xml:space="preserve">
<value>tableLayoutPanelBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.Parent" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBootMode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelBootMode.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonUEFISecureBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonBIOSBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonUEFIBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,20" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="groupBoxBootMode.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 259</value>
</data>
<data name="groupBoxBootMode.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 3, 245, 3</value>
</data>
<data name="groupBoxBootMode.Size" type="System.Drawing.Size, System.Drawing">
<value>250, 94</value>
</data>
<data name="groupBoxBootMode.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="groupBoxBootMode.Text" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Name" xml:space="preserve">
<value>groupBoxBootMode</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;groupBoxBootMode.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -556,10 +421,10 @@
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>10</value>
<value>9</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>515, 355</value>
<value>515, 255</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
@ -577,7 +442,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="comboBoxInitialVCPUs" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelInitialVCPUs" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelInvalidVCPUWarning" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxTopology" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label5" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="spinnerStatMax" Row="7" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelVCPUs" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="spinnerDynMax" Row="6" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="spinnerDynMin" Row="5" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelTopology" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxVCPUs" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="groupBoxBootMode" Row="8" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,190,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="comboBoxInitialVCPUs" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelInitialVCPUs" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelInvalidVCPUWarning" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxTopology" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label5" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="spinnerStatMax" Row="7" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelVCPUs" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="spinnerDynMax" Row="6" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="spinnerDynMin" Row="5" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelTopology" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxVCPUs" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,190,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="label5.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
@ -667,7 +532,7 @@
<value>Bottom</value>
</data>
<data name="ErrorPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 355</value>
<value>0, 255</value>
</data>
<data name="ErrorPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>515, 112</value>
@ -697,7 +562,7 @@
<value>96, 96</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>515, 467</value>
<value>515, 367</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Page_CpuMem</value>

View File

@ -42,6 +42,7 @@ namespace XenAdmin.Wizards.NewVMWizard
this.panelInstallationMethod = new System.Windows.Forms.TableLayoutPanel();
this.linkLabelAttachNewIsoStore = new System.Windows.Forms.LinkLabel();
this.comboBoxToolTip = new System.Windows.Forms.ToolTip(this.components);
this.bootModesControl1 = new XenAdmin.Wizards.BootModesControl();
this.PvBootBox.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panelInstallationMethod.SuspendLayout();
@ -97,13 +98,13 @@ namespace XenAdmin.Wizards.NewVMWizard
//
resources.ApplyResources(this.CdDropDownBox, "CdDropDownBox");
this.CdDropDownBox.connection = null;
this.CdDropDownBox.DisplayISO = false;
this.CdDropDownBox.DisplayPhysical = false;
this.CdDropDownBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CdDropDownBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CdDropDownBox.Empty = false;
this.CdDropDownBox.FormattingEnabled = true;
this.CdDropDownBox.DisplayISO = false;
this.CdDropDownBox.Name = "CdDropDownBox";
this.CdDropDownBox.DisplayPhysical = false;
this.CdDropDownBox.SelectedCD = null;
//
// UrlTextBox
@ -129,10 +130,17 @@ namespace XenAdmin.Wizards.NewVMWizard
this.linkLabelAttachNewIsoStore.TabStop = true;
this.linkLabelAttachNewIsoStore.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// bootModesControl1
//
this.bootModesControl1.BackColor = System.Drawing.SystemColors.Control;
resources.ApplyResources(this.bootModesControl1, "bootModesControl1");
this.bootModesControl1.Name = "bootModesControl1";
//
// Page_InstallationMedia
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.bootModesControl1);
this.Controls.Add(this.panelInstallationMethod);
this.Controls.Add(this.PvBootBox);
this.Name = "Page_InstallationMedia";
@ -160,5 +168,6 @@ namespace XenAdmin.Wizards.NewVMWizard
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.LinkLabel linkLabelAttachNewIsoStore;
private System.Windows.Forms.ToolTip comboBoxToolTip;
private BootModesControl bootModesControl1;
}
}

View File

@ -42,6 +42,7 @@ using XenAdmin.Dialogs;
using XenCenterLib;
using System.Windows.Forms;
using System.Drawing;
using BootMode = XenAdmin.Actions.VMActions.BootMode;
namespace XenAdmin.Wizards.NewVMWizard
{
@ -64,6 +65,8 @@ namespace XenAdmin.Wizards.NewVMWizard
public bool ShowBootParameters { get { return !SelectedTemplate.IsHVM(); } }
public bool ShowBootModesControl { get { return SelectedTemplate.IsHVM(); } }
protected override void PageLoadedCore(PageLoadedDirection direction)
{
VM oldTemplate = m_template;
@ -89,6 +92,9 @@ namespace XenAdmin.Wizards.NewVMWizard
PvBootBox.Visible = ShowBootParameters;
PvBootTextBox.Text = m_template.PV_args;
bootModesControl1.Visible = ShowBootModesControl;
bootModesControl1.TemplateVM = m_template;
if (!ShowInstallationMedia)
{
CdRadioButton.Checked = UrlRadioButton.Checked = false;
@ -155,6 +161,8 @@ namespace XenAdmin.Wizards.NewVMWizard
UpdateEnablement();
}
public Actions.VMActions.BootMode SelectedBootMode { get { return ShowBootModesControl ? bootModesControl1.SelectedOption : BootMode.NOT_AVAILABLE; } }
private bool IsBootFromNetworkCustomTemplate(bool userTemplate)
{
return (userTemplate && m_template.GetBootOrder().StartsWith("N"));
@ -276,6 +284,8 @@ namespace XenAdmin.Wizards.NewVMWizard
sum.Add(new KeyValuePair<string, string>(Messages.NEWVMWIZARD_NETWORKMEDIAPAGE_INSTALLATIONURL, SelectedUrl));
break;
}
if (ShowBootModesControl)
sum.Add(new KeyValuePair<string, string>(Messages.BOOT_MODE, SelectedBootMode.StringOf()));
return sum;
}
}

View File

@ -561,6 +561,39 @@
<metadata name="comboBoxToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="bootModesControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 179</value>
</data>
<data name="bootModesControl1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="bootModesControl1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>200, 104</value>
</data>
<data name="bootModesControl1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="bootModesControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>277, 104</value>
</data>
<data name="bootModesControl1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="bootModesControl1.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;bootModesControl1.Name" xml:space="preserve">
<value>bootModesControl1</value>
</data>
<data name="&gt;&gt;bootModesControl1.Type" xml:space="preserve">
<value>XenAdmin.Wizards.BootModesControl, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;bootModesControl1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bootModesControl1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -1019,6 +1019,12 @@
<SubType>Form</SubType>
</Compile>
<Compile Include="Diagnostics\Checks\PoolHasGFS2SR.cs" />
<Compile Include="Wizards\BootModesControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Wizards\BootModesControl.Designer.cs">
<DependentUpon>BootModesControl.cs</DependentUpon>
</Compile>
<Compile Include="XenSearch\TreeNodeGroupAcceptor.cs">
</Compile>
<Compile Include="Dialogs\FolderChangeDialog.cs">
@ -2668,6 +2674,18 @@
<EmbeddedResource Include="Wizards\PatchingWizard\PatchingWizard_UploadPage.zh-CN.resx">
<DependentUpon>PatchingWizard_UploadPage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Wizards\BootModesControl.ja.resx">
<DependentUpon>BootModesControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Wizards\BootModesControl.resx">
<DependentUpon>BootModesControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Wizards\BootModesControl.zh-CN.resx">
<DependentUpon>BootModesControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Wizards\WizardProgress.resx">
<DependentUpon>WizardProgress.cs</DependentUpon>
<SubType>Designer</SubType>
@ -6649,6 +6667,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Wizards\NewVMWizard\Page_CpuMem.zh-CN.resx">
<DependentUpon>Page_CpuMem.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Wizards\NewVMWizard\Page_Finish.ja.resx">
<DependentUpon>Page_Finish.cs</DependentUpon>
@ -6890,6 +6909,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Wizards\WizardProgress.ja.resx">
<DependentUpon>WizardProgress.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Wizards\WizardProgress.zh-CN.resx">
<DependentUpon>WizardProgress.cs</DependentUpon>

View File

@ -47,7 +47,25 @@ namespace XenAdmin.Actions.VMActions
Network
}
public enum BootMode { BIOS_BOOT, UEFI_BOOT, UEFI_SECURE_BOOT }
public enum BootMode { BIOS_BOOT, UEFI_BOOT, UEFI_SECURE_BOOT, NOT_AVAILABLE }
public static class EnumExt
{
public static string StringOf(this BootMode x)
{
switch (x)
{
case BootMode.BIOS_BOOT:
return "BIOS Boot";
case BootMode.UEFI_BOOT:
return "UEFI Boot";
case BootMode.UEFI_SECURE_BOOT:
return "UEFI Secure Boot";
default:
return "Not Available";
}
}
}
public class CreateVMAction : AsyncAction
{
@ -59,11 +77,11 @@ namespace XenAdmin.Actions.VMActions
private readonly string PvArgs;
private readonly VDI Cd;
private readonly string Url;
private readonly BootMode BootMode;
private readonly Host HomeServer;
private readonly long VcpusMax;
private readonly long VcpusAtStartup;
private readonly long MemoryDynamicMin, MemoryDynamicMax, MemoryStaticMax;
private readonly BootMode BootMode;
private readonly List<DiskDescription> Disks;
private readonly List<VIF> Vifs;
private readonly bool StartAfter;
@ -117,8 +135,8 @@ namespace XenAdmin.Actions.VMActions
public CreateVMAction(IXenConnection connection, VM template, Host copyBiosStringsFrom,
string name, string description, InstallMethod installMethod,
string pvArgs, VDI cd, string url, Host homeServer, long vcpusMax, long vcpusAtStartup,
long memoryDynamicMin, long memoryDynamicMax, long memoryStaticMax, BootMode bootMode,
string pvArgs, VDI cd, string url, BootMode bootMode, Host homeServer, long vcpusMax, long vcpusAtStartup,
long memoryDynamicMin, long memoryDynamicMax, long memoryStaticMax,
List<DiskDescription> disks, SR fullCopySR, List<VIF> vifs, bool startAfter,
Action<VM, bool> warningDialogHAInvalidConfig,
Action<VMStartAbstractAction, Failure> startDiagnosisForm,
@ -135,13 +153,13 @@ namespace XenAdmin.Actions.VMActions
PvArgs = pvArgs;
Cd = cd;
Url = url;
BootMode = bootMode;
HomeServer = homeServer;
VcpusMax = vcpusMax;
VcpusAtStartup = vcpusAtStartup;
MemoryDynamicMin = memoryDynamicMin;
MemoryDynamicMax = memoryDynamicMax;
MemoryStaticMax = memoryStaticMax;
BootMode = bootMode;
Disks = disks;
Vifs = vifs;
StartAfter = startAfter;
@ -363,21 +381,14 @@ namespace XenAdmin.Actions.VMActions
{
XenAPI.VM.set_PV_args(Session, VM.opaque_ref, PvArgs);
}
else
else if (BootMode != BootMode.NOT_AVAILABLE)
{
var hvm_params = VM.HVM_boot_params;
var platform = VM.platform;
if (BootMode == BootMode.UEFI_SECURE_BOOT)
{
hvm_params["firmware"] = "uefi";
platform["secureboot"] = "true";
}
else
{
hvm_params["firmware"] = BootMode == BootMode.UEFI_BOOT ? "uefi" : "bios";
platform["secureboot"] = "false";
}
hvm_params["firmware"] = BootMode != BootMode.BIOS_BOOT ? "uefi" : "bios";
XenAPI.VM.set_HVM_boot_params(Session, VM.opaque_ref, hvm_params);
var platform = VM.platform;
platform["secureboot"] = BootMode == BootMode.UEFI_SECURE_BOOT ? "true" : "false";
XenAPI.VM.set_platform(Session, VM.opaque_ref, platform);
}
}

View File

@ -6062,6 +6062,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Boot Mode.
/// </summary>
public static string BOOT_MODE {
get {
return ResourceManager.GetString("BOOT_MODE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Boot order: {0}.
/// </summary>
@ -36974,7 +36983,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Ma&amp;ximum number of vCPUs:.
/// Looks up a localized string similar to Maximum number of &amp;vCPUs:.
/// </summary>
public static string VM_CPUMEMPAGE_MAX_VCPUS_LABEL {
get {
@ -37010,7 +37019,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Number of v&amp;CPUs:.
/// Looks up a localized string similar to &amp;Number of vCPUs:.
/// </summary>
public static string VM_CPUMEMPAGE_VCPUS_LABEL {
get {

View File

@ -2199,6 +2199,9 @@ SR の物理使用量が {2} を超えるとアラートが送信されます。
<data name="BOND_MASTER_GONE" xml:space="preserve">
<value>[XenCenter] のキャッシュにボンド マスターが見つかりません。</value>
</data>
<data name="BOOTMODE" xml:space="preserve">
<value>起動モード</value>
</data>
<data name="BOOTORDER" xml:space="preserve">
<value>起動順序: {0}</value>
</data>

View File

@ -2222,6 +2222,9 @@ Deleting this bond will disrupt traffic through the secondary interface on the b
<data name="BOOT_HARD_DISK" xml:space="preserve">
<value>Hard Disk</value>
</data>
<data name="BOOT_MODE" xml:space="preserve">
<value>Boot Mode</value>
</data>
<data name="BROKEN_SRS_AFTER_UPGRADE" xml:space="preserve">
<value>There are broken SRs after the upgrade. To solve this problem you should reattach the SRs.</value>
</data>
@ -12854,7 +12857,7 @@ To start a [XenServer] trial, click the button below.</value>
<value>Initial number of v&amp;CPUs:</value>
</data>
<data name="VM_CPUMEMPAGE_MAX_VCPUS_LABEL" xml:space="preserve">
<value>Ma&amp;ximum number of vCPUs:</value>
<value>Maximum number of &amp;vCPUs:</value>
</data>
<data name="VM_CPUMEMPAGE_MAX_VCPUS_READONLY" xml:space="preserve">
<value>The maximum number of vCPUs, the topology and the vCPU priority can only be changed when the VM is shut down. </value>
@ -12866,7 +12869,7 @@ To start a [XenServer] trial, click the button below.</value>
<value>If the initial number of vCPUs is set lower than the maximum number, more vCPUs can be added to the virtual machine while it is running. </value>
</data>
<data name="VM_CPUMEMPAGE_VCPUS_LABEL" xml:space="preserve">
<value>Number of v&amp;CPUs:</value>
<value>&amp;Number of vCPUs:</value>
</data>
<data name="VM_ENLIGHTENMENT" xml:space="preserve">
<value>Container Management</value>

View File

@ -2195,6 +2195,9 @@
<data name="BOND_MASTER_GONE" xml:space="preserve">
<value>在 [XenCenter] 的缓存中找不到绑定主对象。</value>
</data>
<data name="BOOT_MODE" xml:space="preserve">
<value>启动模式</value>
</data>
<data name="BOOTORDER" xml:space="preserve">
<value>启动顺序: {0}</value>
</data>

View File

@ -311,6 +311,24 @@ namespace XenAPI
HVM_boot_params = SetDictionaryKey(HVM_boot_params, "order", value.ToLower());
}
public bool IsUEFIEnabled()
{
if (!IsHVM())
return false;
var firmware = Get(HVM_boot_params, "firmware");
return !string.IsNullOrEmpty(firmware) && firmware.Trim().ToLower() == "uefi";
}
public bool IsSecureBootEnabled()
{
if (!IsUEFIEnabled())
return false;
var secureboot = Get(platform, "secureboot");
return !string.IsNullOrEmpty(secureboot) && secureboot.Trim().ToLower() == "true";
}
public int GetVcpuWeight()
{
if (VCPUs_params != null && VCPUs_params.ContainsKey("weight"))
@ -503,11 +521,6 @@ namespace XenAPI
#region Supported Boot Mode Recommendations
public bool CanSupportBIOSBoot()
{
return GetRecommendationByField("supports-bios") == "yes";
}
public bool CanSupportUEFIBoot()
{
return GetRecommendationByField("supports-uefi") == "yes";