Merge branch 'upstream' into development
1
.gitignore
vendored
@ -36,6 +36,7 @@ dotNetFx40_Full_setup/*
|
||||
packages/*
|
||||
!packages/DOTNET_BUILD_LOCATION
|
||||
!packages/DOTNET_BUILD_LOCATION_CTXSIGN
|
||||
!packages/download_packages.ps1
|
||||
XenOvfApi/External Tools/*
|
||||
|
||||
_ReSharper.*/
|
||||
|
5
.travis.yml
Normal file
@ -0,0 +1,5 @@
|
||||
language: c
|
||||
script:
|
||||
- bash ./devtools/copyrightcheck/copyrightcheck.sh
|
||||
- bash ./devtools/i18ncheck/i18ncheck.sh
|
||||
- bash ./devtools/spellcheck/spellcheck.sh
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@ -53,7 +53,7 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
for hfx in RPU004
|
||||
for hfx in RPU004 RPU005
|
||||
do
|
||||
if [ -d "${hfx}" ]; then
|
||||
latest=$(ls ${hfx} | /usr/bin/sort -n | tail -n 1)
|
||||
@ -101,6 +101,7 @@ BRANDING_XC_PRODUCT_6_5_VERSION=6.5
|
||||
BRANDING_XC_PRODUCT_7_0_VERSION=7.0
|
||||
BRANDING_XC_PRODUCT_7_1_2_VERSION=7.1.2
|
||||
BRANDING_XC_PRODUCT_8_0_VERSION=8.0
|
||||
BRANDING_XC_PRODUCT_8_1_VERSION=8.1
|
||||
BRANDING_XENSERVER_UPDATE_URL="https://updates.xensource.com/XenServer/updates.xml"
|
||||
BRANDING_HIDDEN_FEATURES=""
|
||||
BRANDING_ADDITIONAL_FEATURES=""
|
||||
|
@ -120,6 +120,10 @@ namespace CFUValidator
|
||||
Status = "Determining XenServer update required...";
|
||||
var updateAlerts = XenAdmin.Core.Updates.NewXenServerVersionAlerts(xenServerVersions).Where(alert => !alert.CanIgnore).ToList();
|
||||
|
||||
HfxEligibilityValidator hfxEligibilityValidator = new HfxEligibilityValidator(xenServerVersions);
|
||||
Status = "Running hotfix eligibility check...";
|
||||
RunHfxEligibilityValidator(hfxEligibilityValidator);
|
||||
|
||||
Status = "Determining patches required...";
|
||||
var patchAlerts = XenAdmin.Core.Updates.NewXenServerPatchAlerts(xenServerVersions, xenServerPatches).Where(alert => !alert.CanIgnore).ToList();
|
||||
|
||||
@ -133,9 +137,9 @@ namespace CFUValidator
|
||||
|
||||
Status = "Running patch check(s), this may take some time...";
|
||||
RunValidators(validators);
|
||||
|
||||
|
||||
Status = "Generating summary...";
|
||||
GeneratePatchSummary(patchAlerts, validators, updateAlerts, xcupdateAlerts);
|
||||
GeneratePatchSummary(patchAlerts, validators, hfxEligibilityValidator, updateAlerts, xcupdateAlerts);
|
||||
}
|
||||
|
||||
private void CheckProvidedVersionNumber(List<XenServerVersion> xenServerVersions)
|
||||
@ -190,18 +194,25 @@ namespace CFUValidator
|
||||
Status = "Validator checks complete";
|
||||
}
|
||||
|
||||
private void RunHfxEligibilityValidator(HfxEligibilityValidator validator)
|
||||
{
|
||||
validator.Validate();
|
||||
Status = "Hotfix Eligibility Validator check complete";
|
||||
}
|
||||
|
||||
private void validator_StatusChanged(object sender, EventArgs e)
|
||||
{
|
||||
Status = sender as string;
|
||||
}
|
||||
|
||||
private void GeneratePatchSummary(List<XenServerPatchAlert> alerts, List<AlertFeatureValidator> validators,
|
||||
private void GeneratePatchSummary(List<XenServerPatchAlert> alerts, List<AlertFeatureValidator> validators, HfxEligibilityValidator hfxEligibilityValidator,
|
||||
List<XenServerVersionAlert> updateAlerts, List<XenCenterUpdateAlert> xcupdateAlerts)
|
||||
{
|
||||
OuputComponent oc = new OutputTextOuputComponent(XmlLocation, ServerVersion);
|
||||
XenCenterUpdateDecorator xcud = new XenCenterUpdateDecorator(oc, xcupdateAlerts);
|
||||
XenServerUpdateDecorator xsud = new XenServerUpdateDecorator(xcud, updateAlerts);
|
||||
PatchAlertDecorator pad = new PatchAlertDecorator(xsud, alerts);
|
||||
HfxEligibilityValidatorDecorator hevd = new HfxEligibilityValidatorDecorator(xsud, hfxEligibilityValidator, "Hotfix eligibility check:");
|
||||
PatchAlertDecorator pad = new PatchAlertDecorator(hevd, alerts);
|
||||
AlertFeatureValidatorDecorator afdCoreFields = new AlertFeatureValidatorDecorator(pad,
|
||||
validators.First(v => v is CorePatchDetailsValidator),
|
||||
"Core fields in patch checks:");
|
||||
@ -212,7 +223,7 @@ namespace CFUValidator
|
||||
validators.First(v => v is ZipContentsValidator),
|
||||
"Required patch zip content checks:");
|
||||
|
||||
if(CheckHotfixContents)
|
||||
if (CheckHotfixContents)
|
||||
Output = afdZipContents.Generate().Insert(0, Output).ToString();
|
||||
else
|
||||
Output = afdPatchUrl.Generate().Insert(0, Output).ToString();
|
||||
|
@ -38,6 +38,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@ -75,6 +76,7 @@
|
||||
<Compile Include="CommandLineOptions\CommandLineParser.cs" />
|
||||
<Compile Include="ConsoleSpinner.cs" />
|
||||
<Compile Include="OutputDecorators\AlertFeatureValidatorDecorator.cs" />
|
||||
<Compile Include="OutputDecorators\HfxEligibilityValidatorDecorator.cs" />
|
||||
<Compile Include="OutputDecorators\OuputComponent.cs" />
|
||||
<Compile Include="OutputDecorators\Decorator.cs" />
|
||||
<Compile Include="OutputDecorators\PatchAlertDecorator.cs" />
|
||||
@ -87,6 +89,7 @@
|
||||
<Compile Include="Updates\ICheckForUpdatesXMLSource.cs" />
|
||||
<Compile Include="Updates\XmlRetrieverFactory.cs" />
|
||||
<Compile Include="Validators\AlertFeatureValidator.cs" />
|
||||
<Compile Include="Validators\HfxEligibilityValidator.cs" />
|
||||
<Compile Include="Validators\CorePatchDetailsValidator.cs" />
|
||||
<Compile Include="Validators\PatchURLValidator.cs" />
|
||||
<Compile Include="Validators\ZipContentsValidator.cs" />
|
||||
|
@ -30,23 +30,31 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using XenCenterLib;
|
||||
using CFUValidator.Validators;
|
||||
|
||||
namespace XenAdminTests.MiscTests
|
||||
namespace CFUValidator.OutputDecorators
|
||||
{
|
||||
[TestFixture, Category(TestCategories.UICategoryB)]
|
||||
class HelpStringTests
|
||||
class HfxEligibilityValidatorDecorator : Decorator
|
||||
{
|
||||
[Test]
|
||||
public void HelpStringDefaultCtorAndValueGetter()
|
||||
private readonly string header;
|
||||
private readonly HfxEligibilityValidator validator;
|
||||
public HfxEligibilityValidatorDecorator(OuputComponent ouputComponent, HfxEligibilityValidator validator, string header)
|
||||
{
|
||||
const string testString = "I'm helpful";
|
||||
HelpString hs = new HelpString(testString);
|
||||
Assert.AreEqual(testString, hs.Value);
|
||||
SetComponent(ouputComponent);
|
||||
this.validator = validator;
|
||||
this.header = header;
|
||||
}
|
||||
|
||||
public override StringBuilder Generate()
|
||||
{
|
||||
StringBuilder sb = base.Generate();
|
||||
sb.AppendLine(header);
|
||||
if (validator.ErrorsFound)
|
||||
validator.Results.ForEach(v => sb.AppendLine(v));
|
||||
else
|
||||
sb.AppendLine("all OK");
|
||||
return sb.AppendLine(String.Empty);
|
||||
}
|
||||
}
|
||||
}
|
72
CFUValidator/Validators/HfxEligibilityValidator.cs
Normal file
@ -0,0 +1,72 @@
|
||||
/* 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;
|
||||
using System.Collections.Generic;
|
||||
using XenAdmin.Alerts;
|
||||
using XenAdmin.Core;
|
||||
|
||||
namespace CFUValidator.Validators
|
||||
{
|
||||
class HfxEligibilityValidator
|
||||
{
|
||||
private List<XenServerVersion> xsversions;
|
||||
public List<string> Results { get; set; }
|
||||
|
||||
public HfxEligibilityValidator(List<XenServerVersion> xsversions)
|
||||
{
|
||||
this.xsversions = xsversions;
|
||||
Results = new List<string>();
|
||||
}
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
foreach (XenServerVersion version in xsversions)
|
||||
{
|
||||
DateSanityCheck(version);
|
||||
}
|
||||
}
|
||||
|
||||
private void DateSanityCheck(XenServerVersion version)
|
||||
{
|
||||
if (version.HotfixEligibility == hotfix_eligibility.none && version.EolDate == DateTime.MinValue)
|
||||
Results.Add("Missing or wrong eol-date field on: " + version.Name);
|
||||
if (version.HotfixEligibility == hotfix_eligibility.premium && version.HotfixEligibilityPremiumDate == DateTime.MinValue)
|
||||
Results.Add("Missing or wrong hotfix-eligibility-premium-date field on: " + version.Name);
|
||||
if (version.HotfixEligibility == hotfix_eligibility.cu && version.HotfixEligibilityNoneDate == DateTime.MinValue)
|
||||
Results.Add("Missing or wrong hotfix-eligibility-none-date field on: " + version.Name);
|
||||
if (version.HotfixEligibility == hotfix_eligibility.cu && version.HotfixEligibilityPremiumDate == DateTime.MinValue)
|
||||
Results.Add("Missing or wrong hotfix-eligibility-premium-date field on: " + version.Name);
|
||||
}
|
||||
|
||||
public bool ErrorsFound { get { return Results.Count > 0; } }
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
@ -211,7 +211,7 @@ namespace CommandLib
|
||||
http.Close();
|
||||
return doRPC(method, redirect, tCLIprotocol, headers);
|
||||
default:
|
||||
tCLIprotocol.dGlobalError("Received an error message from the server doing an HTTP " + method + " " + uri.PathAndQuery + " : " + response);
|
||||
tCLIprotocol.dGlobalError(string.Format("Received error code {0} from the server doing an HTTP {1}", code, method));
|
||||
http.Close();
|
||||
return null;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
||||
<!-- DLLs -->
|
||||
<File Id="CommandLibDLL" Source="..\XenAdmin\bin\Release\CommandLib.dll" />
|
||||
<File Id="CookComputingDLL" Source="..\XenAdmin\bin\Release\CookComputing.XmlRpcV2.dll" />
|
||||
<File Id="NewtonsoftJsonDLL" Source="..\XenAdmin\bin\Release\Newtonsoft.Json.dll" />
|
||||
<File Id="NewtonsoftJsonDLL" Source="..\XenAdmin\bin\Release\Newtonsoft.Json.CH.dll" />
|
||||
<File Id="log4netDLL" Source="..\XenAdmin\bin\Release\log4net.dll" />
|
||||
<File Id="SharpZipLibDLL" Source="..\XenAdmin\bin\Release\ICSharpCode.SharpZipLib.dll" />
|
||||
<File Id="IonicZipDLL" Source="..\XenAdmin\bin\Release\Ionic.Zip.dll" />
|
||||
@ -155,6 +155,7 @@
|
||||
<Component Id="UpdateFiles" Guid="[BRANDING_XSUPDATE_FILE_GUID]">
|
||||
<File Id="hotfixDundee" Source="..\Branding\Hotfixes\RPU003.[xsupdate]" />
|
||||
<File Id="hotfixEly" Source="..\Branding\Hotfixes\RPU004.iso" />
|
||||
<File Id="hotfixNaples" Source="..\Branding\Hotfixes\RPU005.iso" />
|
||||
</Component>
|
||||
<?if "$(env.Branding)"="XenCenter"?>
|
||||
<!-- TestResources -->
|
||||
@ -201,7 +202,7 @@
|
||||
<File Id="HealthCheck_XenServerHealthCheck.exe" Name="XenServerHealthCheck.exe" KeyPath="yes" Source="..\XenServerHealthCheck\bin\Release\XenServerHealthCheck.exe" />
|
||||
<File Id="HealthCheck_CommandLib.dll" Name="CommandLib.dll" Source="..\XenServerHealthCheck\bin\Release\CommandLib.dll" />
|
||||
<File Id="HealthCheck_CookComputing.XmlRpcV2.dll" Name="CookComputing.XmlRpcV2.dll" Source="..\XenServerHealthCheck\bin\Release\CookComputing.XmlRpcV2.dll" />
|
||||
<File Id="HealthCheck_NewtonsoftJsonDLL" Source="..\XenServerHealthCheck\bin\Release\Newtonsoft.Json.dll" />
|
||||
<File Id="HealthCheck_NewtonsoftJsonDLL" Source="..\XenServerHealthCheck\bin\Release\Newtonsoft.Json.CH.dll" />
|
||||
<File Id="HealthCheck_ICSharpCode.SharpZipLib.dll" Name="ICSharpCode.SharpZipLib.dll" Source="..\XenServerHealthCheck\bin\Release\ICSharpCode.SharpZipLib.dll" />
|
||||
<File Id="HealthCheck_Ionic.Zip.dll" Name="Ionic.Zip.dll" Source="..\XenServerHealthCheck\bin\Release\Ionic.Zip.dll" />
|
||||
<File Id="HealthCheck_log4net.dll" Name="log4net.dll" Source="..\XenServerHealthCheck\bin\Release\log4net.dll" />
|
||||
|
@ -32,7 +32,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using XenAdmin.Alerts;
|
||||
using XenAdmin.Network;
|
||||
using XenAdmin.Core;
|
||||
@ -44,7 +43,6 @@ namespace XenAdmin.Actions
|
||||
public class DeleteAllAlertsAction : AsyncAction
|
||||
{
|
||||
private readonly IEnumerable<Alert> Alerts;
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <param name="connection">May be null; this is expected for client-side alerts.</param>
|
||||
/// <param name="alerts"></param>
|
||||
|
@ -54,13 +54,12 @@ namespace XenAdmin.Actions
|
||||
private const string EmptyParameter = "null";
|
||||
private const string BlankParamter = "blank";
|
||||
|
||||
private static readonly string SnapInTrustedCertXml =
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
Branding.COMPANY_NAME_SHORT, "\\XenServerPSSnapIn\\XenServer_Known_Certificates.xml");
|
||||
private static readonly string SnapInTrustedCertXml =
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
|
||||
@"WindowsPowerShell\XenServer_Known_Certificates.xml");
|
||||
|
||||
private static readonly string SnapInTrustedCertXmlDir =
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
Branding.COMPANY_NAME_SHORT, "\\XenServerPSSnapIn");
|
||||
private static readonly string SnapInTrustedCertXmlDir =
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "WindowsPowerShell");
|
||||
|
||||
private readonly ReadOnlyCollection<IXenObject> _targets = new ReadOnlyCollection<IXenObject>(new List<IXenObject>());
|
||||
private readonly bool XenCenterNodeTarget = false;
|
||||
@ -122,9 +121,9 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
_extAppProcess = _menuItemFeature.ShellCmd.CreateProcess(procParams, _targets);
|
||||
|
||||
_extAppProcess.OutputDataReceived += new DataReceivedEventHandler(_extAppProcess_OutputDataReceived);
|
||||
_extAppProcess.OutputDataReceived += _extAppProcess_OutputDataReceived;
|
||||
|
||||
log.InfoFormat("Plugin process for {0} running with parameters {1}", _extAppProcess.StartInfo.FileName, _extAppProcess.StartInfo.Arguments);
|
||||
log.InfoFormat("Starting plugin process for {0}.", _extAppProcess.StartInfo.FileName);
|
||||
_extAppProcess.Start();
|
||||
|
||||
if (_extAppProcess.StartInfo.RedirectStandardError)
|
||||
@ -145,7 +144,7 @@ namespace XenAdmin.Actions
|
||||
|
||||
if (_extAppProcess.HasExited && _extAppProcess.ExitCode != 0)
|
||||
{
|
||||
log.ErrorFormat("Plugin process for {0} running with parameters {1} exited with Exit Code: {2}", _extAppProcess.StartInfo.FileName, _extAppProcess.StartInfo.Arguments, _extAppProcess.ExitCode);
|
||||
log.ErrorFormat("Plugin process for {0} exited with exit code {1}", _extAppProcess.StartInfo.FileName, _extAppProcess.ExitCode);
|
||||
throw new Exception(String.Format(Messages.EXTERNAL_PLUGIN_BAD_EXIT, _extAppProcess.ExitCode));
|
||||
}
|
||||
}
|
||||
|
@ -34,15 +34,12 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using XenAdmin.Network;
|
||||
using XenAdmin.Core;
|
||||
using System.Linq;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Actions
|
||||
{
|
||||
public class RestoreDismissedUpdatesAction : AsyncAction
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public RestoreDismissedUpdatesAction(IXenConnection connection)
|
||||
: base(connection, "restore_dismissed_updates", "restore_dismissed_updates", true)
|
||||
{
|
||||
|
@ -44,7 +44,8 @@ namespace XenAdmin.Actions.OVFActions
|
||||
protected string m_tvmIpAddress;
|
||||
protected string m_tvmSubnetMask;
|
||||
protected string m_tvmGateway;
|
||||
protected XenOvfTransportBase m_transportAction;
|
||||
|
||||
protected abstract XenOvfTransportBase TransportAction { get; }
|
||||
|
||||
private const int SLEEP_TIME = 900;
|
||||
private const int MAX_ITERATIONS = 60 * 60 * 24 / SLEEP_TIME * 1000; //iterations in 24h
|
||||
@ -89,7 +90,7 @@ namespace XenAdmin.Actions.OVFActions
|
||||
InitialiseTicker();
|
||||
}
|
||||
|
||||
protected void UpdateHandler(XenOvfTranportEventArgs e)
|
||||
protected void UpdateHandler(XenOvfTransportEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e.Message))
|
||||
Description = e.Message;
|
||||
@ -104,8 +105,8 @@ namespace XenAdmin.Actions.OVFActions
|
||||
{
|
||||
Description = Messages.CANCELING;
|
||||
|
||||
if (m_transportAction != null)
|
||||
m_transportAction.Cancel = true;
|
||||
if (TransportAction != null)
|
||||
TransportAction.Cancel = true;
|
||||
}
|
||||
|
||||
private void InitialiseTicker()
|
||||
|
@ -40,6 +40,7 @@ using XenAPI;
|
||||
|
||||
using XenOvf;
|
||||
using XenOvf.Definitions;
|
||||
using XenOvfTransport;
|
||||
|
||||
namespace XenAdmin.Actions.OVFActions
|
||||
{
|
||||
@ -60,6 +61,7 @@ namespace XenAdmin.Actions.OVFActions
|
||||
private readonly bool m_compressOVFfiles;
|
||||
private readonly bool m_shouldVerify;
|
||||
private OvfCompressor m_compressor;
|
||||
private Export m_transportAction;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -88,6 +90,8 @@ namespace XenAdmin.Actions.OVFActions
|
||||
VM = m_vmsToExport.First();
|
||||
}
|
||||
|
||||
protected override XenOvfTransportBase TransportAction => m_transportAction;
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
base.Run();
|
||||
@ -108,14 +112,14 @@ namespace XenAdmin.Actions.OVFActions
|
||||
EnvelopeType env;
|
||||
try
|
||||
{
|
||||
m_transportAction = new XenOvfTransport.Export(uri, session)
|
||||
m_transportAction = new Export(uri, session)
|
||||
{
|
||||
UpdateHandler = UpdateHandler,
|
||||
ShouldVerifyDisks = m_shouldVerify,
|
||||
Cancel = Cancelling //in case the Cancel button has already been pressed
|
||||
};
|
||||
m_transportAction.SetTvmNetwork(m_networkUuid, m_isTvmIpStatic, m_tvmIpAddress, m_tvmSubnetMask, m_tvmGateway);
|
||||
env = (m_transportAction as XenOvfTransport.Export).Process(appFolder, m_applianceFileName, (from VM vm in m_vmsToExport select vm.uuid).ToArray());
|
||||
env = m_transportAction.Process(appFolder, m_applianceFileName, (from VM vm in m_vmsToExport select vm.uuid).ToArray());
|
||||
PercentComplete = 60;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
|
@ -47,7 +47,6 @@ namespace XenAdmin.Actions.OVFActions
|
||||
{
|
||||
#region Private fields
|
||||
|
||||
private readonly EnvelopeType m_ovfEnvelope;
|
||||
private readonly Package m_package;
|
||||
private readonly Dictionary<string, VmMapping> m_vmMappings;
|
||||
private readonly bool m_verifyManifest;
|
||||
@ -55,16 +54,16 @@ namespace XenAdmin.Actions.OVFActions
|
||||
private readonly string m_password;
|
||||
private readonly bool m_runfixups;
|
||||
private readonly SR m_selectedIsoSr;
|
||||
private Import m_transportAction;
|
||||
|
||||
#endregion
|
||||
|
||||
public ImportApplianceAction(IXenConnection connection, EnvelopeType ovfEnv, Package package, Dictionary<string, VmMapping> vmMappings,
|
||||
public ImportApplianceAction(IXenConnection connection, Package package, Dictionary<string, VmMapping> vmMappings,
|
||||
bool verifyManifest, bool verifySignature, string password, bool runfixups, SR selectedIsoSr,
|
||||
string networkUuid, bool isTvmIpStatic, string tvmIpAddress, string tvmSubnetMask, string tvmGateway)
|
||||
: base(connection, string.Format(Messages.IMPORT_APPLIANCE, GetApplianceName(ovfEnv, package), Helpers.GetName(connection)),
|
||||
: base(connection, string.Format(Messages.IMPORT_APPLIANCE, package.Name, Helpers.GetName(connection)),
|
||||
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
|
||||
{
|
||||
m_ovfEnvelope = ovfEnv;
|
||||
m_package = package;
|
||||
m_vmMappings = vmMappings;
|
||||
m_verifyManifest = verifyManifest;
|
||||
@ -74,6 +73,8 @@ namespace XenAdmin.Actions.OVFActions
|
||||
m_selectedIsoSr = selectedIsoSr;
|
||||
}
|
||||
|
||||
protected override XenOvfTransportBase TransportAction => m_transportAction;
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
base.Run();
|
||||
@ -112,9 +113,6 @@ namespace XenAdmin.Actions.OVFActions
|
||||
}
|
||||
}
|
||||
|
||||
List<string> validationErrors;
|
||||
OVF.Validate(m_package.PackageSourceFile, out validationErrors);
|
||||
|
||||
PercentComplete = 20;
|
||||
Description = Messages.IMPORTING_VMS;
|
||||
|
||||
@ -132,7 +130,7 @@ namespace XenAdmin.Actions.OVFActions
|
||||
|
||||
string systemid = vmMapping.Key;
|
||||
var mapping = vmMapping.Value;
|
||||
EnvelopeType[] envs = OVF.Split(m_ovfEnvelope, "system", new object[] {new[] {systemid}});
|
||||
EnvelopeType[] envs = OVF.Split(m_package.OvfEnvelope, "system", new object[] {new[] {systemid}});
|
||||
|
||||
//storage
|
||||
foreach (var kvp in mapping.Storage)
|
||||
@ -154,35 +152,31 @@ namespace XenAdmin.Actions.OVFActions
|
||||
envelopes.Add(envs[0]);
|
||||
}
|
||||
|
||||
var appName = GetApplianceName(m_ovfEnvelope, m_package);
|
||||
EnvelopeType env = OVF.Merge(envelopes, appName);
|
||||
EnvelopeType env = OVF.Merge(envelopes, m_package.Name);
|
||||
m_package.ExtractToWorkingDir();
|
||||
|
||||
try //importVM
|
||||
{
|
||||
m_transportAction = new Import(uri, session)
|
||||
{
|
||||
ApplianceName = appName,
|
||||
UpdateHandler = UpdateHandler,
|
||||
Cancel = Cancelling //in case the Cancel button has already been pressed
|
||||
};
|
||||
{
|
||||
m_transportAction = new Import(uri, session)
|
||||
{
|
||||
ApplianceName = m_package.Name,
|
||||
UpdateHandler = UpdateHandler,
|
||||
Cancel = Cancelling //in case the Cancel button has already been pressed
|
||||
};
|
||||
m_transportAction.SetTvmNetwork(m_networkUuid, m_isTvmIpStatic, m_tvmIpAddress, m_tvmSubnetMask, m_tvmGateway);
|
||||
(m_transportAction as Import).Process(env, Path.GetDirectoryName(m_package.PackageSourceFile), m_password);
|
||||
m_transportAction.Process(env, m_package.WorkingDir, m_password);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
throw new CancelledException();
|
||||
}
|
||||
finally
|
||||
{
|
||||
m_package.CleanUpWorkingDir();
|
||||
}
|
||||
|
||||
PercentComplete = 100;
|
||||
Description = Messages.COMPLETED;
|
||||
}
|
||||
|
||||
private static string GetApplianceName(EnvelopeType ovfEnv, Package package)
|
||||
{
|
||||
var appName = ovfEnv.Name;
|
||||
if (string.IsNullOrEmpty(appName))
|
||||
appName = Path.GetFileNameWithoutExtension(package.PackageSourceFile);
|
||||
return appName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ namespace XenAdmin.Actions.OVFActions
|
||||
private readonly bool m_runfixups;
|
||||
private readonly SR m_selectedIsoSr;
|
||||
private readonly string m_directory;
|
||||
private Import m_transportAction;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -68,6 +69,8 @@ namespace XenAdmin.Actions.OVFActions
|
||||
m_selectedIsoSr = selectedIsoSr;
|
||||
}
|
||||
|
||||
protected override XenOvfTransportBase TransportAction => m_transportAction;
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
base.Run();
|
||||
@ -110,7 +113,7 @@ namespace XenAdmin.Actions.OVFActions
|
||||
Cancel = Cancelling //in case the Cancel button has already been pressed
|
||||
};
|
||||
m_transportAction.SetTvmNetwork(m_networkUuid, m_isTvmIpStatic, m_tvmIpAddress, m_tvmSubnetMask, m_tvmGateway);
|
||||
(m_transportAction as Import).Process(curEnv, m_directory, null);
|
||||
m_transportAction.Process(curEnv, m_directory, null);
|
||||
|
||||
PercentComplete = 100;
|
||||
Description = Messages.COMPLETED;
|
||||
|
245
XenAdmin/Alerts/Types/HotfixEligibilityAlert.cs
Normal file
@ -0,0 +1,245 @@
|
||||
/* 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;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Alerts.Types
|
||||
{
|
||||
public class HotfixEligibilityAlert: Alert
|
||||
{
|
||||
private readonly Pool pool;
|
||||
public readonly XenServerVersion Version;
|
||||
|
||||
public HotfixEligibilityAlert(IXenConnection connection, XenServerVersion version)
|
||||
{
|
||||
Connection = connection;
|
||||
this.Version = version;
|
||||
pool = Helpers.GetPoolOfOne(connection);
|
||||
_timestamp = DateTime.Now;
|
||||
}
|
||||
|
||||
#region Overrides of Alert
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pool == null || Version == null)
|
||||
return string.Empty;
|
||||
|
||||
var productVersionText = string.Format(Messages.STRING_SPACE_STRING,
|
||||
Helpers.NaplesOrGreater(Connection) ? Messages.XENSERVER : Messages.XENSERVER_LEGACY,
|
||||
Helpers.GetMaster(Connection)?.ProductVersionText());
|
||||
var unlicensed = pool.IsFreeLicenseOrExpired();
|
||||
|
||||
switch (Version.HotfixEligibility)
|
||||
{
|
||||
// all + the EOL date is known -> "Approaching EOL" alert
|
||||
case hotfix_eligibility.all when Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_TITLE_APPROACHING_EOL,
|
||||
productVersionText, GetEolDate());
|
||||
|
||||
// premium + unlicensed host -> "EOL for express customers" alert
|
||||
case hotfix_eligibility.premium when unlicensed:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_TITLE_FREE, productVersionText);
|
||||
|
||||
// premium + licensed host and the EOL date is known -> "Approaching EOL" alert
|
||||
case hotfix_eligibility.premium when Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_TITLE_APPROACHING_EOL,
|
||||
productVersionText, GetEolDate());
|
||||
|
||||
// cu -> "EOL for express customers" / "CU for licensed customers" alert
|
||||
case hotfix_eligibility.cu when pool.IsFreeLicenseOrExpired():
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_TITLE_FREE, productVersionText);
|
||||
case hotfix_eligibility.cu:
|
||||
return Messages.HOTFIX_ELIGIBILITY_ALERT_TITLE_CU;
|
||||
|
||||
// none -> EOL alert
|
||||
case hotfix_eligibility.none:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_TITLE_EOL, productVersionText);
|
||||
|
||||
// everything else
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pool == null)
|
||||
return string.Empty;
|
||||
|
||||
var versionText = Helpers.GetMaster(Connection)?.ProductVersionText();
|
||||
var productVersionText = string.Format(Messages.STRING_SPACE_STRING,
|
||||
Helpers.NaplesOrGreater(Connection) ? Messages.XENSERVER : Messages.XENSERVER_LEGACY,
|
||||
versionText);
|
||||
var unlicensed = pool.IsFreeLicenseOrExpired();
|
||||
|
||||
switch (Version.HotfixEligibility)
|
||||
{
|
||||
// all + the EOL date is known -> "Approaching EOL" alert
|
||||
case hotfix_eligibility.all when unlicensed && Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_APPROACHING_EOL_FREE,
|
||||
productVersionText, GetEolDate(), versionText);
|
||||
case hotfix_eligibility.all when Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_APPROACHING_EOL,
|
||||
productVersionText, GetEolDate(), versionText);
|
||||
|
||||
// premium + unlicensed host -> "EOL for express customers" alert
|
||||
case hotfix_eligibility.premium when unlicensed && Version.HotfixEligibilityPremiumDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_FREE,
|
||||
productVersionText, GetPremiumDate());
|
||||
|
||||
// premium + licensed host and the EOL date is known -> "Approaching EOL" alert
|
||||
case hotfix_eligibility.premium when !unlicensed && Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_APPROACHING_EOL,
|
||||
productVersionText, GetEolDate(), versionText);
|
||||
|
||||
// cu -> "EOL for express customers" / "CU for licensed customers" alert
|
||||
case hotfix_eligibility.cu when unlicensed && Version.HotfixEligibilityPremiumDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_FREE,
|
||||
productVersionText, GetPremiumDate());
|
||||
case hotfix_eligibility.cu when !unlicensed && Version.HotfixEligibilityNoneDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_CU, productVersionText,
|
||||
GetNoneDate(), versionText);
|
||||
|
||||
// none -> EOL alert
|
||||
case hotfix_eligibility.none when unlicensed && Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_EOL_FREE,
|
||||
productVersionText, GetEolDate());
|
||||
case hotfix_eligibility.none when Version.EolDate != DateTime.MinValue:
|
||||
return string.Format(Messages.HOTFIX_ELIGIBILITY_ALERT_DESCRIPTION_EOL,
|
||||
productVersionText, GetEolDate());
|
||||
|
||||
// everything else
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override AlertPriority Priority => AlertPriority.Priority3;
|
||||
|
||||
public override string AppliesTo => Helpers.GetName(Helpers.GetPoolOfOne(Connection));
|
||||
|
||||
public override string FixLinkText => null;
|
||||
|
||||
public override Action FixLinkAction => null;
|
||||
|
||||
public override string HelpID => "HotfixEligibilityAlert";
|
||||
|
||||
public override bool Equals(Alert other)
|
||||
{
|
||||
if (other is HotfixEligibilityAlert alert)
|
||||
return Connection == alert.Connection && Version == alert.Version;
|
||||
return base.Equals(other);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static bool IsAlertNeeded(hotfix_eligibility hotfixEligibility, XenServerVersion version, bool licensed)
|
||||
{
|
||||
if (version == null)
|
||||
return false;
|
||||
|
||||
switch (hotfixEligibility)
|
||||
{
|
||||
// all + the EOL date is known -> "Approaching EOL" alert
|
||||
case hotfix_eligibility.all when version.EolDate != DateTime.MinValue:
|
||||
return true;
|
||||
|
||||
// premium + unlicensed host -> "EOL for express customers" alert
|
||||
case hotfix_eligibility.premium when !licensed:
|
||||
return true;
|
||||
|
||||
// premium + licensed host and the EOL date is known -> "Approaching EOL" alert
|
||||
case hotfix_eligibility.premium when version.EolDate != DateTime.MinValue:
|
||||
return true;
|
||||
|
||||
// cu -> "EOL for express customers" / "CU for licensed customers" alert
|
||||
case hotfix_eligibility.cu:
|
||||
return true;
|
||||
|
||||
// none -> EOL alert
|
||||
case hotfix_eligibility.none:
|
||||
return true;
|
||||
|
||||
// everything else -> no alert
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string GetEolDate()
|
||||
{
|
||||
string date = string.Empty;
|
||||
|
||||
Program.Invoke(Program.MainWindow, () =>
|
||||
{
|
||||
date = HelpersGUI.DateTimeToString(Version.EolDate.ToLocalTime(), Messages.DATEFORMAT_DMY, true);
|
||||
});
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
private string GetPremiumDate()
|
||||
{
|
||||
string date = string.Empty;
|
||||
|
||||
Program.Invoke(Program.MainWindow, () =>
|
||||
{
|
||||
date = HelpersGUI.DateTimeToString(Version.HotfixEligibilityPremiumDate.ToLocalTime(),
|
||||
Messages.DATEFORMAT_DMY, true);
|
||||
});
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
private string GetNoneDate()
|
||||
{
|
||||
string date = string.Empty;
|
||||
|
||||
Program.Invoke(Program.MainWindow, () =>
|
||||
{
|
||||
date = HelpersGUI.DateTimeToString(Version.HotfixEligibilityNoneDate.ToLocalTime(),
|
||||
Messages.DATEFORMAT_DMY, true);
|
||||
});
|
||||
|
||||
return date;
|
||||
}
|
||||
}
|
||||
}
|
@ -44,8 +44,6 @@ namespace XenAdmin.Alerts
|
||||
{
|
||||
public class MessageAlert : Alert
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public XenAPI.Message Message;
|
||||
public IXenObject XenObject;
|
||||
|
||||
@ -203,10 +201,7 @@ namespace XenAdmin.Alerts
|
||||
|
||||
case Message.MessageType.MULTIPATH_PERIODIC_ALERT:
|
||||
if (XenObject != null)
|
||||
{
|
||||
log.InfoFormat("{0} - {1}", Title, Message.body);
|
||||
return extractMultipathCurrentState(Message.body, FriendlyFormat());
|
||||
}
|
||||
break;
|
||||
|
||||
case Message.MessageType.WLB_CONSULTATION_FAILED:
|
||||
@ -401,18 +396,12 @@ namespace XenAdmin.Alerts
|
||||
{
|
||||
get
|
||||
{
|
||||
string pageref = "MessageAlert_" + Message.Type.ToString();
|
||||
return HelpManager.GetID(pageref) == null ? null : pageref;
|
||||
string pageRef = "MessageAlert_" + Message.Type;
|
||||
return HelpManager.TryGetTopicId(pageRef, out _) ? pageRef : null;
|
||||
}
|
||||
}
|
||||
|
||||
public override string HelpLinkText
|
||||
{
|
||||
get
|
||||
{
|
||||
return Message.FriendlyHelp(Message.MessageTypeString());
|
||||
}
|
||||
}
|
||||
public override string HelpLinkText => Message.FriendlyHelp(Message.MessageTypeString());
|
||||
|
||||
public override string Title
|
||||
{
|
||||
@ -437,10 +426,7 @@ namespace XenAdmin.Alerts
|
||||
}
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return Message.MessageTypeString(); }
|
||||
}
|
||||
public override string Name => Message.MessageTypeString();
|
||||
|
||||
public override void Dismiss()
|
||||
{
|
||||
|
@ -53,6 +53,7 @@ namespace XenAdmin
|
||||
public const string CHECK_FOR_UPDATES_URL = "[BRANDING_XENSERVER_UPDATE_URL]";
|
||||
public const string BRANDING_PERF_ALERT_MAIL_LANGUAGE_DEFAULT = "[BRANDING_PERF_ALERT_MAIL_LANGUAGE_DEFAULT]";
|
||||
public const string PV_TOOLS = "[Citrix VM Tools]";
|
||||
public const string CONVERSION_VPX_MIN_SUPPORTED_VERSION = "[BRANDING_VERSION_7_0]";
|
||||
|
||||
public static string Search
|
||||
{
|
||||
@ -89,5 +90,14 @@ namespace XenAdmin
|
||||
return s != "[" + "BRANDING_XENSERVER_UPDATE_URL]" ? s : InvisibleMessages.XENSERVER_UPDATE_URL;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ConversionVpxMinimumSupportedVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = CONVERSION_VPX_MIN_SUPPORTED_VERSION;
|
||||
return s != "[" + "BRANDING_VERSION_7_0]" ? s.ToLowerInvariant() : Program.Version.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,15 +66,14 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
c.CachePopulated += c_CachePopulated;
|
||||
}
|
||||
XenConnectionUI.BeginConnect(c, false, null, false);
|
||||
XenConnectionUI.BeginConnect(c, false, Program.MainWindow, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void c_CachePopulated(object sender, EventArgs e)
|
||||
private void c_CachePopulated(IXenConnection c)
|
||||
{
|
||||
IXenConnection c = (IXenConnection)sender;
|
||||
c.CachePopulated -= c_CachePopulated;
|
||||
|
||||
MainWindowCommandInterface.TrySelectNewObjectInTree(c, false, true, false);
|
||||
|
@ -68,9 +68,6 @@ namespace XenAdmin.Commands
|
||||
|
||||
T[] groups = VMGroup<T>.GroupsInCache(Command.GetSelection()[0].Connection.Cache);
|
||||
|
||||
if (groups.Length > 0)
|
||||
base.DropDownItems.Add(new ToolStripSeparator());
|
||||
|
||||
Array.Sort(groups);
|
||||
|
||||
for (int index = 0, offset = 0; index < groups.Length; index++)
|
||||
@ -101,6 +98,8 @@ namespace XenAdmin.Commands
|
||||
itemGroup.Checked = true;
|
||||
base.DropDownItems.Add(itemGroup);
|
||||
}
|
||||
if (base.DropDownItems.Count > 1)
|
||||
base.DropDownItems.Insert(1, new ToolStripSeparator());
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
|
@ -31,16 +31,15 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using XenAPI;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Model;
|
||||
using XenAdmin.Core;
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Plugins;
|
||||
|
||||
@ -163,7 +162,7 @@ namespace XenAdmin.Commands
|
||||
[Conditional("DEBUG")]
|
||||
private void CheckAccessKeys(ContextMenuItemCollection items)
|
||||
{
|
||||
List<string> usedKeys = new List<string>();
|
||||
var usedKeys = new Dictionary<string, List<string>>();
|
||||
|
||||
foreach (ToolStripItem item in items)
|
||||
{
|
||||
@ -174,16 +173,16 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
string c = text[index + 1].ToString().ToLower();
|
||||
|
||||
if (usedKeys.Contains(c))
|
||||
{
|
||||
Debug.Fail("Duplicated access key: " + c);
|
||||
}
|
||||
if (usedKeys.ContainsKey(c))
|
||||
usedKeys[c].Add(text);
|
||||
else
|
||||
{
|
||||
usedKeys.Add(c);
|
||||
}
|
||||
usedKeys[c] = new List<string> { text };
|
||||
}
|
||||
}
|
||||
|
||||
if (usedKeys.Any(kvp => kvp.Value.Count > 1))
|
||||
Debug.Fail("Found duplicate access key. Here are the used ones:\n" +
|
||||
string.Join("\n", usedKeys.Select(kvp => $"{kvp.Key} => {string.Join(", ", kvp.Value)}")));
|
||||
}
|
||||
|
||||
private abstract class Builder
|
||||
@ -547,10 +546,11 @@ namespace XenAdmin.Commands
|
||||
|
||||
items.AddIfEnabled(new RemoveHostCrashDumpsCommand(mainWindow, selection));
|
||||
|
||||
if (host != Helpers.GetMaster(host.Connection) )
|
||||
var cmd = new RemoveHostFromPoolCommand(mainWindow, selection);
|
||||
if (cmd.CanExecute())
|
||||
{
|
||||
items.AddSeparator();
|
||||
items.Add(new RemoveHostFromPoolCommand(mainWindow, selection));
|
||||
items.Add(cmd);
|
||||
}
|
||||
|
||||
items.AddPluginItems(PluginContextMenu.server, selection);
|
||||
@ -719,6 +719,8 @@ namespace XenAdmin.Commands
|
||||
items.Add(drItem);
|
||||
}
|
||||
|
||||
items.AddIfEnabled(new LaunchConversionManagerCommand(mainWindow, selection));
|
||||
|
||||
var pool = selection.FirstAsXenObject as Pool;
|
||||
if (pool != null && !pool.IsPoolFullyUpgraded())
|
||||
items.Add(new RollingUpgradeCommand(mainWindow));
|
||||
|
@ -175,12 +175,7 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public void AddIfEnabled(Command command)
|
||||
{
|
||||
AddIfEnabled(command, false);
|
||||
}
|
||||
|
||||
public void AddIfEnabled(Command command, bool bold)
|
||||
public void AddIfEnabled(Command command, bool bold = false)
|
||||
{
|
||||
if (command.CanExecute())
|
||||
{
|
||||
@ -188,12 +183,7 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(Command command)
|
||||
{
|
||||
Add(command, false);
|
||||
}
|
||||
|
||||
public void Add(Command command, bool bold)
|
||||
public void Add(Command command, bool bold = false)
|
||||
{
|
||||
CommandToolStripMenuItem item = new CommandToolStripMenuItem(command, true);
|
||||
|
||||
|
100
XenAdmin/Commands/Controls/PoolRemoveServerToolStripMenuItem.cs
Normal file
@ -0,0 +1,100 @@
|
||||
/* 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;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Core;
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
{
|
||||
internal class PoolRemoveServerToolStripMenuItem : CommandToolStripMenuItem
|
||||
{
|
||||
public PoolRemoveServerToolStripMenuItem()
|
||||
: base(new PoolRemoveServerCommand(), false)
|
||||
{
|
||||
base.DropDownItems.Add(new ToolStripMenuItem());
|
||||
}
|
||||
|
||||
public PoolRemoveServerToolStripMenuItem(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, bool inContextMenu)
|
||||
: base(new PoolRemoveServerCommand(mainWindow, selection), inContextMenu)
|
||||
{
|
||||
base.DropDownItems.Add(new ToolStripMenuItem());
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public new Command Command => base.Command;
|
||||
|
||||
protected override void OnDropDownOpening(EventArgs e)
|
||||
{
|
||||
DropDownItems.Clear();
|
||||
|
||||
var hosts = Command.GetSelection().GetConnectionOfAllItems().Cache.Hosts;
|
||||
|
||||
foreach (var host in hosts)
|
||||
{
|
||||
if (!RemoveHostFromPoolCommand.CanExecute(host))
|
||||
continue;
|
||||
|
||||
var cmd = new RemoveHostFromPoolCommand(Command.MainWindowCommandInterface, host);
|
||||
DropDownItems.Add(new CommandToolStripMenuItem(cmd, host.Name(), Images.GetImage16For(host)));
|
||||
}
|
||||
}
|
||||
|
||||
private class PoolRemoveServerCommand : Command
|
||||
{
|
||||
public PoolRemoveServerCommand()
|
||||
{
|
||||
}
|
||||
|
||||
public PoolRemoveServerCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
|
||||
: base(mainWindow, selection)
|
||||
{
|
||||
}
|
||||
|
||||
public override string MenuText => Messages.REMOVE_SERVER_MENU_ITEM;
|
||||
|
||||
protected override bool CanExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
var connection = selection.GetConnectionOfAllItems();
|
||||
var pool = Helpers.GetPool(connection);
|
||||
if (pool == null)
|
||||
return false;
|
||||
|
||||
return connection.Cache.Hosts.Any(RemoveHostFromPoolCommand.CanExecute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -40,7 +40,6 @@ using XenAdmin.Actions;
|
||||
using XenAdmin.Network;
|
||||
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
{
|
||||
/// <summary>
|
||||
@ -48,7 +47,6 @@ namespace XenAdmin.Commands
|
||||
/// </summary>
|
||||
internal abstract class VMOperationToolStripMenuItem : CommandToolStripMenuItem
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly vm_operations _operation;
|
||||
private readonly bool _resumeAfter;
|
||||
|
||||
|
@ -113,18 +113,7 @@ namespace XenAdmin.Commands
|
||||
return selection.AllItemsAre<VM>() && selection.AtLeastOneXenObjectCan<VM>(CanExecute);
|
||||
}
|
||||
|
||||
public override string MenuText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (GetSelection().Count > 1)
|
||||
{
|
||||
return Messages.MAINWINDOW_DELETE_OBJECTS;
|
||||
}
|
||||
|
||||
return Messages.MAINWINDOW_DELETE_VM;
|
||||
}
|
||||
}
|
||||
public override string MenuText => Messages.MAINWINDOW_DELETE_OBJECTS;
|
||||
|
||||
protected virtual string ErrorDialogText
|
||||
{
|
||||
|
@ -45,8 +45,6 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
class DeleteVirtualDiskCommand : Command
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Allows auto unplug and delete on running VMs
|
||||
/// </summary>
|
||||
|
@ -43,7 +43,6 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
class DetachVirtualDiskCommand : Command
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private VM targetVM = null;
|
||||
|
||||
|
@ -147,10 +147,10 @@ namespace XenAdmin.Commands
|
||||
private void DoDisconnect(IXenConnection connection)
|
||||
{
|
||||
string msg = string.Format(Messages.CONNECTION_CLOSED_NOTICE_TEXT, connection.Hostname);
|
||||
log.Warn(msg);
|
||||
ActionBase notice = new ActionBase(msg, msg, false, true);
|
||||
notice.Pool = Helpers.GetPoolOfOne(connection);
|
||||
notice.Host = Helpers.GetMaster(connection);
|
||||
log.Warn($"Connection to {connection.Hostname} closed.");
|
||||
|
||||
MainWindowCommandInterface.CloseActiveWizards(connection);
|
||||
XenDialogBase.CloseAll(connection);
|
||||
|
@ -29,19 +29,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using XenAdmin.Controls;
|
||||
using XenAPI;
|
||||
using XenAdmin.Core;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Dialogs;
|
||||
using System.Drawing;
|
||||
using XenAdmin.Actions.VMActions;
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
@ -66,7 +60,6 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
foreach (VM draggedVM in GetDraggedItemsAsXenObjects<VM>())
|
||||
{
|
||||
Pool draggedVMPool = Helpers.GetPool(draggedVM.Connection);
|
||||
Host draggedVMHome = draggedVM.Home();
|
||||
|
||||
if(!LiveMigrateAllowedInVersion(targetHost, draggedVM))
|
||||
@ -81,12 +74,12 @@ namespace XenAdmin.Commands
|
||||
return Messages.MIGRATION_NOT_ALLOWED_NO_SHARED_STORAGE;
|
||||
}
|
||||
}
|
||||
|
||||
if (Helpers.productVersionCompare(Helpers.HostProductVersion(targetHost), Helpers.HostProductVersion(draggedVMHome ?? Helpers.GetMaster(draggedVM.Connection))) < 0)
|
||||
return Messages.OLDER_THAN_CURRENT_SERVER;
|
||||
|
||||
if (targetHost != draggedVMHome && VMOperationHostCommand.VmCpuFeaturesIncompatibleWithHost(targetHost, draggedVM))
|
||||
{
|
||||
// target host does not offer some of the CPU features that the VM currently sees
|
||||
if (targetHost != draggedVMHome && VMOperationHostCommand.VmCpuIncompatibleWithHost(targetHost, draggedVM))
|
||||
return Messages.MIGRATION_NOT_ALLOWED_CPU_FEATURES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -132,11 +125,11 @@ namespace XenAdmin.Commands
|
||||
if (draggedVM.allowed_operations == null || !draggedVM.allowed_operations.Contains(vm_operations.migrate_send))
|
||||
return false;
|
||||
|
||||
if (VMOperationHostCommand.VmCpuFeaturesIncompatibleWithHost(targetHost, draggedVM))
|
||||
{
|
||||
// target host does not offer some of the CPU features that the VM currently sees
|
||||
if (Helpers.productVersionCompare(Helpers.HostProductVersion(targetHost), Helpers.HostProductVersion(draggedVMHome ?? Helpers.GetMaster(draggedVM.Connection))) < 0)
|
||||
return false;
|
||||
|
||||
if (VMOperationHostCommand.VmCpuIncompatibleWithHost(targetHost, draggedVM))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -29,16 +29,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using XenAdmin.Controls;
|
||||
using XenAPI;
|
||||
using XenAdmin.Core;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Dialogs;
|
||||
using System.Drawing;
|
||||
using XenAdmin.Actions.VMActions;
|
||||
@ -91,11 +87,11 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
}
|
||||
|
||||
if (targetHost != draggedVMHome && VMOperationHostCommand.VmCpuFeaturesIncompatibleWithHost(targetHost, draggedVM))
|
||||
{
|
||||
// target host does not offer some of the CPU features that the VM currently sees
|
||||
if (Helpers.productVersionCompare(Helpers.HostProductVersion(targetHost), Helpers.HostProductVersion(draggedVMHome)) < 0)
|
||||
return Messages.OLDER_THAN_CURRENT_SERVER;
|
||||
|
||||
if (targetHost != draggedVMHome && VMOperationHostCommand.VmCpuIncompatibleWithHost(targetHost, draggedVM))
|
||||
return Messages.MIGRATION_NOT_ALLOWED_CPU_FEATURES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -181,11 +177,11 @@ namespace XenAdmin.Commands
|
||||
return false;
|
||||
}
|
||||
|
||||
if (VMOperationHostCommand.VmCpuFeaturesIncompatibleWithHost(targetHost, draggedVM))
|
||||
{
|
||||
// target host does not offer some of the CPU features that the VM currently sees
|
||||
if (Helpers.productVersionCompare(Helpers.HostProductVersion(targetHost), Helpers.HostProductVersion(draggedVMHome)) < 0)
|
||||
return false;
|
||||
|
||||
if (VMOperationHostCommand.VmCpuIncompatibleWithHost(targetHost, draggedVM))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -45,8 +45,6 @@ namespace XenAdmin.Commands
|
||||
/// </summary>
|
||||
internal class ExportResourceReportCommand : Command
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public ExportResourceReportCommand()
|
||||
{
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ namespace XenAdmin.Commands
|
||||
/// </summary>
|
||||
internal class ExportVMCommand : Command
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of this Command. The parameter-less constructor is required if
|
||||
/// this Command is to be attached to a ToolStrip menu item or button. It should not be used in any other scenario.
|
||||
@ -117,7 +119,15 @@ namespace XenAdmin.Commands
|
||||
|
||||
// CA-12975: Warn the user if the export operation does not have enough disk space to
|
||||
// complete. This is an approximation only.
|
||||
Win32.DiskSpaceInfo diskSpaceInfo = Win32.GetDiskSpaceInfo(dlg.FileName);
|
||||
Win32.DiskSpaceInfo diskSpaceInfo = null;
|
||||
try
|
||||
{
|
||||
diskSpaceInfo = Win32.GetDiskSpaceInfo(dlg.FileName);
|
||||
}
|
||||
catch (Exception exn)
|
||||
{
|
||||
log.Warn(exn, exn);
|
||||
}
|
||||
|
||||
if (diskSpaceInfo == null)
|
||||
{
|
||||
|
@ -38,6 +38,8 @@ using XenAdmin.Core;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Wizards;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
@ -47,6 +49,8 @@ namespace XenAdmin.Commands
|
||||
/// </summary>
|
||||
internal class HACommand : Command
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of this Command. The parameter-less constructor is required if
|
||||
/// this Command is to be attached to a ToolStrip menu item or button. It should not be used in any other scenario.
|
||||
@ -88,8 +92,27 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
else if (pool.ha_enabled)
|
||||
{
|
||||
// Show VM restart priority editor
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(connection, new EditVmHaPrioritiesDialog(pool));
|
||||
if (pool.ha_statefiles.Any(sf => pool.Connection.Resolve(new XenRef<VDI>(sf)) != null))
|
||||
{
|
||||
// Show VM restart priority editor
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(connection, new EditVmHaPrioritiesDialog(pool));
|
||||
}
|
||||
else
|
||||
{
|
||||
log.ErrorFormat("Cannot resolve HA statefile VDI (pool {0} has {1} statefiles).",
|
||||
pool.Name(), pool.ha_statefiles.Length);
|
||||
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(
|
||||
SystemIcons.Error,
|
||||
string.Format(Messages.HA_CONFIGURE_NO_STATEFILE, Helpers.GetName(pool).Ellipsise(30)),
|
||||
Messages.CONFIGURE_HA),
|
||||
"HADisable",
|
||||
ThreeButtonDialog.ButtonOK))
|
||||
{
|
||||
dlg.ShowDialog(Program.MainWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -105,26 +128,24 @@ namespace XenAdmin.Commands
|
||||
|
||||
protected override bool CanExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
if (selection.Count == 1)
|
||||
{
|
||||
Pool poolAncestor = selection[0].PoolAncestor;
|
||||
bool inPool = poolAncestor != null;
|
||||
if (selection.Count != 1)
|
||||
return false;
|
||||
|
||||
if (inPool )
|
||||
{
|
||||
Host master = Helpers.GetMaster(poolAncestor.Connection);
|
||||
Pool poolAncestor = selection[0].PoolAncestor;
|
||||
if (poolAncestor == null || poolAncestor.Locked)
|
||||
return false;
|
||||
|
||||
if (master == null || HelpersGUI.FindActiveHaAction(poolAncestor.Connection) != null || poolAncestor.Locked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
if (poolAncestor.Connection == null || !poolAncestor.Connection.IsConnected)
|
||||
return false;
|
||||
|
||||
if (HelpersGUI.FindActiveHaAction(poolAncestor.Connection) != null)
|
||||
return false;
|
||||
|
||||
Host master = Helpers.GetMaster(poolAncestor.Connection);
|
||||
if (master == null)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override string GetCantExecuteReasonCore(IXenObject item)
|
||||
|
@ -107,27 +107,28 @@ namespace XenAdmin.Commands
|
||||
|
||||
private void ExitMaintenanceMode(Host host)
|
||||
{
|
||||
List<VM> vmsToUnEvacuate = new List<VM>();
|
||||
vmsToUnEvacuate.AddRange(host.GetHaltedEvacuatedVMs());
|
||||
vmsToUnEvacuate.AddRange(host.GetMigratedEvacuatedVMs());
|
||||
vmsToUnEvacuate.AddRange(host.GetSuspendedEvacuatedVMs());
|
||||
var vmsToRestore = new List<VM>();
|
||||
vmsToRestore.AddRange(host.GetHaltedEvacuatedVMs());
|
||||
vmsToRestore.AddRange(host.GetMigratedEvacuatedVMs());
|
||||
vmsToRestore.AddRange(host.GetSuspendedEvacuatedVMs());
|
||||
|
||||
List<VM> to_remove = new List<VM>();
|
||||
foreach (VM vm in vmsToUnEvacuate)
|
||||
foreach (VM vm in vmsToRestore)
|
||||
{
|
||||
if (vm.resident_on == host.opaque_ref)
|
||||
to_remove.Add(vm);
|
||||
}
|
||||
foreach (VM vm in to_remove)
|
||||
{
|
||||
vmsToUnEvacuate.Remove(vm);
|
||||
vmsToRestore.Remove(vm);
|
||||
}
|
||||
|
||||
DialogResult result = DialogResult.No;
|
||||
|
||||
if (vmsToUnEvacuate.Count > 0 && !MainWindowCommandInterface.RunInAutomatedTestMode)
|
||||
if (vmsToRestore.Count > 0 && !MainWindowCommandInterface.RunInAutomatedTestMode)
|
||||
{
|
||||
result = new RestoreVMsDialog(vmsToUnEvacuate, host).ShowDialog();
|
||||
using (var dlg = new ExitMaintenanceModeDialog(vmsToRestore, host))
|
||||
result = dlg.ShowDialog();
|
||||
|
||||
if (result == DialogResult.Cancel)
|
||||
return;
|
||||
@ -140,7 +141,7 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
|
||||
MainWindowCommandInterface.CloseActiveWizards(host.Connection);
|
||||
var action = new EnableHostAction(host, result == DialogResult.Yes,AddHostToPoolCommand.EnableNtolDialog);
|
||||
var action = new EnableHostAction(host, result == DialogResult.Yes, AddHostToPoolCommand.EnableNtolDialog);
|
||||
action.Completed += Program.MainWindow.action_Completed;
|
||||
action.RunAsync();
|
||||
}
|
||||
|
@ -132,7 +132,9 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
CreateCdDriveAction createDriveAction = new CreateCdDriveAction(vm, true,NewDiskDialog.ShowMustRebootBoxCD,NewDiskDialog.ShowVBDWarningBox);
|
||||
//do not register the event ShowUserInstruction; we show explicitly a message afterwards
|
||||
var createDriveAction = new CreateCdDriveAction(vm);
|
||||
|
||||
using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
|
||||
{
|
||||
dlg.ShowDialog(Parent);
|
||||
@ -192,7 +194,9 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
if (CanExecute(vm) && vm.FindVMCDROM() == null)
|
||||
{
|
||||
CreateCdDriveAction createDriveAction = new CreateCdDriveAction(vm, true,NewDiskDialog.ShowMustRebootBoxCD,NewDiskDialog.ShowVBDWarningBox);
|
||||
//do not register the event ShowUserInstruction; we show explicitly a message afterwards
|
||||
var createDriveAction = new CreateCdDriveAction(vm);
|
||||
|
||||
using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
|
||||
{
|
||||
dlg.ShowDialog(Parent);
|
||||
@ -246,7 +250,6 @@ namespace XenAdmin.Commands
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void InstallToolsActionCompleted(ActionBase sender)
|
||||
{
|
||||
InstallPVToolsAction action = (InstallPVToolsAction)sender;
|
||||
@ -263,10 +266,7 @@ namespace XenAdmin.Commands
|
||||
if (!MainWindowCommandInterface.RunInAutomatedTestMode)
|
||||
{
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(
|
||||
SystemIcons.Information,
|
||||
Messages.NEW_DVD_DRIVE_REBOOT_TOOLS,
|
||||
Messages.NEW_DVD_DRIVE_CREATED)))
|
||||
new ThreeButtonDialog.Details(SystemIcons.Information, Messages.NEW_DVD_DRIVE_REBOOT_TOOLS)))
|
||||
{
|
||||
dlg.ShowDialog(Parent);
|
||||
}
|
||||
|
98
XenAdmin/Commands/LaunchConversionManagerCommand.cs
Normal file
@ -0,0 +1,98 @@
|
||||
/* 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.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
{
|
||||
internal class LaunchConversionManagerCommand : Command
|
||||
{
|
||||
public LaunchConversionManagerCommand()
|
||||
{
|
||||
}
|
||||
|
||||
public LaunchConversionManagerCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
|
||||
: base(mainWindow, selection)
|
||||
{
|
||||
}
|
||||
|
||||
public override string MenuText => Messages.MAINWINDOW_CONVERSION_MANAGER_MENU_ITEM;
|
||||
|
||||
protected override bool CanExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
var con = selection.GetConnectionOfFirstItem();
|
||||
return con != null && con.Cache.VMs.Any(v => v.IsConversionVM());
|
||||
}
|
||||
|
||||
protected override void ExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
var con = selection.GetConnectionOfFirstItem();
|
||||
|
||||
if (Helpers.FeatureForbidden(con, Host.RestrictConversion))
|
||||
{
|
||||
var msg = HiddenFeatures.LinkLabelHidden
|
||||
? Messages.UPSELL_BLURB_CONVERSION
|
||||
: Messages.UPSELL_BLURB_CONVERSION + Messages.UPSELL_BLURB_TRIAL;
|
||||
|
||||
using (var dlg = new UpsellDialog(msg, InvisibleMessages.UPSELL_LEARNMOREURL_TRIAL))
|
||||
dlg.ShowDialog(Parent);
|
||||
}
|
||||
else if (!con.Session.IsLocalSuperuser && !Registry.DontSudo && con.Session.Roles.All(r => r.name_label != Role.MR_ROLE_POOL_ADMIN))
|
||||
{
|
||||
var currentRoles = con.Session.Roles;
|
||||
currentRoles.Sort();
|
||||
|
||||
var msg = string.Format(Messages.CONVERSION_RBAC_RESTRICTION, currentRoles[0].FriendlyName(),
|
||||
Role.FriendlyName(Role.MR_ROLE_POOL_ADMIN));
|
||||
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(SystemIcons.Error, msg),
|
||||
ThreeButtonDialog.ButtonOK))
|
||||
dlg.ShowDialog(Parent);
|
||||
}
|
||||
else if (selection.First is VM vm && vm.IsConversionVM())
|
||||
{
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(con, new ConversionDialog(con, vm));
|
||||
}
|
||||
else
|
||||
{
|
||||
var conversionVms = con.Cache.VMs.Where(v => v.IsConversionVM()).ToArray();
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(con, new ConversionDialog(con, conversionVms));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -96,7 +96,7 @@ namespace XenAdmin.Commands
|
||||
SR sr = vdi.Connection.Resolve(vdi.SR);
|
||||
if (sr == null || sr.HBALunPerVDI())
|
||||
return false;
|
||||
if (Helpers.DundeePlusOrGreater(vdi.Connection) && !sr.allowed_operations.Contains(storage_operations.vdi_mirror))
|
||||
if (!sr.SupportsStorageMigration())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -126,7 +126,7 @@ namespace XenAdmin.Commands
|
||||
return base.GetCantExecuteReasonCore(item);
|
||||
if (sr.HBALunPerVDI())
|
||||
return Messages.UNSUPPORTED_SR_TYPE;
|
||||
if (Helpers.DundeePlusOrGreater(vdi.Connection) && !sr.allowed_operations.Contains(storage_operations.vdi_mirror))
|
||||
if (!sr.SupportsStorageMigration())
|
||||
return Messages.UNSUPPORTED_SR_TYPE;
|
||||
|
||||
return base.GetCantExecuteReasonCore(item);
|
||||
|
@ -69,14 +69,13 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
item.Connection.CachePopulated += Connection_CachePopulated;
|
||||
}
|
||||
XenConnectionUI.BeginConnect(item.Connection, true, null, false);
|
||||
XenConnectionUI.BeginConnect(item.Connection, true, Program.MainWindow, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Connection_CachePopulated(object sender, EventArgs e)
|
||||
private void Connection_CachePopulated(IXenConnection c)
|
||||
{
|
||||
IXenConnection c = (IXenConnection)sender;
|
||||
c.CachePopulated -= Connection_CachePopulated;
|
||||
|
||||
MainWindowCommandInterface.TrySelectNewObjectInTree(c, true, true, false);
|
||||
|
@ -68,7 +68,7 @@ namespace XenAdmin.Commands
|
||||
foreach (Host host in selection.AsXenObjects<Host>())
|
||||
{
|
||||
string msg = string.Format(Messages.MAINWINDOW_LOG_REMOVECONNECTION, host.Connection.Hostname);
|
||||
log.Info(msg);
|
||||
log.Info($"Removed connection to {host.Connection.Hostname}");
|
||||
new ActionBase(msg, msg, false, true);
|
||||
MainWindowCommandInterface.CloseActiveWizards(host.Connection);
|
||||
host.Connection.EndConnect();
|
||||
|
@ -48,8 +48,6 @@ namespace XenAdmin.Commands
|
||||
/// </summary>
|
||||
internal class RemoveHostFromPoolCommand : Command
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of this Command. The parameter-less constructor is required if
|
||||
/// this Command is to be attached to a ToolStrip menu item or button. It should not be used in any other scenario.
|
||||
@ -129,12 +127,12 @@ namespace XenAdmin.Commands
|
||||
RunMultipleActions(actions, Messages.REMOVING_SERVERS_FROM_POOL, Messages.POOLCREATE_REMOVING, Messages.POOLCREATE_REMOVED, true);
|
||||
}
|
||||
|
||||
private static bool CanExecute(Host host)
|
||||
public static bool CanExecute(Host host)
|
||||
{
|
||||
if (host != null && host.Connection != null )
|
||||
if (host != null && host.Connection != null)
|
||||
{
|
||||
Pool pool = Helpers.GetPool(host.Connection);
|
||||
return pool != null && host.resident_VMs != null && host.resident_VMs.Count < 2 && host.IsLive();
|
||||
return pool != null && host.opaque_ref != pool.master && host.resident_VMs != null && host.resident_VMs.Count < 2 && host.IsLive();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -201,7 +199,7 @@ namespace XenAdmin.Commands
|
||||
|
||||
if (socket.Connected)
|
||||
{
|
||||
MainWindowCommandInterface.Invoke(() => XenConnectionUI.BeginConnect(connection, false, null, false));
|
||||
MainWindowCommandInterface.Invoke(() => XenConnectionUI.BeginConnect(connection, false, Program.MainWindow, false));
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
|
@ -37,7 +37,6 @@ using System.Windows.Forms;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
using XenAdmin.Actions.VMActions;
|
||||
|
||||
@ -235,36 +234,49 @@ namespace XenAdmin.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
IXenConnection connection = vm.Connection;
|
||||
Session session = connection.DuplicateSession();
|
||||
if (session != null)
|
||||
var connection = vm.Connection;
|
||||
Session session;
|
||||
try
|
||||
{
|
||||
var reasons = new Dictionary<IXenObject, string>();
|
||||
|
||||
foreach (Host host in connection.Cache.Hosts)
|
||||
{
|
||||
reasons[host] = string.Empty;
|
||||
if (!isStart && VMOperationHostCommand.VmCpuFeaturesIncompatibleWithHost(host, vm))
|
||||
{
|
||||
reasons[host] = FriendlyErrorNames.VM_INCOMPATIBLE_WITH_THIS_HOST;
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
VM.assert_can_boot_here(session, vm.opaque_ref, host.opaque_ref);
|
||||
}
|
||||
catch (Failure failure)
|
||||
{
|
||||
reasons[host] = failure.Message;
|
||||
}
|
||||
}
|
||||
|
||||
Program.Invoke(Program.MainWindow, () =>
|
||||
{
|
||||
using (var dialog = new CommandErrorDialog(title, text, reasons))
|
||||
dialog.ShowDialog(Program.MainWindow);
|
||||
});
|
||||
session = connection.DuplicateSession();
|
||||
if (session == null)
|
||||
return;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var reasons = new Dictionary<IXenObject, string>();
|
||||
|
||||
foreach (Host host in connection.Cache.Hosts)
|
||||
{
|
||||
reasons[host] = string.Empty;
|
||||
if (!isStart && VMOperationHostCommand.VmCpuIncompatibleWithHost(host, vm))
|
||||
{
|
||||
reasons[host] = FriendlyErrorNames.VM_INCOMPATIBLE_WITH_THIS_HOST;
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
VM.assert_can_boot_here(session, vm.opaque_ref, host.opaque_ref);
|
||||
}
|
||||
catch (Failure failure)
|
||||
{
|
||||
reasons[host] = failure.Message;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.ErrorFormat("There was an error calling assert_can_boot_here on host {0}: {1}", host.Name(), e.Message);
|
||||
reasons[host] = Messages.HOST_MENU_UNKNOWN_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
Program.Invoke(Program.MainWindow, () =>
|
||||
{
|
||||
using (var dialog = new CommandErrorDialog(title, text, reasons))
|
||||
dialog.ShowDialog(Program.MainWindow);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ namespace XenAdmin.Commands
|
||||
if (vm.power_state == vm_power_state.Running && residentHost != null && host.opaque_ref == residentHost.opaque_ref)
|
||||
return Messages.HOST_MENU_CURRENT_SERVER;
|
||||
|
||||
if ((operation == vm_operations.pool_migrate || operation == vm_operations.resume_on) && VmCpuFeaturesIncompatibleWithHost(host, vm))
|
||||
if ((operation == vm_operations.pool_migrate || operation == vm_operations.resume_on) && VmCpuIncompatibleWithHost(host, vm))
|
||||
{
|
||||
return FriendlyErrorNames.VM_INCOMPATIBLE_WITH_THIS_HOST;
|
||||
}
|
||||
@ -147,8 +147,7 @@ namespace XenAdmin.Commands
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.ErrorFormat("There was an error calling assert_can_boot_here on host {0}", host.Name());
|
||||
log.Error(e, e);
|
||||
log.ErrorFormat("There was an error calling assert_can_boot_here on host {0}: {1}", host.Name(), e.Message);
|
||||
return Messages.HOST_MENU_UNKNOWN_ERROR;
|
||||
}
|
||||
|
||||
@ -169,9 +168,9 @@ namespace XenAdmin.Commands
|
||||
return base.GetCantExecuteReasonCore(item);
|
||||
}
|
||||
|
||||
public static bool VmCpuFeaturesIncompatibleWithHost(Host targetHost, VM vm)
|
||||
public static bool VmCpuIncompatibleWithHost(Host targetHost, VM vm)
|
||||
{
|
||||
// check the CPU feature compatibility for Dundee and higher hosts
|
||||
// check the CPU compatibility for Dundee and higher hosts
|
||||
if (!Helpers.DundeeOrGreater(targetHost))
|
||||
return false;
|
||||
|
||||
@ -186,19 +185,13 @@ namespace XenAdmin.Commands
|
||||
if (vm.power_state != vm_power_state.Running && vm.power_state != vm_power_state.Suspended)
|
||||
return false;
|
||||
|
||||
if (vm.last_boot_CPU_flags == null || !vm.last_boot_CPU_flags.ContainsKey("vendor") || !vm.last_boot_CPU_flags.ContainsKey("features")
|
||||
if (vm.last_boot_CPU_flags == null || !vm.last_boot_CPU_flags.ContainsKey("vendor")
|
||||
|| targetHost.cpu_info == null || !targetHost.cpu_info.ContainsKey("vendor"))
|
||||
return false;
|
||||
|
||||
if (vm.last_boot_CPU_flags["vendor"] != targetHost.cpu_info["vendor"])
|
||||
return true;
|
||||
|
||||
if (vm.IsHVM() && targetHost.cpu_info.ContainsKey("features_hvm"))
|
||||
return PoolJoinRules.FewerFeatures(targetHost.cpu_info["features_hvm"], vm.last_boot_CPU_flags["features"]);
|
||||
|
||||
if (!vm.IsHVM() && targetHost.cpu_info.ContainsKey("features_pv"))
|
||||
return PoolJoinRules.FewerFeatures(targetHost.cpu_info["features_pv"], vm.last_boot_CPU_flags["features"]);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
internal partial class VMOperationWlbHostCommand : VMOperationCommand
|
||||
{
|
||||
private readonly static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly string _menuText;
|
||||
private readonly Image _menuImage;
|
||||
private readonly Image _secondImage;
|
||||
|
@ -151,12 +151,25 @@ namespace XenAdmin.ConsoleView
|
||||
AddKeyHandler(new Set<Keys>(Keys.RMenu, Keys.LShiftKey, Keys.U), methodInvoker);
|
||||
AddKeyHandler(new Set<Keys>(Keys.RMenu, Keys.RShiftKey, Keys.U), methodInvoker);
|
||||
|
||||
AddKeyHandler(new Set<Keys>(Keys.ShiftKey, Keys.Menu, Keys.U), methodInvoker);
|
||||
AddKeyHandler(new Set<Keys>(Keys.LShiftKey, Keys.LMenu, Keys.U), methodInvoker);
|
||||
AddKeyHandler(new Set<Keys>(Keys.RShiftKey, Keys.LMenu, Keys.U), methodInvoker);
|
||||
AddKeyHandler(new Set<Keys>(Keys.LShiftKey, Keys.RMenu, Keys.U), methodInvoker);
|
||||
AddKeyHandler(new Set<Keys>(Keys.RShiftKey, Keys.RMenu, Keys.U), methodInvoker);
|
||||
|
||||
AddKeyHandler(new Set<int>(ALT_SCAN, L_SHIFT_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(ALT2_SCAN, L_SHIFT_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(ALT_SCAN, R_SHIFT_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(ALT2_SCAN, R_SHIFT_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(ALT2_SCAN, R_SHIFT_SCAN, GR_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(ALT2_SCAN, L_SHIFT_SCAN, GR_SCAN, U_SCAN), methodInvoker);
|
||||
|
||||
AddKeyHandler(new Set<int>(L_SHIFT_SCAN, ALT_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(L_SHIFT_SCAN, ALT2_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(R_SHIFT_SCAN, ALT_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(R_SHIFT_SCAN, ALT2_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(R_SHIFT_SCAN, ALT2_SCAN, GR_SCAN, U_SCAN), methodInvoker);
|
||||
AddKeyHandler(new Set<int>(L_SHIFT_SCAN, ALT2_SCAN, GR_SCAN, U_SCAN), methodInvoker);
|
||||
break;
|
||||
case ConsoleShortcutKey.F11:
|
||||
AddKeyHandler(new Set<Keys>(Keys.F11), methodInvoker);
|
||||
@ -264,12 +277,25 @@ namespace XenAdmin.ConsoleView
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.RMenu, Keys.LShiftKey, Keys.U));
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.RMenu, Keys.RShiftKey, Keys.U));
|
||||
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.ShiftKey, Keys.Menu, Keys.U));
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.LShiftKey, Keys.LMenu, Keys.U));
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.RShiftKey, Keys.LMenu, Keys.U));
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.LShiftKey, Keys.RMenu, Keys.U));
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.RShiftKey, Keys.RMenu, Keys.U));
|
||||
|
||||
RemoveKeyHandler(new Set<int>(ALT_SCAN, L_SHIFT_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(ALT2_SCAN, L_SHIFT_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(ALT_SCAN, R_SHIFT_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(ALT2_SCAN, R_SHIFT_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(ALT2_SCAN, R_SHIFT_SCAN, GR_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(ALT2_SCAN, L_SHIFT_SCAN, GR_SCAN, U_SCAN));
|
||||
|
||||
RemoveKeyHandler(new Set<int>(L_SHIFT_SCAN, ALT_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(L_SHIFT_SCAN, ALT2_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(R_SHIFT_SCAN, ALT_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(R_SHIFT_SCAN, ALT2_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(R_SHIFT_SCAN, ALT2_SCAN, GR_SCAN, U_SCAN));
|
||||
RemoveKeyHandler(new Set<int>(L_SHIFT_SCAN, ALT2_SCAN, GR_SCAN, U_SCAN));
|
||||
break;
|
||||
case ConsoleShortcutKey.F11:
|
||||
RemoveKeyHandler(new Set<Keys>(Keys.F11));
|
||||
|
@ -168,14 +168,9 @@ namespace XenAdmin.ConsoleView
|
||||
if (rdpControl == null)
|
||||
return;
|
||||
|
||||
Log.DebugFormat("Connecting RDPClient{0} using server '{1}', width '{2}' and height '{3}'",
|
||||
rdpClient9 == null ? "6" : "9",
|
||||
rdpIP,
|
||||
w,
|
||||
h);
|
||||
|
||||
if (rdpClient9 == null)
|
||||
{
|
||||
Log.Debug($"Connecting RDPClient6 using server '{rdpIP}', width '{w}' and height '{h}'");
|
||||
rdpClient6.Server = rdpIP;
|
||||
rdpClient6.DesktopWidth = w;
|
||||
rdpClient6.DesktopHeight = h;
|
||||
@ -183,6 +178,7 @@ namespace XenAdmin.ConsoleView
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Debug($"Connecting RDPClient9 using server '{rdpIP}', width '{w}' and height '{h}'");
|
||||
rdpClient9.Server = rdpIP;
|
||||
rdpClient9.DesktopWidth = w;
|
||||
rdpClient9.DesktopHeight = h;
|
||||
|
@ -1057,7 +1057,7 @@ namespace XenAdmin.ConsoleView
|
||||
fullscreenForm.Refresh();
|
||||
}
|
||||
|
||||
void Connection_BeforeConnectionEnd(object sender, EventArgs e)
|
||||
void Connection_BeforeConnectionEnd(IXenConnection conn)
|
||||
{
|
||||
Program.Invoke(this, toggleFullscreen);
|
||||
}
|
||||
|
@ -1096,7 +1096,7 @@ namespace XenAdmin.ConsoleView
|
||||
sesssionRef = activeSession.opaque_ref;
|
||||
}
|
||||
|
||||
Stream stream = HTTPHelper.CONNECT(uri, console.Connection, sesssionRef, false, true);
|
||||
Stream stream = HTTPHelper.CONNECT(uri, console.Connection, sesssionRef, false);
|
||||
|
||||
InvokeConnection(v, stream, console);
|
||||
}
|
||||
|
@ -29,17 +29,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using XenAPI;
|
||||
using XenAdmin.Network;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Commands;
|
||||
|
||||
|
||||
namespace XenAdmin.Controls
|
||||
{
|
||||
@ -61,8 +55,8 @@ namespace XenAdmin.Controls
|
||||
// if the old value was not null then we need to deregister the event handlers
|
||||
if (connection != null)
|
||||
{
|
||||
connection.ConnectionStateChanged -= new EventHandler<EventArgs>(connection_ConnectionStateChanged);
|
||||
connection.CachePopulated -= new EventHandler<EventArgs>(connection_CachePopulated);
|
||||
connection.ConnectionStateChanged -= connection_ConnectionStateChanged;
|
||||
connection.CachePopulated -= connection_CachePopulated;
|
||||
}
|
||||
|
||||
// Now set to the new value, if it's not null then we set the labels and tooltip relevant to the new connection
|
||||
@ -70,9 +64,9 @@ namespace XenAdmin.Controls
|
||||
if (connection != null)
|
||||
{
|
||||
// If the current connection disconnects we need to clear the labels
|
||||
connection.ConnectionStateChanged += new EventHandler<EventArgs>(connection_ConnectionStateChanged);
|
||||
connection.ConnectionStateChanged += connection_ConnectionStateChanged;
|
||||
// if the cache isn't populated yet we can clear the lables and update later off this event handler
|
||||
connection.CachePopulated += new EventHandler<EventArgs>(connection_CachePopulated);
|
||||
connection.CachePopulated += connection_CachePopulated;
|
||||
if (connection.CacheIsPopulated)
|
||||
{
|
||||
setLabelText();
|
||||
@ -85,25 +79,14 @@ namespace XenAdmin.Controls
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to clear the labels on a disconnect
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void connection_ConnectionStateChanged(object sender, EventArgs e)
|
||||
void connection_ConnectionStateChanged(IXenConnection conn)
|
||||
{
|
||||
Program.Invoke(Program.MainWindow, delegate
|
||||
{
|
||||
setLabelText();
|
||||
});
|
||||
Program.Invoke(Program.MainWindow, setLabelText);
|
||||
}
|
||||
|
||||
void connection_CachePopulated(object sender, EventArgs e)
|
||||
void connection_CachePopulated(IXenConnection conn)
|
||||
{
|
||||
Program.Invoke(Program.MainWindow, delegate
|
||||
{
|
||||
setLabelText();
|
||||
});
|
||||
Program.Invoke(Program.MainWindow, setLabelText);
|
||||
}
|
||||
|
||||
private void setLabelText()
|
||||
|
@ -135,7 +135,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="DynamicRadioButton.Text" xml:space="preserve">
|
||||
<value>ホーム サーバーを指定しない(&D) 必要なリソースを持つ任意のサーバー上で VM が起動します (共有ストレージ必須)。</value>
|
||||
<value>ホーム サーバーを指定しない(&D)。必要なリソースを持つ任意のサーバー上で VM が起動します (共有ストレージ必須)。</value>
|
||||
</data>
|
||||
<data name="DynamicRadioButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>TopLeft</value>
|
||||
|
@ -106,7 +106,7 @@ namespace XenAdmin.Controls.Ballooning
|
||||
decimal newValue;
|
||||
if (Units == "GB")
|
||||
{
|
||||
newValue = (decimal)Util.ToGB(value, 1, RoundingBehaviour.Nearest);
|
||||
newValue = (decimal)Util.ToGB(value, RoundingBehaviour.Nearest, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -134,12 +134,12 @@ namespace XenAdmin.Controls.Ballooning
|
||||
public static void CalcGBRanges(double minBytes, double maxBytes, out double minGB, out double maxGB)
|
||||
{
|
||||
// Round ranges inwards to avoid bugs like CA-34487 and CA-34996
|
||||
minGB = Util.ToGB(minBytes, 1, RoundingBehaviour.Up);
|
||||
maxGB = Util.ToGB(maxBytes, 1, RoundingBehaviour.Down);
|
||||
minGB = Util.ToGB(minBytes, RoundingBehaviour.Up, 1);
|
||||
maxGB = Util.ToGB(maxBytes, RoundingBehaviour.Down, 1);
|
||||
if (minGB > maxGB) // just in case...
|
||||
{
|
||||
minGB = Util.ToGB(minBytes, 1, RoundingBehaviour.None);
|
||||
maxGB = Util.ToGB(maxBytes, 1, RoundingBehaviour.None);
|
||||
minGB = Util.ToGB(minBytes, RoundingBehaviour.None, 1);
|
||||
maxGB = Util.ToGB(maxBytes, RoundingBehaviour.None, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,11 +106,8 @@ namespace XenAdmin.Controls.CheckableDataGridView
|
||||
}
|
||||
}
|
||||
|
||||
private void cRow_CellDataUpdated(object sender, EventArgs e)
|
||||
private void cRow_CellDataUpdated(CheckableDataGridViewRow row)
|
||||
{
|
||||
CheckableDataGridViewRow row = sender as CheckableDataGridViewRow;
|
||||
if(row == null)
|
||||
return;
|
||||
UpdateRow(row, true);
|
||||
}
|
||||
|
||||
|
@ -40,14 +40,9 @@ namespace XenAdmin.Controls.CheckableDataGridView
|
||||
{
|
||||
public virtual IXenObject XenObject { get; private set; }
|
||||
|
||||
public delegate void CellTextUpdatedEvent(object sender, EventArgs e);
|
||||
public event CellTextUpdatedEvent CellDataUpdated;
|
||||
public event Action<CheckableDataGridViewRow> CellDataUpdated;
|
||||
|
||||
public CheckableDataGridViewRow() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
protected CheckableDataGridViewRow(IXenObject xenObject)
|
||||
protected CheckableDataGridViewRow(IXenObject xenObject = null)
|
||||
{
|
||||
XenObject = xenObject;
|
||||
}
|
||||
@ -91,10 +86,7 @@ namespace XenAdmin.Controls.CheckableDataGridView
|
||||
/// <summary>
|
||||
/// Override this if you cells data is loaded after it is first drawn
|
||||
/// </summary>
|
||||
public virtual bool CellDataLoaded
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
public virtual bool CellDataLoaded => true;
|
||||
|
||||
public virtual void BeginCellUpdate(){}
|
||||
|
||||
@ -131,8 +123,7 @@ namespace XenAdmin.Controls.CheckableDataGridView
|
||||
|
||||
protected void TriggerCellTextUpdatedEvent()
|
||||
{
|
||||
if (CellDataUpdated != null)
|
||||
CellDataUpdated(this, EventArgs.Empty);
|
||||
CellDataUpdated?.Invoke(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ namespace XenAdmin.Controls
|
||||
|
||||
}
|
||||
|
||||
internal class GpuTuple : IEquatable<GpuTuple>
|
||||
public class GpuTuple : IEquatable<GpuTuple>
|
||||
{
|
||||
public readonly GPU_group GpuGroup;
|
||||
public readonly VGPU_type[] VgpuTypes;
|
||||
|
@ -36,11 +36,12 @@ using System.Windows.Forms;
|
||||
using XenAdmin.ConsoleView;
|
||||
using XenAPI;
|
||||
using System.Drawing;
|
||||
using XenAdmin.Help;
|
||||
|
||||
|
||||
namespace XenAdmin.Controls
|
||||
{
|
||||
public partial class ConsolePanel : UserControl
|
||||
public partial class ConsolePanel : UserControl, IControlWithHelp
|
||||
{
|
||||
private const int MAX_ACTIVE_VM_CONSOLES = 10;
|
||||
|
||||
@ -56,6 +57,8 @@ namespace XenAdmin.Controls
|
||||
ClearErrorMessage();
|
||||
}
|
||||
|
||||
public virtual string HelpID => "TabPageConsole";
|
||||
|
||||
public void PauseAllViews()
|
||||
{
|
||||
// We're going to pause all of our VNCViews here, as this gets called when the VNC tab is not selected.
|
||||
@ -384,5 +387,7 @@ namespace XenAdmin.Controls
|
||||
else
|
||||
setCurrentSource(cvm);
|
||||
}
|
||||
|
||||
public override string HelpID => "TabPageCvmConsole";
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ namespace XenAdmin.Controls.CustomDataGraph
|
||||
Session session = xenObject.Connection.Session;
|
||||
if (session == null)
|
||||
return;
|
||||
using (Stream httpstream = HTTPHelper.GET(URI(session, host, interval, xenObject), xenObject.Connection, true, false))
|
||||
using (Stream httpstream = HTTPHelper.GET(URI(session, host, interval, xenObject), xenObject.Connection, true))
|
||||
{
|
||||
using (XmlReader reader = XmlReader.Create(httpstream))
|
||||
{
|
||||
|
@ -96,13 +96,7 @@ namespace XenAdmin.Controls
|
||||
/// <summary>
|
||||
/// The text that has been passed to the base System.Windows.Forms.GroupBox class, escaped as necessary.
|
||||
/// </summary>
|
||||
protected String EscapedText
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Text;
|
||||
}
|
||||
}
|
||||
public string EscapedText => base.Text;
|
||||
|
||||
private const int FUDGE = 15;
|
||||
|
||||
|
113
XenAdmin/Controls/DiskSpinner.Designer.cs
generated
Normal file
@ -0,0 +1,113 @@
|
||||
namespace XenAdmin.Controls
|
||||
{
|
||||
partial class DiskSpinner
|
||||
{
|
||||
/// <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))
|
||||
{
|
||||
DiskSizeNumericUpDown.TextChanged -= DiskSizeNumericUpDown_TextChanged;
|
||||
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(DiskSpinner));
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanelError = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelError = new System.Windows.Forms.Label();
|
||||
this.pictureBoxError = new System.Windows.Forms.PictureBox();
|
||||
this.comboBoxUnits = new System.Windows.Forms.ComboBox();
|
||||
this.DiskSizeNumericUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.tableLayoutPanelError.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxError)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DiskSizeNumericUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanelError, 2, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.comboBoxUnits, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.DiskSizeNumericUpDown, 0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// tableLayoutPanelError
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanelError, "tableLayoutPanelError");
|
||||
this.tableLayoutPanelError.Controls.Add(this.labelError, 1, 0);
|
||||
this.tableLayoutPanelError.Controls.Add(this.pictureBoxError, 0, 0);
|
||||
this.tableLayoutPanelError.Name = "tableLayoutPanelError";
|
||||
//
|
||||
// labelError
|
||||
//
|
||||
resources.ApplyResources(this.labelError, "labelError");
|
||||
this.labelError.ForeColor = System.Drawing.Color.Red;
|
||||
this.labelError.Name = "labelError";
|
||||
//
|
||||
// pictureBoxError
|
||||
//
|
||||
resources.ApplyResources(this.pictureBoxError, "pictureBoxError");
|
||||
this.pictureBoxError.Name = "pictureBoxError";
|
||||
this.pictureBoxError.TabStop = false;
|
||||
//
|
||||
// comboBoxUnits
|
||||
//
|
||||
this.comboBoxUnits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
resources.ApplyResources(this.comboBoxUnits, "comboBoxUnits");
|
||||
this.comboBoxUnits.FormattingEnabled = true;
|
||||
this.comboBoxUnits.Name = "comboBoxUnits";
|
||||
this.comboBoxUnits.SelectedIndexChanged += new System.EventHandler(this.comboBoxUnits_SelectedIndexChanged);
|
||||
//
|
||||
// DiskSizeNumericUpDown
|
||||
//
|
||||
resources.ApplyResources(this.DiskSizeNumericUpDown, "DiskSizeNumericUpDown");
|
||||
this.DiskSizeNumericUpDown.Name = "DiskSizeNumericUpDown";
|
||||
this.DiskSizeNumericUpDown.ValueChanged += new System.EventHandler(this.DiskSizeNumericUpDown_ValueChanged);
|
||||
this.DiskSizeNumericUpDown.KeyUp += new System.Windows.Forms.KeyEventHandler(this.DiskSizeNumericUpDown_KeyUp);
|
||||
//
|
||||
// DiskSpinner
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "DiskSpinner";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.tableLayoutPanelError.ResumeLayout(false);
|
||||
this.tableLayoutPanelError.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxError)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DiskSizeNumericUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.NumericUpDown DiskSizeNumericUpDown;
|
||||
private System.Windows.Forms.ComboBox comboBoxUnits;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelError;
|
||||
private System.Windows.Forms.Label labelError;
|
||||
private System.Windows.Forms.PictureBox pictureBoxError;
|
||||
}
|
||||
}
|
254
XenAdmin/Controls/DiskSpinner.cs
Normal file
@ -0,0 +1,254 @@
|
||||
/* 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;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace XenAdmin.Controls
|
||||
{
|
||||
public partial class DiskSpinner : UserControl
|
||||
{
|
||||
private const long DEFAULT_MINIMUM = Util.BINARY_MEGA; //default minimum size for disks
|
||||
private const long DEFAULT_MAXIMUM = Util.BINARY_PETA; //default maximum size for disks
|
||||
|
||||
private long _minDiskSize = DEFAULT_MINIMUM;
|
||||
private bool _updating;
|
||||
private bool _isSizeValid;
|
||||
|
||||
public event Action SelectedSizeChanged;
|
||||
|
||||
public DiskSpinner()
|
||||
{
|
||||
InitializeComponent();
|
||||
DiskSizeNumericUpDown.TextChanged += DiskSizeNumericUpDown_TextChanged;
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public bool CanResize
|
||||
{
|
||||
get => DiskSizeNumericUpDown.Enabled && comboBoxUnits.Enabled;
|
||||
set => DiskSizeNumericUpDown.Enabled = comboBoxUnits.Enabled = value;
|
||||
}
|
||||
|
||||
public long SelectedSize { get; private set; } = Util.BINARY_GIGA; //default size for disks
|
||||
|
||||
public bool IsSizeValid
|
||||
{
|
||||
get => _isSizeValid;
|
||||
private set
|
||||
{
|
||||
_isSizeValid = value;
|
||||
SelectedSizeChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void Populate(long selectedSize = Util.BINARY_GIGA, long minSize = DEFAULT_MINIMUM)
|
||||
{
|
||||
if (minSize < DEFAULT_MINIMUM)
|
||||
minSize = DEFAULT_MINIMUM;
|
||||
if (minSize > DEFAULT_MAXIMUM)
|
||||
minSize = DEFAULT_MAXIMUM;
|
||||
|
||||
if (selectedSize < minSize)
|
||||
selectedSize = minSize;
|
||||
if (selectedSize > DEFAULT_MAXIMUM)
|
||||
selectedSize = DEFAULT_MAXIMUM;
|
||||
|
||||
SelectedSize = selectedSize;
|
||||
_minDiskSize = minSize;
|
||||
|
||||
comboBoxUnits.Items.Add(new DiskSizeWithUnits(3, 1, 0.001M, Util.BINARY_KILO, Util.BINARY_TERA, Messages.VAL_TERB, Util.ToTB));
|
||||
comboBoxUnits.Items.Add(new DiskSizeWithUnits(3, 1, 0.001M, Util.BINARY_MEGA, Util.BINARY_GIGA, Messages.VAL_GIGB, Util.ToGB));
|
||||
comboBoxUnits.Items.Add(new DiskSizeWithUnits(0, 256, 1, Util.BINARY_GIGA, Util.BINARY_MEGA, Messages.VAL_MEGB, Util.ToMB));
|
||||
|
||||
foreach (DiskSizeWithUnits item in comboBoxUnits.Items)
|
||||
{
|
||||
if (item.TryRoundOptimal(selectedSize, out _))
|
||||
{
|
||||
comboBoxUnits.SelectedItem = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ValidateSize()
|
||||
{
|
||||
if (_updating || !(comboBoxUnits.SelectedItem is DiskSizeWithUnits dsk))
|
||||
return;
|
||||
|
||||
if (string.IsNullOrEmpty(DiskSizeNumericUpDown.Text.Trim())) //do not issue error here
|
||||
{
|
||||
SetError(null);
|
||||
IsSizeValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't use DiskSizeNumericUpDown.Value here, as it will fire the NumericUpDown built-in validation.
|
||||
// Use Text property instead. (CA-46028)
|
||||
|
||||
if (!decimal.TryParse(DiskSizeNumericUpDown.Text.Trim(), out decimal result) || result < 0)
|
||||
{
|
||||
SetError(Messages.INVALID_NUMBER);
|
||||
IsSizeValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
SelectedSize = (long)(result * dsk.Multiplier);
|
||||
}
|
||||
catch (OverflowException) //CA-71312
|
||||
{
|
||||
SelectedSize = long.MaxValue;
|
||||
}
|
||||
|
||||
if (SelectedSize < _minDiskSize)
|
||||
{
|
||||
SetError(string.Format(Messages.DISK_TOO_SMALL, Util.DiskSizeString(_minDiskSize, dsk.DecimalPlaces)));
|
||||
IsSizeValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (SelectedSize > DEFAULT_MAXIMUM)
|
||||
{
|
||||
SetError(Messages.INVALID_NUMBER);
|
||||
IsSizeValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
SetError(null);
|
||||
IsSizeValid = true;
|
||||
}
|
||||
|
||||
public void SetError(string error)
|
||||
{
|
||||
if (string.IsNullOrEmpty(error))
|
||||
tableLayoutPanelError.Visible = false;
|
||||
else
|
||||
{
|
||||
tableLayoutPanelError.Visible = true;
|
||||
labelError.Text = error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void DiskSizeNumericUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ValidateSize();
|
||||
}
|
||||
|
||||
private void DiskSizeNumericUpDown_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
ValidateSize();
|
||||
}
|
||||
|
||||
private void DiskSizeNumericUpDown_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
ValidateSize();
|
||||
}
|
||||
|
||||
private void comboBoxUnits_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
_updating = true;
|
||||
if (!(comboBoxUnits.SelectedItem is DiskSizeWithUnits dsk))
|
||||
return;
|
||||
|
||||
DiskSizeNumericUpDown.Increment = dsk.Increment;
|
||||
DiskSizeNumericUpDown.DecimalPlaces = dsk.DecimalPlaces;
|
||||
DiskSizeNumericUpDown.Minimum = dsk.Minimum;
|
||||
DiskSizeNumericUpDown.Maximum = dsk.Maximum;
|
||||
DiskSizeNumericUpDown.Value = dsk.RoundSize(SelectedSize);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_updating = false;
|
||||
}
|
||||
|
||||
ValidateSize();
|
||||
}
|
||||
|
||||
|
||||
private struct DiskSizeWithUnits
|
||||
{
|
||||
public int DecimalPlaces { get; }
|
||||
public int Increment { get; }
|
||||
public decimal Minimum { get; }
|
||||
public decimal Maximum { get; }
|
||||
public long Multiplier { get; }
|
||||
public string Unit { get; }
|
||||
public Func<double, RoundingBehaviour, int, double> RoundingFunction { get; }
|
||||
|
||||
public DiskSizeWithUnits(int decimalPlaces, int increment, decimal minimum, decimal maximum, long multiplier,
|
||||
string unit, Func<double, RoundingBehaviour, int, double> roundingFunction)
|
||||
{
|
||||
DecimalPlaces = decimalPlaces;
|
||||
Increment = increment;
|
||||
Minimum = minimum;
|
||||
Maximum = maximum;
|
||||
Multiplier = multiplier;
|
||||
Unit = unit;
|
||||
RoundingFunction = roundingFunction;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Unit;
|
||||
}
|
||||
|
||||
public decimal RoundSize(decimal size)
|
||||
{
|
||||
var rounded = (decimal)RoundingFunction((double)size, RoundingBehaviour.Up, DecimalPlaces);
|
||||
if (rounded < Minimum)
|
||||
return Minimum;
|
||||
if (rounded > Maximum)
|
||||
return Maximum;
|
||||
return rounded;
|
||||
}
|
||||
|
||||
public bool TryRoundOptimal(decimal size, out decimal result)
|
||||
{
|
||||
if (size >= Multiplier)
|
||||
{
|
||||
result = (decimal)RoundingFunction((double)size, RoundingBehaviour.Up, DecimalPlaces);
|
||||
return true;
|
||||
}
|
||||
|
||||
result = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
359
XenAdmin/Controls/DiskSpinner.ja.resx
Normal file
@ -0,0 +1,359 @@
|
||||
<?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="tableLayoutPanel1.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="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
</data>
|
||||
<data name="labelError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="labelError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>25, 3</value>
|
||||
</data>
|
||||
<data name="labelError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>276, 15</value>
|
||||
</data>
|
||||
<data name="labelError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelError.Text" xml:space="preserve">
|
||||
<value>There are no SR locations that can support this disk</value>
|
||||
</data>
|
||||
<data name=">>labelError.Name" xml:space="preserve">
|
||||
<value>labelError</value>
|
||||
</data>
|
||||
<data name=">>labelError.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>labelError.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAelJREFUOE+V
|
||||
k11P1EAUhqftirf+lI3o/+hf4kYSLgjKBVy5K6KwREhBdgOExEJCMBjMGgFR+SgECBpZFwhEkOTwnOl0
|
||||
U+CKkzzp1zzvnGmn5nZ1FEwIEcgt9F7oht0tHj6CuC/wZMkrSMM8lGNomDbZgznu9fJMx+hYp6Xl5Pqs
|
||||
X5BzpFNowh/EQxewYx7IJoz6gYbUb4RwEat8lpv1NxzALmwj/oR1WIGK79tOMjnUtnXWv/CvPCBXyY78
|
||||
Kj5tzZoUn8gl9xrlV/LZFGQJutPlhBoQLbK+Izerylr/m03ZRNyGK861znlWRV4wgVQ820WkAbKPmK31
|
||||
AEFlLT1m8iXH6WK7jCB/gGlQ1wZka92iXV3rj1yIlspTxcfyFmkKZqBmbAdpQIK0Ad9h1Qa0t2bW0oAq
|
||||
ATUb4MskRPmANaRv8JX1redkFZXsPCZkAnEMKrmAqOYF8gV5GS6SpCVMIryHCxdyykscsrIn/Z79CvYl
|
||||
hj18kk/IH+EoGpczBk4glmhZW53l/ITgtXJZniO/hs7Abu90a3MSD7I55hH0DQ9DybWqAe9ApR54oUc/
|
||||
3dJW1uLCbuUSIfp5qgjjLmAEYQg0oATdvp355lbWciFxF629ZH36koYR3jixl3vP0rbv/kz54uE9fmdj
|
||||
rgGIa8PaA/xpMAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Name" xml:space="preserve">
|
||||
<value>pictureBoxError</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>158, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>304, 22</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.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=">>tableLayoutPanelError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBoxError" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>114, 3</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>38, 23</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Name" xml:space="preserve">
|
||||
<value>comboBoxUnits</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 23</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Name" xml:space="preserve">
|
||||
<value>DiskSizeNumericUpDown</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>465, 29</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.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=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="tableLayoutPanelError" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="comboBoxUnits" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="DiskSizeNumericUpDown" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></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.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>465, 29</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>DiskSpinner</value>
|
||||
</data>
|
||||
<data name=">>$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>
|
359
XenAdmin/Controls/DiskSpinner.resx
Normal file
@ -0,0 +1,359 @@
|
||||
<?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="tableLayoutPanel1.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="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
</data>
|
||||
<data name="labelError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="labelError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>25, 3</value>
|
||||
</data>
|
||||
<data name="labelError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>276, 15</value>
|
||||
</data>
|
||||
<data name="labelError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelError.Text" xml:space="preserve">
|
||||
<value>There are no SR locations that can support this disk</value>
|
||||
</data>
|
||||
<data name=">>labelError.Name" xml:space="preserve">
|
||||
<value>labelError</value>
|
||||
</data>
|
||||
<data name=">>labelError.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>labelError.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAelJREFUOE+V
|
||||
k11P1EAUhqftirf+lI3o/+hf4kYSLgjKBVy5K6KwREhBdgOExEJCMBjMGgFR+SgECBpZFwhEkOTwnOl0
|
||||
U+CKkzzp1zzvnGmn5nZ1FEwIEcgt9F7oht0tHj6CuC/wZMkrSMM8lGNomDbZgznu9fJMx+hYp6Xl5Pqs
|
||||
X5BzpFNowh/EQxewYx7IJoz6gYbUb4RwEat8lpv1NxzALmwj/oR1WIGK79tOMjnUtnXWv/CvPCBXyY78
|
||||
Kj5tzZoUn8gl9xrlV/LZFGQJutPlhBoQLbK+Izerylr/m03ZRNyGK861znlWRV4wgVQ820WkAbKPmK31
|
||||
AEFlLT1m8iXH6WK7jCB/gGlQ1wZka92iXV3rj1yIlspTxcfyFmkKZqBmbAdpQIK0Ad9h1Qa0t2bW0oAq
|
||||
ATUb4MskRPmANaRv8JX1redkFZXsPCZkAnEMKrmAqOYF8gV5GS6SpCVMIryHCxdyykscsrIn/Z79CvYl
|
||||
hj18kk/IH+EoGpczBk4glmhZW53l/ITgtXJZniO/hs7Abu90a3MSD7I55hH0DQ9DybWqAe9ApR54oUc/
|
||||
3dJW1uLCbuUSIfp5qgjjLmAEYQg0oATdvp355lbWciFxF629ZH36koYR3jixl3vP0rbv/kz54uE9fmdj
|
||||
rgGIa8PaA/xpMAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Name" xml:space="preserve">
|
||||
<value>pictureBoxError</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>170, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>304, 22</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.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=">>tableLayoutPanelError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBoxError" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>114, 3</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>50, 23</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Name" xml:space="preserve">
|
||||
<value>comboBoxUnits</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 23</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Name" xml:space="preserve">
|
||||
<value>DiskSizeNumericUpDown</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>477, 29</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.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=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="tableLayoutPanelError" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="comboBoxUnits" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="DiskSizeNumericUpDown" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></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.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>477, 29</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>DiskSpinner</value>
|
||||
</data>
|
||||
<data name=">>$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>
|
359
XenAdmin/Controls/DiskSpinner.zh-CN.resx
Normal file
@ -0,0 +1,359 @@
|
||||
<?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="tableLayoutPanel1.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="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
</data>
|
||||
<data name="labelError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="labelError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>25, 3</value>
|
||||
</data>
|
||||
<data name="labelError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>276, 15</value>
|
||||
</data>
|
||||
<data name="labelError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelError.Text" xml:space="preserve">
|
||||
<value>There are no SR locations that can support this disk</value>
|
||||
</data>
|
||||
<data name=">>labelError.Name" xml:space="preserve">
|
||||
<value>labelError</value>
|
||||
</data>
|
||||
<data name=">>labelError.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>labelError.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAelJREFUOE+V
|
||||
k11P1EAUhqftirf+lI3o/+hf4kYSLgjKBVy5K6KwREhBdgOExEJCMBjMGgFR+SgECBpZFwhEkOTwnOl0
|
||||
U+CKkzzp1zzvnGmn5nZ1FEwIEcgt9F7oht0tHj6CuC/wZMkrSMM8lGNomDbZgznu9fJMx+hYp6Xl5Pqs
|
||||
X5BzpFNowh/EQxewYx7IJoz6gYbUb4RwEat8lpv1NxzALmwj/oR1WIGK79tOMjnUtnXWv/CvPCBXyY78
|
||||
Kj5tzZoUn8gl9xrlV/LZFGQJutPlhBoQLbK+Izerylr/m03ZRNyGK861znlWRV4wgVQ820WkAbKPmK31
|
||||
AEFlLT1m8iXH6WK7jCB/gGlQ1wZka92iXV3rj1yIlspTxcfyFmkKZqBmbAdpQIK0Ad9h1Qa0t2bW0oAq
|
||||
ATUb4MskRPmANaRv8JX1redkFZXsPCZkAnEMKrmAqOYF8gV5GS6SpCVMIryHCxdyykscsrIn/Z79CvYl
|
||||
hj18kk/IH+EoGpczBk4glmhZW53l/ITgtXJZniO/hs7Abu90a3MSD7I55hH0DQ9DybWqAe9ApR54oUc/
|
||||
3dJW1uLCbuUSIfp5qgjjLmAEYQg0oATdvp355lbWciFxF629ZH36koYR3jixl3vP0rbv/kz54uE9fmdj
|
||||
rgGIa8PaA/xpMAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="pictureBoxError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Name" xml:space="preserve">
|
||||
<value>pictureBoxError</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxError.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>158, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>304, 22</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanelError</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.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=">>tableLayoutPanelError.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelError.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelError.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBoxError" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>114, 3</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>38, 23</value>
|
||||
</data>
|
||||
<data name="comboBoxUnits.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Name" xml:space="preserve">
|
||||
<value>comboBoxUnits</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>comboBoxUnits.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 23</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="DiskSizeNumericUpDown.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Right</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Name" xml:space="preserve">
|
||||
<value>DiskSizeNumericUpDown</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>DiskSizeNumericUpDown.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>465, 29</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.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=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="tableLayoutPanelError" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="comboBoxUnits" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="DiskSizeNumericUpDown" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></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.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>465, 29</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>DiskSpinner</value>
|
||||
</data>
|
||||
<data name=">>$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>
|
@ -71,9 +71,9 @@ namespace XenAdmin.Controls
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
DeregisterEvents();
|
||||
ConnectionsManager.XenConnections.CollectionChanged -= XenConnections_CollectionChanged;
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void OnFilterChanged()
|
||||
@ -284,12 +284,12 @@ namespace XenAdmin.Controls
|
||||
host.PropertyChanged -= host_PropertyChanged;
|
||||
}
|
||||
|
||||
private void connection_ConnectionStateChanged(object sender, EventArgs e)
|
||||
private void connection_ConnectionStateChanged(IXenConnection conn)
|
||||
{
|
||||
Program.Invoke(Program.MainWindow, RefreshLists);
|
||||
}
|
||||
|
||||
private void connection_CachePopulated(object sender, EventArgs e)
|
||||
private void connection_CachePopulated(IXenConnection conn)
|
||||
{
|
||||
Program.Invoke(Program.MainWindow, RefreshLists);
|
||||
}
|
||||
|
@ -31,9 +31,6 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using XenAdmin.Actions;
|
||||
@ -51,77 +48,110 @@ namespace XenAdmin.Controls
|
||||
private ToolStripMenuItem toolStripMenuItemInProgress;
|
||||
private ToolStripMenuItem toolStripMenuItemError;
|
||||
private ToolStripMenuItem toolStripMenuItemCancelled;
|
||||
private ToolStripMenuItem toolStripMenuItemQueued;
|
||||
private ToolStripMenuItem toolStripMenuItemIncomplete;
|
||||
private ToolStripMenuItem toolStripMenuItemAll;
|
||||
|
||||
public FilterStatusToolStripDropDownButton()
|
||||
{
|
||||
toolStripMenuItemQueued = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_QUEUED,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
toolStripMenuItemComplete = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_COMPLETE,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_COMPLETE,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
toolStripMenuItemInProgress = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_IN_PROGRESS,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_IN_PROGRESS,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
toolStripMenuItemError = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_ERROR,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_ERROR,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
toolStripMenuItemCancelled = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_CANCEL,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
toolStripMenuItemAll = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.FILTER_SHOW_ALL,
|
||||
Enabled = false
|
||||
};
|
||||
DropDownItems.AddRange(new ToolStripItem[]
|
||||
{
|
||||
toolStripMenuItemComplete,
|
||||
toolStripMenuItemInProgress,
|
||||
toolStripMenuItemError,
|
||||
toolStripMenuItemCancelled,
|
||||
new ToolStripSeparator(),
|
||||
toolStripMenuItemAll
|
||||
});
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_CANCEL,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
|
||||
toolStripMenuItemIncomplete = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.STATUS_FILTER_INCOMPLETE,
|
||||
Checked = true,
|
||||
CheckOnClick = true
|
||||
};
|
||||
toolStripMenuItemAll = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.FILTER_SHOW_ALL,
|
||||
Enabled = false
|
||||
};
|
||||
|
||||
DropDownItems.AddRange(new ToolStripItem[]
|
||||
{
|
||||
toolStripMenuItemQueued,
|
||||
toolStripMenuItemComplete,
|
||||
toolStripMenuItemInProgress,
|
||||
toolStripMenuItemError,
|
||||
toolStripMenuItemCancelled,
|
||||
toolStripMenuItemIncomplete,
|
||||
new ToolStripSeparator(),
|
||||
toolStripMenuItemAll
|
||||
});
|
||||
|
||||
toolStripMenuItemQueued.CheckedChanged += Item_CheckedChanged;
|
||||
toolStripMenuItemComplete.CheckedChanged += Item_CheckedChanged;
|
||||
toolStripMenuItemInProgress.CheckedChanged += Item_CheckedChanged;
|
||||
toolStripMenuItemError.CheckedChanged += Item_CheckedChanged;
|
||||
toolStripMenuItemCancelled.CheckedChanged += Item_CheckedChanged;
|
||||
toolStripMenuItemIncomplete.CheckedChanged += Item_CheckedChanged;
|
||||
}
|
||||
|
||||
public bool HideByStatus(ActionBase action)
|
||||
public bool HideByStatus(IStatus iStatus)
|
||||
{
|
||||
bool cancelled = action.IsCompleted && !action.Succeeded && (action.Exception is CancelledException);
|
||||
bool error = action.IsCompleted && !action.Succeeded && !(action.Exception is CancelledException);
|
||||
|
||||
return !((toolStripMenuItemComplete.Checked && action.Succeeded)
|
||||
|| (toolStripMenuItemError.Checked && error)
|
||||
|| (toolStripMenuItemInProgress.Checked && !action.IsCompleted)
|
||||
|| (toolStripMenuItemCancelled.Checked && cancelled));
|
||||
return !(toolStripMenuItemComplete.Checked && iStatus.Succeeded
|
||||
|| toolStripMenuItemError.Checked && iStatus.IsError
|
||||
|| toolStripMenuItemInProgress.Checked && iStatus.InProgress
|
||||
|| toolStripMenuItemCancelled.Checked && iStatus.IsCancelled
|
||||
|| toolStripMenuItemIncomplete.Checked && iStatus.IsIncomplete
|
||||
|| toolStripMenuItemQueued.Checked && iStatus.IsQueued);
|
||||
}
|
||||
|
||||
public bool FilterIsOn
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public bool ImplementsQueued
|
||||
{
|
||||
get
|
||||
{
|
||||
return !toolStripMenuItemComplete.Checked
|
||||
|| !toolStripMenuItemInProgress.Checked
|
||||
|| !toolStripMenuItemError.Checked
|
||||
|| !toolStripMenuItemCancelled.Checked;
|
||||
}
|
||||
get => toolStripMenuItemQueued.Visible;
|
||||
set => toolStripMenuItemQueued.Visible = value;
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public bool ImplementsIncomplete
|
||||
{
|
||||
get => toolStripMenuItemIncomplete.Visible;
|
||||
set => toolStripMenuItemIncomplete.Visible = value;
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public bool FilterIsOn =>
|
||||
!toolStripMenuItemComplete.Checked
|
||||
|| !toolStripMenuItemInProgress.Checked
|
||||
|| !toolStripMenuItemError.Checked
|
||||
|| !toolStripMenuItemCancelled.Checked
|
||||
|| !toolStripMenuItemIncomplete.Checked
|
||||
|| !toolStripMenuItemQueued.Checked;
|
||||
|
||||
protected override void OnDropDownItemClicked(ToolStripItemClickedEventArgs e)
|
||||
{
|
||||
base.OnDropDownItemClicked(e);
|
||||
@ -133,6 +163,8 @@ namespace XenAdmin.Controls
|
||||
toolStripMenuItemInProgress.Checked = true;
|
||||
toolStripMenuItemError.Checked = true;
|
||||
toolStripMenuItemCancelled.Checked = true;
|
||||
toolStripMenuItemIncomplete.Checked = true;
|
||||
toolStripMenuItemQueued.Checked = true;
|
||||
internalUpdating = false;
|
||||
|
||||
Item_CheckedChanged(null, null);
|
||||
|
52
XenAdmin/Controls/GPU/GpuConfiguration.Designer.cs
generated
@ -28,35 +28,27 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GpuConfiguration));
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.dataGridViewEx1 = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
|
||||
this.rubricLabel = new XenAdmin.Controls.Common.AutoHeightLabel();
|
||||
this.CheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.VGPUsPerGPUColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.MaxResolutionColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.MaxDisplaysColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.VideoRAMColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.rubricLabel = new XenAdmin.Controls.Common.AutoHeightLabel();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// imageList1
|
||||
//
|
||||
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList1.Images.SetKeyName(0, "000_Abort_h32bit_16.png");
|
||||
this.imageList1.Images.SetKeyName(1, "000_Tick_h32bit_16.png");
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
@ -84,7 +76,6 @@
|
||||
//
|
||||
this.dataGridViewEx1.BackgroundColor = System.Drawing.SystemColors.Window;
|
||||
this.dataGridViewEx1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.dataGridViewEx1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable;
|
||||
this.dataGridViewEx1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
||||
this.dataGridViewEx1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.CheckBoxColumn,
|
||||
@ -94,33 +85,35 @@
|
||||
this.MaxDisplaysColumn,
|
||||
this.VideoRAMColumn});
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.dataGridViewEx1, 3);
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridViewEx1.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
resources.ApplyResources(this.dataGridViewEx1, "dataGridViewEx1");
|
||||
this.dataGridViewEx1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnKeystrokeOrF2;
|
||||
this.dataGridViewEx1.HideSelection = true;
|
||||
this.dataGridViewEx1.Name = "dataGridViewEx1";
|
||||
this.dataGridViewEx1.ReadOnly = true;
|
||||
this.dataGridViewEx1.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.dataGridViewEx1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
||||
this.dataGridViewEx1.SelectionChanged += new System.EventHandler(this.dataGridViewEx1_SelectionChanged);
|
||||
//
|
||||
// rubricLabel
|
||||
//
|
||||
resources.ApplyResources(this.rubricLabel, "rubricLabel");
|
||||
this.rubricLabel.AutoEllipsis = true;
|
||||
this.rubricLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.rubricLabel, 3);
|
||||
this.rubricLabel.MinimumSize = new System.Drawing.Size(0, 16);
|
||||
this.rubricLabel.Name = "rubricLabel";
|
||||
this.dataGridViewEx1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.RowHeaderSelect;
|
||||
this.dataGridViewEx1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellClick);
|
||||
//
|
||||
// CheckBoxColumn
|
||||
//
|
||||
this.CheckBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
|
||||
resources.ApplyResources(this.CheckBoxColumn, "CheckBoxColumn");
|
||||
this.CheckBoxColumn.Name = "CheckBoxColumn";
|
||||
this.CheckBoxColumn.ReadOnly = true;
|
||||
this.CheckBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
//
|
||||
// NameColumn
|
||||
//
|
||||
resources.ApplyResources(this.NameColumn, "NameColumn");
|
||||
this.NameColumn.Name = "NameColumn";
|
||||
this.NameColumn.ReadOnly = true;
|
||||
this.NameColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// VGPUsPerGPUColumn
|
||||
@ -130,6 +123,7 @@
|
||||
this.VGPUsPerGPUColumn.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
resources.ApplyResources(this.VGPUsPerGPUColumn, "VGPUsPerGPUColumn");
|
||||
this.VGPUsPerGPUColumn.Name = "VGPUsPerGPUColumn";
|
||||
this.VGPUsPerGPUColumn.ReadOnly = true;
|
||||
this.VGPUsPerGPUColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.VGPUsPerGPUColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
@ -140,6 +134,7 @@
|
||||
this.MaxResolutionColumn.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
resources.ApplyResources(this.MaxResolutionColumn, "MaxResolutionColumn");
|
||||
this.MaxResolutionColumn.Name = "MaxResolutionColumn";
|
||||
this.MaxResolutionColumn.ReadOnly = true;
|
||||
this.MaxResolutionColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.MaxResolutionColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
@ -150,6 +145,7 @@
|
||||
this.MaxDisplaysColumn.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
resources.ApplyResources(this.MaxDisplaysColumn, "MaxDisplaysColumn");
|
||||
this.MaxDisplaysColumn.Name = "MaxDisplaysColumn";
|
||||
this.MaxDisplaysColumn.ReadOnly = true;
|
||||
this.MaxDisplaysColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.MaxDisplaysColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
@ -160,9 +156,17 @@
|
||||
this.VideoRAMColumn.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
resources.ApplyResources(this.VideoRAMColumn, "VideoRAMColumn");
|
||||
this.VideoRAMColumn.Name = "VideoRAMColumn";
|
||||
this.VideoRAMColumn.ReadOnly = true;
|
||||
this.VideoRAMColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.VideoRAMColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// rubricLabel
|
||||
//
|
||||
resources.ApplyResources(this.rubricLabel, "rubricLabel");
|
||||
this.rubricLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.rubricLabel, 3);
|
||||
this.rubricLabel.Name = "rubricLabel";
|
||||
//
|
||||
// GpuConfiguration
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
@ -173,6 +177,7 @@
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
||||
this.Name = "GpuConfiguration";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@ -181,7 +186,6 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.ImageList imageList1;
|
||||
private XenAdmin.Controls.Common.AutoHeightLabel rubricLabel;
|
||||
private XenAdmin.Controls.DataGridViewEx.DataGridViewEx dataGridViewEx1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
|
@ -37,46 +37,33 @@ using XenAdmin.Controls.DataGridViewEx;
|
||||
using XenAPI;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Actions.GPU;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
||||
namespace XenAdmin.Controls.GPU
|
||||
{
|
||||
public partial class GpuConfiguration : XenDialogBase
|
||||
{
|
||||
private List<PGPU> PGpuList { get; set; }
|
||||
private List<PGPU> PGpuList { get; }
|
||||
|
||||
internal override string HelpName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "GpuConfigurationDialog";
|
||||
}
|
||||
}
|
||||
internal override string HelpName => "GpuConfigurationDialog";
|
||||
|
||||
private GpuConfiguration()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public GpuConfiguration(IEnumerable<PGPU> pGpuList)
|
||||
: this()
|
||||
public GpuConfiguration(List<PGPU> pGpuList)
|
||||
: base(pGpuList[0].Connection)
|
||||
{
|
||||
if (pGpuList == null)
|
||||
throw new ArgumentNullException("pGpuList");
|
||||
if (pGpuList.Count() == 0)
|
||||
throw new ArgumentOutOfRangeException("pGpuList", "pGpuList list should not be empty");
|
||||
if (pGpuList.ElementAt(0) == null)
|
||||
throw new ArgumentOutOfRangeException("pGpuList[0]", "first element of the pGpuList list should not be null");
|
||||
InitializeComponent();
|
||||
|
||||
PGpuList = pGpuList.ToList();
|
||||
connection = PGpuList[0].Connection;
|
||||
PopulateGrid(pGpuList);
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
SetWindowTitle();
|
||||
}
|
||||
|
||||
@ -91,17 +78,16 @@ namespace XenAdmin.Controls.GPU
|
||||
{
|
||||
if (pGpu.supported_VGPU_types != null)
|
||||
{
|
||||
dataGridViewEx1.Rows.AddRange((from supportedVGpuTypeRef in pGpu.supported_VGPU_types
|
||||
let supportedVGpuType = pGpu.Connection.Resolve(supportedVGpuTypeRef)
|
||||
let enabled = pGpu.enabled_VGPU_types.Contains(supportedVGpuTypeRef)
|
||||
let isInUse = pGpuList.Any(p => p.Connection.ResolveAll(p.resident_VGPUs).Any(v => v.type.opaque_ref == supportedVGpuTypeRef.opaque_ref))
|
||||
orderby supportedVGpuType descending
|
||||
|
||||
select new VGpuDetailWithCheckBoxRow(supportedVGpuTypeRef, supportedVGpuType, enabled, isInUse)
|
||||
)
|
||||
.ToArray());
|
||||
var rows = from supportedVGpuTypeRef in pGpu.supported_VGPU_types
|
||||
let supportedVGpuType = pGpu.Connection.Resolve(supportedVGpuTypeRef)
|
||||
let enabled = pGpu.enabled_VGPU_types.Contains(supportedVGpuTypeRef)
|
||||
let isInUse = pGpuList.Any(p => p.Connection.ResolveAll(p.resident_VGPUs).Any(v => v.type.opaque_ref == supportedVGpuTypeRef.opaque_ref))
|
||||
orderby supportedVGpuType descending
|
||||
select new VGpuDetailWithCheckBoxRow(supportedVGpuTypeRef, supportedVGpuType, enabled, isInUse);
|
||||
|
||||
dataGridViewEx1.Rows.AddRange(rows.Cast<DataGridViewRow>().ToArray());
|
||||
}
|
||||
SetCheckedValues();
|
||||
|
||||
HideColumnIfEmpty(MaxResolutionColumn);
|
||||
HideColumnIfEmpty(MaxDisplaysColumn);
|
||||
}
|
||||
@ -112,11 +98,6 @@ namespace XenAdmin.Controls.GPU
|
||||
}
|
||||
}
|
||||
|
||||
private void SetCheckedValues()
|
||||
{
|
||||
dataGridViewEx1.Rows.Cast<VGpuDetailWithCheckBoxRow>().ToList().ForEach(r => r.Enabled = !r.IsReadOnly);
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
var updatedEnabledVGpuListByPGpu = new Dictionary<PGPU, List<XenRef<VGPU_type>>>();
|
||||
@ -139,9 +120,14 @@ namespace XenAdmin.Controls.GPU
|
||||
Close();
|
||||
}
|
||||
|
||||
private void dataGridViewEx1_SelectionChanged(object sender, System.EventArgs e)
|
||||
private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
dataGridViewEx1.ClearSelection();
|
||||
if (e.ColumnIndex != CheckBoxColumn.Index || e.RowIndex < 0 || e.RowIndex >= dataGridViewEx1.RowCount)
|
||||
return;
|
||||
|
||||
if (dataGridViewEx1.Rows[e.RowIndex] is VGpuDetailWithCheckBoxRow row && row.Enabled &&
|
||||
row.Cells[e.ColumnIndex] is DataGridViewCheckBoxCell clickedCell)
|
||||
clickedCell.Value = !(bool)clickedCell.Value;
|
||||
}
|
||||
|
||||
private void SetWindowTitle()
|
||||
@ -152,8 +138,8 @@ namespace XenAdmin.Controls.GPU
|
||||
: String.Format(Messages.GPU_GROUP_NAME_AND_NO_OF_GPUS, name, PGpuList.Count);
|
||||
|
||||
rubricLabel.Text = PGpuList.Count == 1
|
||||
? Messages.GPU_RUBRIC_PLEASE_SELECT_WHICH_GPU_ONE
|
||||
: Messages.GPU_RUBRIC_PLEASE_SELECT_WHICH_GPU_MULTIPLE;
|
||||
? Messages.GPU_RUBRIC_PLEASE_SELECT_WHICH_GPU_ONE
|
||||
: Messages.GPU_RUBRIC_PLEASE_SELECT_WHICH_GPU_MULTIPLE;
|
||||
}
|
||||
|
||||
private void HideColumnIfEmpty(DataGridViewColumn column)
|
||||
@ -161,56 +147,57 @@ namespace XenAdmin.Controls.GPU
|
||||
bool columnEmpty = true;
|
||||
foreach (DataGridViewRow row in dataGridViewEx1.Rows)
|
||||
{
|
||||
var value = row.Cells[column.Name].Value;
|
||||
if (!String.IsNullOrEmpty((string)value))
|
||||
var value = row.Cells[column.Name].Value as string;
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
columnEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (columnEmpty)
|
||||
dataGridViewEx1.Columns[column.Name].Visible = false;
|
||||
column.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
class VGpuDetailWithCheckBoxRow : DataGridViewExRow
|
||||
{
|
||||
private readonly bool allowed;
|
||||
private readonly DataGridViewCheckBoxCell checkBoxCell = new DataGridViewCheckBoxCell(false);
|
||||
private readonly bool isInUse;
|
||||
|
||||
private readonly DataGridViewCheckBoxCell checkBoxCell = new DataGridViewCheckBoxCell()
|
||||
{
|
||||
ThreeState = false,
|
||||
TrueValue = true,
|
||||
FalseValue = false,
|
||||
ValueType = typeof(bool)
|
||||
};
|
||||
private readonly DataGridViewTextBoxCell nameColumn = new DataGridViewTextBoxCell();
|
||||
private readonly DataGridViewTextBoxCell vGpusPerGpuColumn = new DataGridViewTextBoxCell();
|
||||
private readonly DataGridViewTextBoxCell maxResolutionColumn = new DataGridViewTextBoxCell();
|
||||
private readonly DataGridViewTextBoxCell maxDisplaysColumn = new DataGridViewTextBoxCell();
|
||||
private readonly DataGridViewTextBoxCell videoRamColumn = new DataGridViewTextBoxCell();
|
||||
|
||||
public VGPU_type VGpuType { get; private set; }
|
||||
public XenRef<VGPU_type> VGpuTypeRef { get; private set; }
|
||||
public bool IsReadOnly { get; private set; }
|
||||
public VGPU_type VGpuType { get; }
|
||||
public XenRef<VGPU_type> VGpuTypeRef { get; }
|
||||
|
||||
public bool NeedsSave
|
||||
{
|
||||
get { return (allowed != CheckBoxChecked); }
|
||||
}
|
||||
|
||||
public bool CheckBoxChecked
|
||||
{
|
||||
get { return (bool)checkBoxCell.Value; }
|
||||
}
|
||||
public bool NeedsSave => allowed != CheckBoxChecked;
|
||||
public bool CheckBoxChecked => (bool)checkBoxCell.Value;
|
||||
|
||||
public VGpuDetailWithCheckBoxRow(XenRef<VGPU_type> vGpuTypeRef, VGPU_type vGpuType, bool allowed, bool isInUse)
|
||||
{
|
||||
VGpuTypeRef = vGpuTypeRef;
|
||||
VGpuType = vGpuType;
|
||||
this.allowed = allowed;
|
||||
IsReadOnly = isInUse && allowed;
|
||||
this.isInUse = isInUse;
|
||||
|
||||
SetCells();
|
||||
Cells.AddRange(checkBoxCell, nameColumn, vGpusPerGpuColumn, maxResolutionColumn, maxDisplaysColumn, videoRamColumn);
|
||||
SetupCheckBoxCell();
|
||||
SetCells();
|
||||
}
|
||||
|
||||
private void SetCells()
|
||||
{
|
||||
checkBoxCell.Value = allowed;
|
||||
|
||||
bool isPassThru = VGpuType.IsPassthrough();
|
||||
|
||||
nameColumn.Value = isPassThru ? Messages.VGPU_PASSTHRU_TOSTRING : VGpuType.model_name;
|
||||
@ -234,13 +221,12 @@ namespace XenAdmin.Controls.GPU
|
||||
videoRamColumn.Value = VGpuType.framebuffer_size != 0 ? Util.MemorySizeStringSuitableUnits(VGpuType.framebuffer_size, true) : string.Empty;
|
||||
}
|
||||
|
||||
private void SetupCheckBoxCell()
|
||||
protected override void OnDataGridViewChanged()
|
||||
{
|
||||
checkBoxCell.TrueValue = true;
|
||||
checkBoxCell.FalseValue = false;
|
||||
checkBoxCell.ValueType = typeof(bool);
|
||||
checkBoxCell.Value = allowed;
|
||||
checkBoxCell.ReadOnly = IsReadOnly;
|
||||
base.OnDataGridViewChanged();
|
||||
|
||||
if (DataGridView != null && isInUse && allowed)
|
||||
Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,70 +112,20 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data mimetype="application/x-microsoft.net.object.binary.base64" name="imageList1.ImageStream">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAUgBAgFIAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xcAAv8sAAL/DwAB9AEC
|
||||
AUkB/ykAAfMDJAL/AwAB9AFFAUsB/wYAAU8BTgFPAZgpAAEkASUBJgElASQC/wEAAfQBRQElAUUB/wUA
|
||||
AZgBTgFVATMBSQH/KAABRQMmASUBRQH/AfQBJAEmASUBbwH/BAAB8QFJAlUBVAFOAZgoAAH2ASQBJQEm
|
||||
ASUBJAFuAUUCJgEkAf8EAAH/AU8BlwKYAVUBMwFJAf8oAAH/ASQBRgEmAiUCJgEkAv8EAAFyAZcDCAGX
|
||||
AVUBTgFyKAAC/wEkAk0CJgHpAfQB/wQAAQcBTwEIAZgCSQGYAXcBLQFJAfQnAAH/AfQBRQRNASQC/wMA
|
||||
AfQBTwEIAnIC/wFPAZgBVQEtAXIlAAH0A0UBRgFTA00BRgEkAv8CAAFPAZgBcgHvAwAB8QFyAZ0BVQFJ
|
||||
AfQkAAFFAZMBmgN1AU0CRQJGAUUC/wEAAfQBTwHxBQAB8QFxAZcBTgFJJAAB9AFFAZMCmgF1AUUC/wFu
|
||||
AUUBRgEkAQAB/wkAAZgBcgFVAU8BCCQAAfMBRQGTAZQBRQH0AwABGgFFASQBAAH/CgABcgGXAVUBSSUA
|
||||
AfMCRQH/BgAB/w0AAXIBlwFPAQglAAL/FQAB/wFPAZcBcj0AAf8BcgH/IQABQgFNAT4HAAE+AwABKAMA
|
||||
AUADAAEQAwABAQEAAQEFAAGAFwAD/wEAAv8B/AH/BAAB8wH/AfgBfwQAAcAB4QH4AX8EAAHAAUEB8AE/
|
||||
BAABwAEBAeABPwQAAcABAwHAAR8EAAHgAQMBwAEfBAAB4AEHAYABDwQAAeABBwEAAQ8EAAGAAQMBDgEH
|
||||
BAABgAEBAR8BBwQAAYABAgH/AYMEAAHAAeIB/wHDBAAB4QH7Af8B4QQAAfMC/wHhBAAD/wHxBAAL
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<data name="cancelButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
@ -195,7 +145,7 @@
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
@ -225,7 +175,7 @@
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
@ -233,7 +183,7 @@
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="CheckBoxColumn.HeaderText" xml:space="preserve">
|
||||
@ -245,7 +195,7 @@
|
||||
<data name="CheckBoxColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="NameColumn.HeaderText" xml:space="preserve">
|
||||
@ -254,7 +204,7 @@
|
||||
<data name="NameColumn.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>150</value>
|
||||
</data>
|
||||
<metadata name="VGPUsPerGPUColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="VGPUsPerGPUColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="VGPUsPerGPUColumn.HeaderText" xml:space="preserve">
|
||||
@ -266,7 +216,7 @@
|
||||
<data name="VGPUsPerGPUColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>93</value>
|
||||
</data>
|
||||
<metadata name="MaxResolutionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="MaxResolutionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="MaxResolutionColumn.HeaderText" xml:space="preserve">
|
||||
@ -278,7 +228,7 @@
|
||||
<data name="MaxResolutionColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>91</value>
|
||||
</data>
|
||||
<metadata name="MaxDisplaysColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="MaxDisplaysColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="MaxDisplaysColumn.HeaderText" xml:space="preserve">
|
||||
@ -290,7 +240,7 @@
|
||||
<data name="MaxDisplaysColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<metadata name="VideoRAMColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="VideoRAMColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="VideoRAMColumn.HeaderText" xml:space="preserve">
|
||||
@ -329,8 +279,11 @@
|
||||
<data name=">>dataGridViewEx1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
<data name="rubricLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
@ -344,14 +297,17 @@
|
||||
<data name="rubricLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 6, 6, 6</value>
|
||||
</data>
|
||||
<data name="rubricLabel.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 16</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>640, 16</value>
|
||||
</data>
|
||||
<data name="rubricLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rubricLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
<data name="rubricLabel.Text" xml:space="preserve">
|
||||
<value>この GPU で使用できる仮想 GPU の種類を選択します。</value>
|
||||
</data>
|
||||
<data name=">>rubricLabel.Name" xml:space="preserve">
|
||||
<value>rubricLabel</value>
|
||||
@ -387,7 +343,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -398,7 +354,7 @@
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="cancelButton" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="okButton" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="dataGridViewEx1" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rubricLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /></Controls><Columns Styles="Percent,100,AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,Percent,100,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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">
|
||||
@ -416,47 +372,41 @@
|
||||
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>12, 12, 12, 12</value>
|
||||
</data>
|
||||
<data name=">>imageList1.Name" xml:space="preserve">
|
||||
<value>imageList1</value>
|
||||
</data>
|
||||
<data name=">>imageList1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CheckBoxColumn.Name" xml:space="preserve">
|
||||
<value>CheckBoxColumn</value>
|
||||
</data>
|
||||
<data name=">>CheckBoxColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>NameColumn.Name" xml:space="preserve">
|
||||
<value>NameColumn</value>
|
||||
</data>
|
||||
<data name=">>NameColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VGPUsPerGPUColumn.Name" xml:space="preserve">
|
||||
<value>VGPUsPerGPUColumn</value>
|
||||
</data>
|
||||
<data name=">>VGPUsPerGPUColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>MaxResolutionColumn.Name" xml:space="preserve">
|
||||
<value>MaxResolutionColumn</value>
|
||||
</data>
|
||||
<data name=">>MaxResolutionColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>MaxDisplaysColumn.Name" xml:space="preserve">
|
||||
<value>MaxDisplaysColumn</value>
|
||||
</data>
|
||||
<data name=">>MaxDisplaysColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VideoRAMColumn.Name" xml:space="preserve">
|
||||
<value>VideoRAMColumn</value>
|
||||
</data>
|
||||
<data name=">>VideoRAMColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>GpuConfiguration</value>
|
||||
|
@ -112,70 +112,20 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAUgBAgFIAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xcAAv8sAAL/DwAB9AEC
|
||||
AUkB/ykAAfMDJAL/AwAB9AFFAUsB/wYAAU8BTgFPAZgpAAEkASUBJgElASQC/wEAAfQBRQElAUUB/wUA
|
||||
AZgBTgFVATMBSQH/KAABRQMmASUBRQH/AfQBJAEmASUBbwH/BAAB8QFJAlUBVAFOAZgoAAH2ASQBJQEm
|
||||
ASUBJAFuAUUCJgEkAf8EAAH/AU8BlwKYAVUBMwFJAf8oAAH/ASQBRgEmAiUCJgEkAv8EAAFyAZcDCAGX
|
||||
AVUBTgFyKAAC/wEkAk0CJgHpAfQB/wQAAQcBTwEIAZgCSQGYAXcBLQFJAfQnAAH/AfQBRQRNASQC/wMA
|
||||
AfQBTwEIAnIC/wFPAZgBVQEtAXIlAAH0A0UBRgFTA00BRgEkAv8CAAFPAZgBcgHvAwAB8QFyAZ0BVQFJ
|
||||
AfQkAAFFAZMBmgN1AU0CRQJGAUUC/wEAAfQBTwHxBQAB8QFxAZcBTgFJJAAB9AFFAZMCmgF1AUUC/wFu
|
||||
AUUBRgEkAQAB/wkAAZgBcgFVAU8BCCQAAfMBRQGTAZQBRQH0AwABGgFFASQBAAH/CgABcgGXAVUBSSUA
|
||||
AfMCRQH/BgAB/w0AAXIBlwFPAQglAAL/FQAB/wFPAZcBcj0AAf8BcgH/IQABQgFNAT4HAAE+AwABKAMA
|
||||
AUADAAEQAwABAQEAAQEFAAGAFwAD/wEAAv8B/AH/BAAB8wH/AfgBfwQAAcAB4QH4AX8EAAHAAUEB8AE/
|
||||
BAABwAEBAeABPwQAAcABAwHAAR8EAAHgAQMBwAEfBAAB4AEHAYABDwQAAeABBwEAAQ8EAAGAAQMBDgEH
|
||||
BAABgAEBAR8BBwQAAYABAgH/AYMEAAHAAeIB/wHDBAAB4QH7Af8B4QQAAfMC/wHhBAAD/wHxBAAL
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="cancelButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
@ -186,7 +136,7 @@
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
@ -195,7 +145,7 @@
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
@ -216,7 +166,7 @@
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
@ -225,7 +175,7 @@
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
@ -233,7 +183,7 @@
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="CheckBoxColumn.HeaderText" xml:space="preserve">
|
||||
@ -245,7 +195,7 @@
|
||||
<data name="CheckBoxColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="NameColumn.HeaderText" xml:space="preserve">
|
||||
@ -254,7 +204,7 @@
|
||||
<data name="NameColumn.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>150</value>
|
||||
</data>
|
||||
<metadata name="VGPUsPerGPUColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="VGPUsPerGPUColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="VGPUsPerGPUColumn.HeaderText" xml:space="preserve">
|
||||
@ -264,9 +214,9 @@
|
||||
<value>50</value>
|
||||
</data>
|
||||
<data name="VGPUsPerGPUColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>93</value>
|
||||
<value>124</value>
|
||||
</data>
|
||||
<metadata name="MaxResolutionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="MaxResolutionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="MaxResolutionColumn.HeaderText" xml:space="preserve">
|
||||
@ -278,7 +228,7 @@
|
||||
<data name="MaxResolutionColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>91</value>
|
||||
</data>
|
||||
<metadata name="MaxDisplaysColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="MaxDisplaysColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="MaxDisplaysColumn.HeaderText" xml:space="preserve">
|
||||
@ -290,7 +240,7 @@
|
||||
<data name="MaxDisplaysColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<metadata name="VideoRAMColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="VideoRAMColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="VideoRAMColumn.HeaderText" xml:space="preserve">
|
||||
@ -309,13 +259,13 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 31</value>
|
||||
<value>3, 28</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>640, 262</value>
|
||||
<value>640, 265</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>dataGridViewEx1.Name" xml:space="preserve">
|
||||
<value>dataGridViewEx1</value>
|
||||
@ -329,8 +279,11 @@
|
||||
<data name=">>dataGridViewEx1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
<data name="rubricLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
@ -339,19 +292,22 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 6</value>
|
||||
<value>3, 0</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 6, 6, 6</value>
|
||||
<value>3, 0, 3, 10</value>
|
||||
</data>
|
||||
<data name="rubricLabel.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 16</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>640, 16</value>
|
||||
</data>
|
||||
<data name="rubricLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="rubricLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
<data name="rubricLabel.Text" xml:space="preserve">
|
||||
<value>Select which virtual GPU types are allowed on this GPU.</value>
|
||||
</data>
|
||||
<data name=">>rubricLabel.Name" xml:space="preserve">
|
||||
<value>rubricLabel</value>
|
||||
@ -387,7 +343,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -398,7 +354,7 @@
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="cancelButton" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="okButton" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="dataGridViewEx1" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rubricLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /></Controls><Columns Styles="Percent,100,AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,Percent,100,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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">
|
||||
@ -416,47 +372,41 @@
|
||||
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>12, 12, 12, 12</value>
|
||||
</data>
|
||||
<data name=">>imageList1.Name" xml:space="preserve">
|
||||
<value>imageList1</value>
|
||||
</data>
|
||||
<data name=">>imageList1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CheckBoxColumn.Name" xml:space="preserve">
|
||||
<value>CheckBoxColumn</value>
|
||||
</data>
|
||||
<data name=">>CheckBoxColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>NameColumn.Name" xml:space="preserve">
|
||||
<value>NameColumn</value>
|
||||
</data>
|
||||
<data name=">>NameColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VGPUsPerGPUColumn.Name" xml:space="preserve">
|
||||
<value>VGPUsPerGPUColumn</value>
|
||||
</data>
|
||||
<data name=">>VGPUsPerGPUColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>MaxResolutionColumn.Name" xml:space="preserve">
|
||||
<value>MaxResolutionColumn</value>
|
||||
</data>
|
||||
<data name=">>MaxResolutionColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>MaxDisplaysColumn.Name" xml:space="preserve">
|
||||
<value>MaxDisplaysColumn</value>
|
||||
</data>
|
||||
<data name=">>MaxDisplaysColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VideoRAMColumn.Name" xml:space="preserve">
|
||||
<value>VideoRAMColumn</value>
|
||||
</data>
|
||||
<data name=">>VideoRAMColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>GpuConfiguration</value>
|
||||
|
@ -112,70 +112,20 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data mimetype="application/x-microsoft.net.object.binary.base64" name="imageList1.ImageStream">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAUgBAgFIAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xcAAv8sAAL/DwAB9AEC
|
||||
AUkB/ykAAfMDJAL/AwAB9AFFAUsB/wYAAU8BTgFPAZgpAAEkASUBJgElASQC/wEAAfQBRQElAUUB/wUA
|
||||
AZgBTgFVATMBSQH/KAABRQMmASUBRQH/AfQBJAEmASUBbwH/BAAB8QFJAlUBVAFOAZgoAAH2ASQBJQEm
|
||||
ASUBJAFuAUUCJgEkAf8EAAH/AU8BlwKYAVUBMwFJAf8oAAH/ASQBRgEmAiUCJgEkAv8EAAFyAZcDCAGX
|
||||
AVUBTgFyKAAC/wEkAk0CJgHpAfQB/wQAAQcBTwEIAZgCSQGYAXcBLQFJAfQnAAH/AfQBRQRNASQC/wMA
|
||||
AfQBTwEIAnIC/wFPAZgBVQEtAXIlAAH0A0UBRgFTA00BRgEkAv8CAAFPAZgBcgHvAwAB8QFyAZ0BVQFJ
|
||||
AfQkAAFFAZMBmgN1AU0CRQJGAUUC/wEAAfQBTwHxBQAB8QFxAZcBTgFJJAAB9AFFAZMCmgF1AUUC/wFu
|
||||
AUUBRgEkAQAB/wkAAZgBcgFVAU8BCCQAAfMBRQGTAZQBRQH0AwABGgFFASQBAAH/CgABcgGXAVUBSSUA
|
||||
AfMCRQH/BgAB/w0AAXIBlwFPAQglAAL/FQAB/wFPAZcBcj0AAf8BcgH/IQABQgFNAT4HAAE+AwABKAMA
|
||||
AUADAAEQAwABAQEAAQEFAAGAFwAD/wEAAv8B/AH/BAAB8wH/AfgBfwQAAcAB4QH4AX8EAAHAAUEB8AE/
|
||||
BAABwAEBAeABPwQAAcABAwHAAR8EAAHgAQMBwAEfBAAB4AEHAYABDwQAAeABBwEAAQ8EAAGAAQMBDgEH
|
||||
BAABgAEBAR8BBwQAAYABAgH/AYMEAAHAAeIB/wHDBAAB4QH7Af8B4QQAAfMC/wHhBAAD/wHxBAAL
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<data name="cancelButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
@ -195,7 +145,7 @@
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
@ -225,7 +175,7 @@
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
@ -233,7 +183,7 @@
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="CheckBoxColumn.HeaderText" xml:space="preserve">
|
||||
@ -245,7 +195,7 @@
|
||||
<data name="CheckBoxColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="NameColumn.HeaderText" xml:space="preserve">
|
||||
@ -254,7 +204,7 @@
|
||||
<data name="NameColumn.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>150</value>
|
||||
</data>
|
||||
<metadata name="VGPUsPerGPUColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="VGPUsPerGPUColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="VGPUsPerGPUColumn.HeaderText" xml:space="preserve">
|
||||
@ -266,7 +216,7 @@
|
||||
<data name="VGPUsPerGPUColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>93</value>
|
||||
</data>
|
||||
<metadata name="MaxResolutionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="MaxResolutionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="MaxResolutionColumn.HeaderText" xml:space="preserve">
|
||||
@ -278,7 +228,7 @@
|
||||
<data name="MaxResolutionColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>91</value>
|
||||
</data>
|
||||
<metadata name="MaxDisplaysColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="MaxDisplaysColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="MaxDisplaysColumn.HeaderText" xml:space="preserve">
|
||||
@ -290,7 +240,7 @@
|
||||
<data name="MaxDisplaysColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<metadata name="VideoRAMColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="VideoRAMColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="VideoRAMColumn.HeaderText" xml:space="preserve">
|
||||
@ -329,8 +279,11 @@
|
||||
<data name=">>dataGridViewEx1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
<data name="rubricLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
@ -344,14 +297,17 @@
|
||||
<data name="rubricLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 6, 6, 6</value>
|
||||
</data>
|
||||
<data name="rubricLabel.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 16</value>
|
||||
</data>
|
||||
<data name="rubricLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>640, 16</value>
|
||||
</data>
|
||||
<data name="rubricLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rubricLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
<data name="rubricLabel.Text" xml:space="preserve">
|
||||
<value>选择允许在此 GPU 上使用的虚拟 GPU 类型。</value>
|
||||
</data>
|
||||
<data name=">>rubricLabel.Name" xml:space="preserve">
|
||||
<value>rubricLabel</value>
|
||||
@ -387,7 +343,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -398,7 +354,7 @@
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="cancelButton" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="okButton" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="dataGridViewEx1" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rubricLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /></Controls><Columns Styles="Percent,100,AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,Percent,100,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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">
|
||||
@ -416,47 +372,41 @@
|
||||
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>12, 12, 12, 12</value>
|
||||
</data>
|
||||
<data name=">>imageList1.Name" xml:space="preserve">
|
||||
<value>imageList1</value>
|
||||
</data>
|
||||
<data name=">>imageList1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CheckBoxColumn.Name" xml:space="preserve">
|
||||
<value>CheckBoxColumn</value>
|
||||
</data>
|
||||
<data name=">>CheckBoxColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>NameColumn.Name" xml:space="preserve">
|
||||
<value>NameColumn</value>
|
||||
</data>
|
||||
<data name=">>NameColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VGPUsPerGPUColumn.Name" xml:space="preserve">
|
||||
<value>VGPUsPerGPUColumn</value>
|
||||
</data>
|
||||
<data name=">>VGPUsPerGPUColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>MaxResolutionColumn.Name" xml:space="preserve">
|
||||
<value>MaxResolutionColumn</value>
|
||||
</data>
|
||||
<data name=">>MaxResolutionColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>MaxDisplaysColumn.Name" xml:space="preserve">
|
||||
<value>MaxDisplaysColumn</value>
|
||||
</data>
|
||||
<data name=">>MaxDisplaysColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VideoRAMColumn.Name" xml:space="preserve">
|
||||
<value>VideoRAMColumn</value>
|
||||
</data>
|
||||
<data name=">>VideoRAMColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>GpuConfiguration</value>
|
||||
|
2
XenAdmin/Controls/GPU/GpuRow.Designer.cs
generated
@ -83,7 +83,6 @@
|
||||
resources.ApplyResources(this.allowedTypesLabel, "allowedTypesLabel");
|
||||
this.allowedTypesLabel.AutoEllipsis = true;
|
||||
this.allowedTypesLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.allowedTypesLabel.MinimumSize = new System.Drawing.Size(0, 16);
|
||||
this.allowedTypesLabel.Name = "allowedTypesLabel";
|
||||
//
|
||||
// pGpuLabel
|
||||
@ -91,7 +90,6 @@
|
||||
resources.ApplyResources(this.pGpuLabel, "pGpuLabel");
|
||||
this.pGpuLabel.AutoEllipsis = true;
|
||||
this.pGpuLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pGpuLabel.MinimumSize = new System.Drawing.Size(0, 16);
|
||||
this.pGpuLabel.Name = "pGpuLabel";
|
||||
//
|
||||
// pGpuPictureBox
|
||||
|
@ -60,7 +60,7 @@ namespace XenAdmin.Controls.GPU
|
||||
|
||||
private readonly IXenObject xenObject;
|
||||
|
||||
private Dictionary<PGPU, CheckBox> pGpus = new Dictionary<PGPU, CheckBox>();
|
||||
private readonly Dictionary<PGPU, CheckBox> pGpus = new Dictionary<PGPU, CheckBox>();
|
||||
|
||||
private readonly bool vGpuCapability;
|
||||
|
||||
@ -179,19 +179,6 @@ namespace XenAdmin.Controls.GPU
|
||||
}
|
||||
}
|
||||
|
||||
public List<PGPU> SelectedPGPUs
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pGpus.Count == 0)
|
||||
return null;
|
||||
|
||||
return pGpus.Count > 1
|
||||
? (from kvp in pGpus where kvp.Value != null && kvp.Value.Checked select kvp.Key).ToList()
|
||||
: new List<PGPU> {pGpus.Keys.ElementAt(0)};
|
||||
}
|
||||
}
|
||||
|
||||
private void selectAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (var checkBox in pGpus.Values.Where(checkBox => checkBox != null))
|
||||
@ -210,15 +197,23 @@ namespace XenAdmin.Controls.GPU
|
||||
|
||||
private void editButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
new GpuConfiguration(SelectedPGPUs).ShowDialog(Program.MainWindow);
|
||||
if (pGpus.Count == 0)
|
||||
return;
|
||||
|
||||
var selectedPGPUs = pGpus.Count > 1
|
||||
? (from kvp in pGpus where kvp.Value != null && kvp.Value.Checked select kvp.Key).ToList()
|
||||
: new List<PGPU> {pGpus.Keys.ElementAt(0)};
|
||||
|
||||
using (var dlog = new GpuConfiguration(selectedPGPUs))
|
||||
dlog.ShowDialog(Program.MainWindow);
|
||||
}
|
||||
|
||||
private void CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
editButton.Enabled = clearAllButton.Enabled =
|
||||
(pGpus.Values.Where(checkBox => checkBox != null).Any(checkBox => checkBox.Checked));
|
||||
pGpus.Values.Any(checkBox => checkBox != null && checkBox.Checked);
|
||||
selectAllButton.Enabled =
|
||||
(pGpus.Values.Where(checkBox => checkBox != null).Any(checkBox => !checkBox.Checked));
|
||||
pGpus.Values.Any(checkBox => checkBox != null && !checkBox.Checked);
|
||||
}
|
||||
|
||||
#region Allowed vGpu types
|
||||
|
@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAASABAwEgAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAASgBAwEoAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@ -383,6 +383,9 @@
|
||||
<data name="editButton.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="editButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="editButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
@ -392,6 +395,9 @@
|
||||
<data name="editButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 6, 6, 6</value>
|
||||
</data>
|
||||
<data name="editButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 23</value>
|
||||
</data>
|
||||
<data name="editButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>130, 23</value>
|
||||
</data>
|
||||
|
@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAASABAwEgAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAASgBAwEoAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@ -383,6 +383,9 @@
|
||||
<data name="editButton.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="editButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="editButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
@ -392,8 +395,11 @@
|
||||
<data name="editButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 6, 6, 6</value>
|
||||
</data>
|
||||
<data name="editButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 23</value>
|
||||
</data>
|
||||
<data name="editButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>130, 23</value>
|
||||
<value>65, 23</value>
|
||||
</data>
|
||||
<data name="editButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
|
@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAASABAwEgAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAASgBAwEoAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@ -383,6 +383,9 @@
|
||||
<data name="editButton.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="editButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="editButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
@ -392,6 +395,9 @@
|
||||
<data name="editButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 6, 6, 6</value>
|
||||
</data>
|
||||
<data name="editButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 23</value>
|
||||
</data>
|
||||
<data name="editButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>130, 23</value>
|
||||
</data>
|
||||
|
@ -169,13 +169,13 @@ namespace XenAdmin.Controls.MainWindowControls
|
||||
}
|
||||
}
|
||||
|
||||
private void Connection_BeforeMajorChange(object sender, ConnectionMajorChangeEventArgs e)
|
||||
private void Connection_BeforeMajorChange(IXenConnection conn, bool background)
|
||||
{
|
||||
try
|
||||
{
|
||||
Program.Invoke(this, () =>
|
||||
{
|
||||
if (!e.Background)
|
||||
if (!background)
|
||||
{
|
||||
if (inMajorChange)
|
||||
return;
|
||||
@ -187,11 +187,10 @@ namespace XenAdmin.Controls.MainWindowControls
|
||||
catch (Exception exn)
|
||||
{
|
||||
log.Error(exn, exn);
|
||||
// Can do nothing more about this.
|
||||
}
|
||||
}
|
||||
|
||||
private void Connection_AfterMajorChange(object sender, ConnectionMajorChangeEventArgs e)
|
||||
private void Connection_AfterMajorChange(IXenConnection conn, bool background)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -199,14 +198,13 @@ namespace XenAdmin.Controls.MainWindowControls
|
||||
{
|
||||
ResumeRefreshTreeView();
|
||||
|
||||
if (!e.Background)
|
||||
if (!background)
|
||||
inMajorChange = false;
|
||||
});
|
||||
}
|
||||
catch (Exception exn)
|
||||
{
|
||||
log.Error(exn, exn);
|
||||
// Can do nothing more about this.
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,7 +252,6 @@ namespace XenAdmin.Controls.MainWindowControls
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Debug("Exception thrown by target of MajorChange.", e);
|
||||
log.Debug(e, e);
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
|
@ -39,6 +39,7 @@ using System.Windows.Forms;
|
||||
using XenAPI;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Network;
|
||||
|
||||
|
||||
namespace XenAdmin.Controls
|
||||
@ -145,7 +146,7 @@ namespace XenAdmin.Controls
|
||||
if (vbds == null)
|
||||
{
|
||||
// let's come back when the cache is populated
|
||||
VM.Connection.CachePopulated += new EventHandler<EventArgs>(CachePopulatedMethod);
|
||||
VM.Connection.CachePopulated += CachePopulatedMethod;
|
||||
return;
|
||||
}
|
||||
vbds.RemoveAll(vbd => !vbd.IsCDROM() && !vbd.IsFloppyDrive());
|
||||
@ -228,7 +229,7 @@ namespace XenAdmin.Controls
|
||||
refreshDrives();
|
||||
}
|
||||
|
||||
private void CachePopulatedMethod(object sender, EventArgs args)
|
||||
private void CachePopulatedMethod(IXenConnection conn)
|
||||
{
|
||||
VM.Connection.CachePopulated -= CachePopulatedMethod;
|
||||
refreshDrives();
|
||||
@ -258,12 +259,29 @@ namespace XenAdmin.Controls
|
||||
{
|
||||
if (VM != null)
|
||||
{
|
||||
CreateCdDriveAction createDriveAction = new CreateCdDriveAction(VM, false,NewDiskDialog.ShowMustRebootBoxCD,NewDiskDialog.ShowVBDWarningBox);
|
||||
var createDriveAction = new CreateCdDriveAction(VM);
|
||||
createDriveAction.ShowUserInstruction += CreateDriveAction_ShowUserInstruction;
|
||||
|
||||
using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
|
||||
dlg.ShowDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateDriveAction_ShowUserInstruction(string message)
|
||||
{
|
||||
Program.Invoke(Program.MainWindow, () =>
|
||||
{
|
||||
if (!Program.RunInAutomatedTestMode)
|
||||
{
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(SystemIcons.Information, message)))
|
||||
{
|
||||
dlg.ShowDialog(Program.MainWindow);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
if (cdChanger1.Drive != null)
|
||||
|
@ -253,7 +253,7 @@
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cdChanger1.ItemHeight" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="cdChanger1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 5</value>
|
||||
|
@ -253,7 +253,7 @@
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cdChanger1.ItemHeight" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="cdChanger1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 5</value>
|
||||
|
@ -45,8 +45,6 @@ namespace XenAdmin.Controls
|
||||
{
|
||||
public partial class PDSection : UserControl
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region Private fields
|
||||
|
||||
/// <summary>
|
||||
|
@ -112,20 +112,20 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="label1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
@ -148,7 +148,7 @@
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -172,7 +172,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -202,7 +202,7 @@
|
||||
<value>chevron</value>
|
||||
</data>
|
||||
<data name=">>chevron.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>chevron.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -229,7 +229,7 @@
|
||||
<value>panel1</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -237,7 +237,7 @@
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="copyToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
@ -253,25 +253,28 @@
|
||||
<value>contextMenuStrip1</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
<metadata name="KeyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="KeyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="KeyColumn.HeaderText" xml:space="preserve">
|
||||
<value>Column1</value>
|
||||
<value>キー</value>
|
||||
</data>
|
||||
<data name="KeyColumn.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>150</value>
|
||||
</data>
|
||||
<data name="KeyColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
<value>150</value>
|
||||
</data>
|
||||
<metadata name="ValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="ValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="ValueColumn.HeaderText" xml:space="preserve">
|
||||
<value>Column1</value>
|
||||
<value>値</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>1, 34</value>
|
||||
@ -297,9 +300,12 @@
|
||||
<data name=">>dataGridViewEx1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.MaximumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>900, 9999999</value>
|
||||
</data>
|
||||
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>1, 1, 1, 1</value>
|
||||
</data>
|
||||
@ -310,24 +316,24 @@
|
||||
<value>copyToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>copyToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>KeyColumn.Name" xml:space="preserve">
|
||||
<value>KeyColumn</value>
|
||||
</data>
|
||||
<data name=">>KeyColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>ValueColumn.Name" xml:space="preserve">
|
||||
<value>ValueColumn</value>
|
||||
</data>
|
||||
<data name=">>ValueColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>PDSection</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
@ -112,20 +112,20 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<data name="label1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
@ -148,7 +148,7 @@
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -172,7 +172,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -202,7 +202,7 @@
|
||||
<value>chevron</value>
|
||||
</data>
|
||||
<data name=">>chevron.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>chevron.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -229,7 +229,7 @@
|
||||
<value>panel1</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -237,7 +237,7 @@
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="copyToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
@ -253,25 +253,28 @@
|
||||
<value>contextMenuStrip1</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
<metadata name="KeyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="KeyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="KeyColumn.HeaderText" xml:space="preserve">
|
||||
<value>Column1</value>
|
||||
<value>键</value>
|
||||
</data>
|
||||
<data name="KeyColumn.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>150</value>
|
||||
</data>
|
||||
<data name="KeyColumn.Width" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
<value>150</value>
|
||||
</data>
|
||||
<metadata name="ValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="ValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="ValueColumn.HeaderText" xml:space="preserve">
|
||||
<value>Column1</value>
|
||||
<value>值</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>1, 34</value>
|
||||
@ -297,9 +300,12 @@
|
||||
<data name=">>dataGridViewEx1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.MaximumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>900, 9999999</value>
|
||||
</data>
|
||||
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>1, 1, 1, 1</value>
|
||||
</data>
|
||||
@ -310,24 +316,24 @@
|
||||
<value>copyToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>copyToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>KeyColumn.Name" xml:space="preserve">
|
||||
<value>KeyColumn</value>
|
||||
</data>
|
||||
<data name=">>KeyColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>ValueColumn.Name" xml:space="preserve">
|
||||
<value>ValueColumn</value>
|
||||
</data>
|
||||
<data name=">>ValueColumn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>PDSection</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|