CA-82957: Refactoring to our custom ComboBoxes with regards to resource management and disposal.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2013-09-27 16:57:50 +01:00
parent d81538d43d
commit c051f8de94
18 changed files with 70 additions and 481 deletions

View File

@ -1,36 +0,0 @@
namespace XenAdmin.Controls
{
partial class CDChanger
{
/// <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()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -36,11 +36,10 @@ using XenAdmin.Core;
namespace XenAdmin.Controls namespace XenAdmin.Controls
{ {
public partial class CDChanger : ISODropDownBox public class CDChanger : ISODropDownBox
{ {
public CDChanger() public CDChanger()
{ {
InitializeComponent();
Empty = true; Empty = true;
} }

View File

@ -51,45 +51,31 @@ namespace XenAdmin.Controls
{ {
public EnableableComboBox() public EnableableComboBox()
{ {
DrawItem += m_comboBoxConnection_DrawItem;
DrawMode = DrawMode.OwnerDrawVariable; DrawMode = DrawMode.OwnerDrawVariable;
DropDownStyle = ComboBoxStyle.DropDownList; DropDownStyle = ComboBoxStyle.DropDownList;
} }
private bool disposed; protected override void OnDrawItem(DrawItemEventArgs e)
protected override void Dispose(bool disposing)
{ {
if(disposing)
{
if(!disposed)
{
DrawItem -= m_comboBoxConnection_DrawItem;
}
disposed = true;
}
base.Dispose(disposing);
}
private void m_comboBoxConnection_DrawItem(object sender, DrawItemEventArgs e)
{
e.DrawBackground();
ComboBox cb = (ComboBox)sender;
int index = e.Index; int index = e.Index;
if (index > -1 && cb != null) if (index > -1)
{ {
IEnableableComboBoxItem item = cb.Items[index] as IEnableableComboBoxItem; e.DrawBackground();
IEnableableComboBoxItem item = Items[index] as IEnableableComboBoxItem;
Color textColor = SystemColors.ControlText; Color textColor = SystemColors.ControlText;
//Paint disabled items grey - otherwise leave them black //Paint disabled items grey - otherwise leave them black
if (item != null && !item.Enabled) if (item != null && !item.Enabled)
textColor = SystemColors.GrayText; textColor = SystemColors.GrayText;
if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
textColor = SystemColors.HighlightText; textColor = SystemColors.HighlightText;
Drawing.DrawText(e.Graphics, cb.Items[index].ToString(), cb.Font, e.Bounds.Location, textColor); Drawing.DrawText(e.Graphics, Items[index].ToString(), Font, e.Bounds.Location, textColor);
} }
base.OnDrawItem(e);
} }
public new bool Enabled public new bool Enabled

View File

@ -1,47 +0,0 @@
namespace XenAdmin.Controls
{
partial class ISODropDownBox
{
/// <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)
{
// deregisteres all event handlers
DeregisterEvents();
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()
{
this.SuspendLayout();
//
// ISODropDownBox
//
this.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.FormattingEnabled = true;
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -33,22 +33,15 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Collections;
using System.Text.RegularExpressions;
using XenAdmin;
using XenAdmin.Core; using XenAdmin.Core;
using XenAdmin.Network; using XenAdmin.Network;
using XenAPI; using XenAPI;
using System.Runtime.InteropServices;
namespace XenAdmin.Controls namespace XenAdmin.Controls
{ {
public partial class ISODropDownBox : NonSelectableComboBox public class ISODropDownBox : NonSelectableComboBox
{ {
public VM vm; public VM vm;
protected VBD cdrom; protected VBD cdrom;
@ -75,7 +68,15 @@ namespace XenAdmin.Controls
public ISODropDownBox() public ISODropDownBox()
{ {
SR_CollectionChangedWithInvoke = Program.ProgramInvokeHandler(SR_CollectionChanged); SR_CollectionChangedWithInvoke = Program.ProgramInvokeHandler(SR_CollectionChanged);
InitializeComponent(); DrawMode = DrawMode.OwnerDrawFixed;
DropDownStyle = ComboBoxStyle.DropDownList;
FormattingEnabled = true;
}
protected override void Dispose(bool disposing)
{
DeregisterEvents();
base.Dispose(disposing);
} }
private void RefreshSRs_() private void RefreshSRs_()

View File

@ -1,11 +1,11 @@
namespace XenAdmin.Controls namespace XenAdmin.Controls
{ {
partial class NetworkComboBox partial class LongStringComboBox
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components;
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
@ -28,10 +28,15 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.SuspendLayout();
this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.ToolTip toolTip;
} }
} }

View File

@ -30,7 +30,6 @@
*/ */
using System; using System;
using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using XenAdmin.Core; using XenAdmin.Core;
@ -41,22 +40,11 @@ namespace XenAdmin.Controls
/// A combobox that automatically resizes the dropdown's width to be as big /// A combobox that automatically resizes the dropdown's width to be as big
/// as the longest string in the items list /// as the longest string in the items list
/// </summary> /// </summary>
public class LongStringComboBox : ComboBox public partial class LongStringComboBox : ComboBox
{ {
private readonly ToolTip toolTip = new ToolTip(); public LongStringComboBox()
private bool disposed;
protected override void Dispose(bool disposing)
{ {
if (disposing) InitializeComponent();
{
if (!disposed)
{
toolTip.Dispose();
}
disposed = true;
}
base.Dispose(disposing);
} }
protected override void OnDropDown(EventArgs e) protected override void OnDropDown(EventArgs e)

View File

@ -117,7 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <data name="$this.ToolTip" xml:space="preserve">
<value>False</value> <value />
</metadata> </data>
</root> </root>

View File

@ -117,7 +117,25 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>0, 0</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="&gt;&gt;toolTip.Name" xml:space="preserve">
<value>toolTip</value>
</data>
<data name="&gt;&gt;toolTip.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>LongStringComboBox</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root> </root>

View File

@ -117,7 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <data name="$this.ToolTip" xml:space="preserve">
<value>False</value> <value />
</metadata> </data>
</root> </root>

View File

@ -38,12 +38,10 @@ using XenAPI;
namespace XenAdmin.Controls namespace XenAdmin.Controls
{ {
public partial class NetworkComboBox : LongStringComboBox public class NetworkComboBox : LongStringComboBox
{ {
public NetworkComboBox() public NetworkComboBox()
{ {
InitializeComponent();
DropDownStyle = ComboBoxStyle.DropDownList; DropDownStyle = ComboBoxStyle.DropDownList;
} }
@ -136,7 +134,5 @@ namespace XenAdmin.Controls
: new KeyValuePair<string, string>(selectedItem.Network.uuid, selectedItem.Network.Name); : new KeyValuePair<string, string>(selectedItem.Network.uuid, selectedItem.Network.Name);
} }
} }
public AutoScaleMode AutoScaleMode { get; set; }
} }
} }

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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.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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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.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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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.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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -48,7 +48,7 @@ namespace XenAdmin.Controls
protected override void OnDrawItem(DrawItemEventArgs e) protected override void OnDrawItem(DrawItemEventArgs e)
{ {
if (e.Index != -1) if (e.Index > -1)
{ {
e.DrawBackground(); e.DrawBackground();

View File

@ -59,7 +59,6 @@
// //
// networkComboBox // networkComboBox
// //
this.networkComboBox.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.networkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.networkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.networkComboBox.FormattingEnabled = true; this.networkComboBox.FormattingEnabled = true;
this.networkComboBox.IncludeOnlyEnabledNetworksInComboBox = false; this.networkComboBox.IncludeOnlyEnabledNetworksInComboBox = false;

View File

@ -132,7 +132,6 @@
// //
// m_comboBoxNetwork // m_comboBoxNetwork
// //
this.m_comboBoxNetwork.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
resources.ApplyResources(this.m_comboBoxNetwork, "m_comboBoxNetwork"); resources.ApplyResources(this.m_comboBoxNetwork, "m_comboBoxNetwork");
this.m_comboBoxNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_comboBoxNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.m_comboBoxNetwork.FormattingEnabled = true; this.m_comboBoxNetwork.FormattingEnabled = true;

View File

@ -988,9 +988,6 @@
<Compile Include="Controls\ComboBoxes\CDChanger.cs"> <Compile Include="Controls\ComboBoxes\CDChanger.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="Controls\ComboBoxes\CDChanger.Designer.cs">
<DependentUpon>CDChanger.cs</DependentUpon>
</Compile>
<Compile Include="Controls\EmptyPanel.cs"> <Compile Include="Controls\EmptyPanel.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@ -1018,9 +1015,6 @@
<Compile Include="Controls\ComboBoxes\ISODropDownBox.cs"> <Compile Include="Controls\ComboBoxes\ISODropDownBox.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="Controls\ComboBoxes\ISODropDownBox.Designer.cs">
<DependentUpon>ISODropDownBox.cs</DependentUpon>
</Compile>
<Compile Include="Controls\MenuStripEx.cs"> <Compile Include="Controls\MenuStripEx.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@ -1941,10 +1935,6 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>HelpButton.cs</DependentUpon> <DependentUpon>HelpButton.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\ISODropDownBox.resx">
<SubType>Designer</SubType>
<DependentUpon>ISODropDownBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingsPanels\HomeServerEditPage.resx"> <EmbeddedResource Include="SettingsPanels\HomeServerEditPage.resx">
<DependentUpon>HomeServerEditPage.cs</DependentUpon> <DependentUpon>HomeServerEditPage.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@ -2206,6 +2196,9 @@
<Compile Include="Controls\ChevronToggleButton.cs"> <Compile Include="Controls\ChevronToggleButton.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Controls\ComboBoxes\LongStringComboBox.Designer.cs">
<DependentUpon>LongStringComboBox.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ComboBoxes\VgpuComboBox.cs"> <Compile Include="Controls\ComboBoxes\VgpuComboBox.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@ -2312,9 +2305,6 @@
<Compile Include="Controls\ComboBoxes\NetworkComboBox.cs"> <Compile Include="Controls\ComboBoxes\NetworkComboBox.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="Controls\ComboBoxes\NetworkComboBox.Designer.cs">
<DependentUpon>NetworkComboBox.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ComboBoxes\NetworkComboBoxItem.cs" /> <Compile Include="Controls\ComboBoxes\NetworkComboBoxItem.cs" />
<Compile Include="Controls\SrPickerItem.cs" /> <Compile Include="Controls\SrPickerItem.cs" />
<Compile Include="Controls\SummaryPanel\ISummaryPanelView.cs" /> <Compile Include="Controls\SummaryPanel\ISummaryPanelView.cs" />
@ -4165,6 +4155,15 @@
<EmbeddedResource Include="Controls\ColorsHelper.zh-CN.resx"> <EmbeddedResource Include="Controls\ColorsHelper.zh-CN.resx">
<DependentUpon>ColorsHelper.cs</DependentUpon> <DependentUpon>ColorsHelper.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\LongStringComboBox.ja.resx">
<DependentUpon>LongStringComboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\LongStringComboBox.resx">
<DependentUpon>LongStringComboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\LongStringComboBox.zh-CN.resx">
<DependentUpon>LongStringComboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Common\SearchTextBox.ja.resx"> <EmbeddedResource Include="Controls\Common\SearchTextBox.ja.resx">
<DependentUpon>SearchTextBox.cs</DependentUpon> <DependentUpon>SearchTextBox.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -4267,15 +4266,6 @@
<EmbeddedResource Include="Controls\MainWindowControls\NavigationView.zh-CN.resx"> <EmbeddedResource Include="Controls\MainWindowControls\NavigationView.zh-CN.resx">
<DependentUpon>NavigationView.cs</DependentUpon> <DependentUpon>NavigationView.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\NetworkComboBox.ja.resx">
<DependentUpon>NetworkComboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\NetworkComboBox.resx">
<DependentUpon>NetworkComboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\NetworkComboBox.zh-CN.resx">
<DependentUpon>NetworkComboBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\SummaryPanel\SummaryPanel.ja.resx"> <EmbeddedResource Include="Controls\SummaryPanel\SummaryPanel.ja.resx">
<DependentUpon>SummaryPanel.cs</DependentUpon> <DependentUpon>SummaryPanel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -4422,12 +4412,6 @@
<EmbeddedResource Include="Controls\HelpButton.zh-CN.resx"> <EmbeddedResource Include="Controls\HelpButton.zh-CN.resx">
<DependentUpon>HelpButton.cs</DependentUpon> <DependentUpon>HelpButton.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\ISODropDownBox.ja.resx">
<DependentUpon>ISODropDownBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ComboBoxes\ISODropDownBox.zh-CN.resx">
<DependentUpon>ISODropDownBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\MultipleDvdIsoList.ja.resx"> <EmbeddedResource Include="Controls\MultipleDvdIsoList.ja.resx">
<DependentUpon>MultipleDvdIsoList.cs</DependentUpon> <DependentUpon>MultipleDvdIsoList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>