Merge pull request #1358 from Frezzle/CAR-2214

Merge master into CAR-2214
This commit is contained in:
Frezzle 2016-12-23 14:37:06 +00:00 committed by GitHub
commit 1b19b55b89
662 changed files with 46982 additions and 20577 deletions

1
.gitattributes vendored
View File

@ -1,2 +1,3 @@
# Auto detect text files and perform LF normalization
* -crlf
*.sh text eol=lf

View File

@ -19,6 +19,7 @@ BRANDING_PRODUCT_MAJOR_VERSION=$(cat ${SCRATCH_DIR}/globals | grep -w PRODUCT_MA
BRANDING_PRODUCT_MINOR_VERION=$(cat ${SCRATCH_DIR}/globals | grep -w PRODUCT_MINOR_VERSION | sed -e 's/PRODUCT_MINOR_VERSION=//g' -e 's/"//g')
BRANDING_SEARCH=xensearch
BRANDING_UPDATE=xsupdate
BRANDING_BACKUP=xbk
BRANDING_SERVER=XenServer
BRANDING_BRAND_CONSOLE=$(cat ${SCRATCH_DIR}/globals | grep -w BRAND_CONSOLE | sed -e 's/BRAND_CONSOLE=//g' -e 's/"//g')
# Check for the micro version override from declarations.sh and use it if present otherwise use the one from branding
@ -31,6 +32,7 @@ fi
BRANDING_XC_PRODUCT_VERSION=${BRANDING_PRODUCT_MAJOR_VERSION}.${BRANDING_PRODUCT_MINOR_VERION}.${BRANDING_PRODUCT_MICRO_VERSION}
BRANDING_XC_PRODUCT_5_6_VERSION=5.6
BRANDING_XC_PRODUCT_6_0_VERSION=6.0
BRANDING_XC_PRODUCT_6_2_VERSION=6.2
BRANDING_XC_PRODUCT_6_5_VERSION=6.5
BRANDING_XC_PRODUCT_7_0_VERSION=7.0

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CFUValidator</RootNamespace>
<AssemblyName>CFUValidator</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>

View File

@ -1,3 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -15,7 +15,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

View File

@ -102,10 +102,10 @@
</Extension>
</ProgId>
- <!-- Define XBK extension -->
- <ProgId Id="XenCenter.xbk" Description="[XenServer] Backup File" Icon="XkbIcon">
- <ProgId Id="XenCenter.[xbk]" Description="[XenServer] Backup File" Icon="XkbIcon">
+ <!-- Define XBK extension -->
+ <ProgId Id="XenCenter.xbk" Description="!(loc.XenServer_Backup_File)" Icon="XkbIcon">
<Extension Id="xbk" ContentType="application/xbk">
+ <ProgId Id="XenCenter.[xbk]" Description="!(loc.XenServer_Backup_File)" Icon="XkbIcon">
<Extension Id="[xbk]" ContentType="application/[xbk]">
- <Verb Id="open" Command="Open" TargetFile="XenCenterEXE" Argument="restore &quot;%1&quot;" />
+ <Verb Id="open" Command="!(loc.Open)" TargetFile="XenCenterEXE" Argument="restore &quot;%1&quot;" />
</Extension>
@ -209,9 +209,9 @@
@@ -310,7 +336,7 @@
<Property Id="ARPPRODUCTICON" Value="XenCenterICO" />
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallInitialize"/>
<PropertyRef Id="NETFRAMEWORK45" />
- <Condition Message=".NET Framework 4.5 is required for this installation."><![CDATA[Installed OR NETFRAMEWORK45]]></Condition>
+ <Condition Message="!(loc.Required_For_Installation)"><![CDATA[Installed OR NETFRAMEWORK45]]></Condition>
<PropertyRef Id="WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED" />
- <Condition Message=".NET Framework 4.6 is required for this installation."><![CDATA[Installed OR WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED]]></Condition>
+ <Condition Message="!(loc.Required_For_Installation)"><![CDATA[Installed OR WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED]]></Condition>
<Property Id="PERMACHINEINSTALL">
<RegistrySearch Id="InstallRegistry" Type="raw" Root="HKLM" Key="Software\[Citrix]\[XenCenter]" Name="InstallDir" />
</Property>

View File

@ -127,8 +127,8 @@
</Extension>
</ProgId>
<!-- Define XBK extension -->
<ProgId Id="XenCenter.xbk" Description="[XenServer] Backup File" Icon="XkbIcon">
<Extension Id="xbk" ContentType="application/xbk">
<ProgId Id="XenCenter.[xbk]" Description="[XenServer] Backup File" Icon="XkbIcon">
<Extension Id="[xbk]" ContentType="application/[xbk]">
<Verb Id="open" Command="Open" TargetFile="XenCenterEXE" Argument="restore &quot;%1&quot;" />
</Extension>
</ProgId>
@ -159,6 +159,7 @@
<File Id="hotfixSanibelToClearwaterSource" Source="..\Branding\Hotfixes\RPU001-src-pkgs.tar.gz" />
<?endif?>
<File Id="hotfixCreedence" Source="..\Branding\Hotfixes\RPU002.[xsupdate]" />
<File Id="hotfixDundee" Source="..\Branding\Hotfixes\RPU003.[xsupdate]" />
</Component>
<?if "$(env.Branding)"="XenCenter"?>
<!-- TestResources -->
@ -247,7 +248,7 @@
<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="ProgramFilesShortcut" Guid="63b44222-b5e8-4ab1-8f68-baed79abbf36">
<Condition>INSTALLSHORTCUT</Condition>
<Shortcut Id="ApplicationDesktopShortcut" Name="[XenCenter]" Description="[XenCenter] Shortcut" Target="[INSTALLDIR][XenCenter].exe" WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="ApplicationDesktopShortcut" Name="[XenCenter]" Target="[INSTALLDIR][XenCenter].exe" WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Citrix]\[XenCenter]" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
@ -268,7 +269,7 @@
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="[BRANDING_APPLICAION_SHOTCUT_GUID]">
<Shortcut Id="startmenuXenCenter" ShortName="XenCen50" Name="[Citrix] [XenCenter]" Description="[XenCenter] Shortcut" Target="[INSTALLDIR][XenCenter].exe" WorkingDirectory="INSTALLDIR" Icon="XenCenterICO" />
<Shortcut Id="startmenuXenCenter" ShortName="XenCen50" Name="[Citrix] [XenCenter]" Target="[INSTALLDIR][XenCenter].exe" WorkingDirectory="INSTALLDIR" Icon="XenCenterICO" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\[Citrix]\[XenCenter]" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
@ -309,8 +310,8 @@
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="ARPPRODUCTICON" Value="XenCenterICO" />
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallInitialize"/>
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message=".NET Framework 4.5 is required for this installation."><![CDATA[Installed OR NETFRAMEWORK45]]></Condition>
<PropertyRef Id="WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED" />
<Condition Message=".NET Framework 4.6 is required for this installation."><![CDATA[Installed OR WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED]]></Condition>
<Property Id="PERMACHINEINSTALL">
<RegistrySearch Id="InstallRegistry" Type="raw" Root="HKLM" Key="Software\[Citrix]\[XenCenter]" Name="InstallDir" />
</Property>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="ja-JP" Codepage="932" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Open">開く</String>
<String Id="XVA_File">XVA ファイル</String>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="zh-CN" Codepage="950" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Open">打开</String>
<String Id="XVA_File">XVA 文件</String>

View File

@ -659,7 +659,8 @@ namespace XenAdmin.Actions
if (Cancelling)
throw new CancelledException();
if (network.IsGuestInstallerNetwork)
// CA-218956 - Expose HIMN when showing hidden objects
if (network.IsGuestInstallerNetwork && !XenAdmin.Properties.Settings.Default.ShowHiddenVMs)
{
PercentComplete = Convert.ToInt32((++itemIndex) * baseIndex / itemCount);
continue;

View File

@ -228,14 +228,15 @@ namespace XenAdmin.Actions
{
Program.Invoke(Program.MainWindow, delegate
{
ThreeButtonDialog d = new ThreeButtonDialog(
using (var d = new ThreeButtonDialog(
new ThreeButtonDialog.Details(System.Drawing.SystemIcons.Warning, string.Format(Messages.FORCE_CLOSE_PLUGIN_PROMPT, _menuItemFeature.ToString())),
"ProcessForceClosePrompt",
new ThreeButtonDialog.TBDButton(Messages.FORCE_CLOSE, DialogResult.Yes),
new ThreeButtonDialog.TBDButton(Messages.ALLOW_TO_CONTINUE, DialogResult.No));
if (d.ShowDialog(Program.MainWindow) == DialogResult.Yes && !_extAppProcess.HasExited)
_extAppProcess.Kill();
new ThreeButtonDialog.TBDButton(Messages.ALLOW_TO_CONTINUE, DialogResult.No)))
{
if (d.ShowDialog(Program.MainWindow) == DialogResult.Yes && !_extAppProcess.HasExited)
_extAppProcess.Kill();
}
});
}

View File

@ -0,0 +1,92 @@
/* 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.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)
{
}
protected override void Run()
{
if (!AllowedToRestoreDismissedUpdates())
return;
XenAPI.Pool pool = Helpers.GetPoolOfOne(Connection);
if (pool == null)
return;
Dictionary<string, string> other_config = pool.other_config;
if (other_config.ContainsKey(IgnorePatchAction.IgnorePatchKey))
other_config.Remove(IgnorePatchAction.IgnorePatchKey);
if (other_config.ContainsKey(IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY))
other_config.Remove(IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY);
XenAPI.Pool.set_other_config(Connection.Session, pool.opaque_ref, other_config);
}
/// <summary>
/// Checks the user has sufficient RBAC privileges to restore dismissed alerts on a given connection
/// </summary>
private bool AllowedToRestoreDismissedUpdates()
{
if (Connection == null || Connection.Session == null)
return false;
if (Connection.Session.IsLocalSuperuser)
return true;
List<Role> rolesAbleToCompleteAction = Role.ValidRoleList("Pool.set_other_config", Connection);
foreach (Role possibleRole in rolesAbleToCompleteAction)
{
if (Connection.Session.Roles.Contains(possibleRole))
return true;
}
return false;
}
}
}

View File

@ -102,56 +102,46 @@ namespace XenAdmin.Actions.Wlb
foreach (KeyValuePair<VM, WlbOptimizationRecommendation> vmItem in vmOptList)
{
VM vm = vmItem.Key;
Host fromHost = null;
Host toHost = null;
if (vmItem.Key.is_control_domain)
{
log.Debug(vmItem.Value.powerOperation + " " + Helpers.GetName(vmItem.Value.toHost));
fromHost = vmItem.Value.fromHost;
Host fromHost = vmItem.Value.fromHost;
Helpers.SetOtherConfig(fromHost.Connection.Session, fromHost,WlbOptimizationRecommendation.OPTIMIZINGPOOL, vmItem.Value.recId.ToString());
try
AsyncAction hostAction = null;
int waitingInterval = 10 * 1000; // default to 10s
if (vmItem.Value.fromHost.IsLive)
{
AsyncAction hostAction = null;
int waitingInterval = 10 * 1000; // default to 10s
if (vmItem.Value.fromHost.IsLive)
hostAction = new ShutdownHostAction(fromHost, AddHostToPoolCommand.NtolDialog);
}
else
{
hostAction = new HostPowerOnAction(fromHost);
waitingInterval = 30 * 1000; // wait for 30s
}
hostAction.Completed += HostAction_Completed;
hostAction.RunAsync();
while (!moveToNext)
{
if (!String.IsNullOrEmpty(hostActionError))
{
hostAction = new ShutdownHostAction(fromHost,AddHostToPoolCommand.NtolDialog);
throw new Exception(hostActionError);
}
else
{
hostAction = new HostPowerOnAction(fromHost);
waitingInterval = 30 * 1000; // wait for 30s
//wait
System.Threading.Thread.Sleep(waitingInterval);
}
hostAction.Completed += HostAction_Completed;
hostAction.RunAsync();
while (!moveToNext)
{
if (!String.IsNullOrEmpty(hostActionError))
{
throw new Exception(hostActionError);
}
else
{
//wait
System.Threading.Thread.Sleep(waitingInterval);
}
}
}
catch (Exception)
{
throw;
}
}
else
{
log.Debug("Migrating VM " + vm.Name);
fromHost = this.Pool.Connection.Resolve(vm.resident_on);
toHost = vmItem.Value.toHost;
Host toHost = vmItem.Value.toHost;
try
{
@ -162,7 +152,7 @@ namespace XenAdmin.Actions.Wlb
catch (Failure f)
{
// prompt to user if ha notl can be raised, if yes, continue
long newNtol = 0;
long newNtol;
if (RaiseHANotl(vm, f, out newNtol))
{
DelegatedAsyncAction action = new DelegatedAsyncAction(vm.Connection, Messages.HA_LOWERING_NTOL, null, null,
@ -180,7 +170,7 @@ namespace XenAdmin.Actions.Wlb
{
Helpers.SetOtherConfig(this.Session, this.Pool, WlbOptimizationRecommendation.OPTIMIZINGPOOL, Messages.WLB_OPT_FAILED);
this.Description = Messages.WLB_OPT_FAILED;
throw f;
throw;
}
}
}
@ -197,7 +187,7 @@ namespace XenAdmin.Actions.Wlb
catch (Failure ex)
{
Helpers.SetOtherConfig(this.Session, this.Pool, WlbOptimizationRecommendation.OPTIMIZINGPOOL, optId);
WlbServerState.SetState(Pool, WlbServerState.ServerState.ConnectionError, (Failure)ex);
WlbServerState.SetState(Pool, WlbServerState.ServerState.ConnectionError, ex);
throw;
}
catch (CancelledException)
@ -254,11 +244,14 @@ namespace XenAdmin.Actions.Wlb
// Tell the user the VM will be started without HA protection.
Program.Invoke(Program.MainWindow, delegate()
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Warning,
String.Format(Messages.HA_INVALID_CONFIG_RESUME, Helpers.GetName(vm).Ellipsise(500)),
Messages.HIGH_AVAILABILITY)).ShowDialog(Program.MainWindow);
SystemIcons.Warning,
String.Format(Messages.HA_INVALID_CONFIG_RESUME, Helpers.GetName(vm).Ellipsise(500)),
Messages.HIGH_AVAILABILITY)))
{
dlg.ShowDialog(Program.MainWindow);
}
});
// Set the VM to 'Do not restart'.
@ -334,11 +327,14 @@ namespace XenAdmin.Actions.Wlb
Helpers.GetName(vm).Ellipsise(100));
Program.Invoke(Program.MainWindow, delegate()
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Warning,
msg,
Messages.HIGH_AVAILABILITY)).ShowDialog(Program.MainWindow);
Messages.HIGH_AVAILABILITY)))
{
dlg.ShowDialog(Program.MainWindow);
}
});
}
else
@ -350,17 +346,19 @@ namespace XenAdmin.Actions.Wlb
Program.Invoke(Program.MainWindow, delegate()
{
DialogResult r = new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Warning,
msg,
Messages.HIGH_AVAILABILITY),
ThreeButtonDialog.ButtonYes,
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)).ShowDialog(Program.MainWindow);
if (r != DialogResult.Yes)
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)))
{
error = true;
DialogResult r = dlg.ShowDialog(Program.MainWindow);
if (r != DialogResult.Yes)
{
error = true;
}
}
});
}

View File

@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
using System.Threading;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
@ -45,6 +46,9 @@ namespace XenAdmin.Actions.OVFActions
protected string m_tvmGateway;
protected XenOvfTransportBase m_transportAction;
private const int SLEEP_TIME = 900;
private const int MAX_ITERATIONS = 60 * 60 * 24 / SLEEP_TIME * 1000; //iterations in 24h
/// <summary>
/// RBAC dependencies needed to import appliance/export an appliance/import disk image.
/// </summary>
@ -79,6 +83,12 @@ namespace XenAdmin.Actions.OVFActions
Host = Helpers.GetMaster(connection);
}
protected override void Run()
{
SafeToExit = false;
InitialiseTicker();
}
protected void UpdateHandler(XenOvfTranportEventArgs e)
{
if (!string.IsNullOrEmpty(e.Message))
@ -97,5 +107,22 @@ namespace XenAdmin.Actions.OVFActions
if (m_transportAction != null)
m_transportAction.Cancel = true;
}
private void InitialiseTicker()
{
System.Threading.Tasks.Task.Run(() => TickUntilCompletion());
}
private void TickUntilCompletion()
{
int i = 0;
while (!IsCompleted && ++i<MAX_ITERATIONS)
{
OnChanged();
Thread.Sleep(SLEEP_TIME);
}
}
}
}

View File

@ -34,6 +34,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
@ -66,7 +67,9 @@ namespace XenAdmin.Actions.OVFActions
IEnumerable<string> eulas, bool signAppliance, bool createManifest, X509Certificate2 certificate,
bool encryptFiles, string encryptPassword, bool createOVA, bool compressOVFfiles,
string networkUuid, bool isTvmIpStatic, string tvmIpAddress, string tvmSubnetMask, string tvmGateway, bool shouldVerify)
: base(connection, Messages.EXPORT_APPLIANCE, networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
: base(connection,
string.Format(createOVA ? Messages.EXPORT_OVA_PACKAGE : Messages.EXPORT_OVF_PACKAGE, applianceFileName, Helpers.GetName(connection)),
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
{
m_applianceDirectory = applianceDirectory;
m_applianceFileName = applianceFileName;
@ -87,8 +90,10 @@ namespace XenAdmin.Actions.OVFActions
protected override void Run()
{
SafeToExit = false;
base.Run();
var session = Connection.Session;
var url = session.Url;
Uri uri = new Uri(url);

View File

@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using XenAdmin.Core;
using XenAdmin.Mappings;
using XenAdmin.Network;
@ -60,7 +61,8 @@ namespace XenAdmin.Actions.OVFActions
public ImportApplianceAction(IXenConnection connection, EnvelopeType ovfEnv, 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, Messages.IMPORT_APPLIANCE, networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
: base(connection, string.Format(Messages.IMPORT_APPLIANCE, GetApplianceName(ovfEnv, package), Helpers.GetName(connection)),
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
{
m_ovfEnvelope = ovfEnv;
m_package = package;
@ -74,7 +76,8 @@ namespace XenAdmin.Actions.OVFActions
protected override void Run()
{
SafeToExit = false;
base.Run();
if (m_verifySignature)
{
Description = Messages.VERIFYING_SIGNATURE;
@ -151,10 +154,7 @@ namespace XenAdmin.Actions.OVFActions
envelopes.Add(envs[0]);
}
var appName = m_ovfEnvelope.Name;
if (string.IsNullOrEmpty(appName))
appName = Path.GetFileNameWithoutExtension(m_package.PackageSourceFile);
var appName = GetApplianceName(m_ovfEnvelope, m_package);
EnvelopeType env = OVF.Merge(envelopes, appName);
try //importVM
@ -176,5 +176,13 @@ namespace XenAdmin.Actions.OVFActions
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;
}
}
}

View File

@ -33,6 +33,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using XenAdmin.Core;
using XenAdmin.Mappings;
using XenAdmin.Network;
@ -57,7 +58,8 @@ namespace XenAdmin.Actions.OVFActions
public ImportImageAction(IXenConnection connection, EnvelopeType ovfEnv, string directory, Dictionary<string, VmMapping> vmMappings, bool runfixups, SR selectedIsoSr,
string networkUuid, bool isTvmIpStatic, string tvmIpAddress, string tvmSubnetMask, string tvmGateway)
: base(connection, Messages.IMPORT_DISK_IMAGE, networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
: base(connection, string.Format(Messages.IMPORT_DISK_IMAGE, ovfEnv.Name, Helpers.GetName(connection)),
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
{
m_ovfEnvelope = ovfEnv;
m_directory = directory;
@ -68,7 +70,8 @@ namespace XenAdmin.Actions.OVFActions
protected override void Run()
{
SafeToExit = false;
base.Run();
Debug.Assert(m_vmMappings.Count == 1, "There is one VM mapping");
string systemid = m_vmMappings.Keys.ElementAt(0);

View File

@ -267,7 +267,8 @@ namespace XenAdmin.Alerts
}
else if (XenObject is VM)
{
xenObject = XenObject;
VM vm = (VM)XenObject;
xenObject = vm.IsControlDomainZero ? XenObject.Connection.Resolve(vm.resident_on) : XenObject;
}
if (xenObject == null)

View File

@ -132,33 +132,10 @@ namespace XenAdmin.Alerts
if (timeTillExpire.Ticks < 0)
return "";
if (capAtTenYears && timeTillExpire.TotalDays > 3653)
if (capAtTenYears && LicenseStatus.IsInfinite(timeTillExpire))
return Messages.UNLIMITED;
if (timeTillExpire.TotalDays > 60)
{
// Show remaining time in months
return string.Format(Messages.TIME_MONTHS,
(long)(Math.Floor(timeTillExpire.TotalDays / 30)));
}
if (timeTillExpire.TotalDays > 2)
{
// Show remaining time in days
return string.Format(Messages.TIME_DAYS,
(long)timeTillExpire.TotalDays);
}
if (timeTillExpire.TotalHours > 2)
{
// Show remaining time in hours
return string.Format(Messages.TIME_HOURS,
(long)timeTillExpire.TotalHours);
}
// Show remaining time in minutes (round up so you never get 'in 0 minutes')
return string.Format(Messages.TIME_MINUTES,
(long)Math.Ceiling(timeTillExpire.TotalMinutes));
return timeTillExpire.FuzzyTime();
}
#endregion

View File

@ -221,6 +221,14 @@ namespace XenAdmin.Alerts
}
break;
case XenAPI.Message.MessageType.PVS_PROXY_NO_CACHE_SR_AVAILABLE:
var proxy = XenObject as PVS_proxy;
if (proxy != null)
{
return string.Format(FriendlyFormat(), proxy.VM, proxy.Connection.Resolve(proxy.site));
}
break;
//these here do not need the object
case Message.MessageType.VMPP_ARCHIVE_FAILED_0:
case Message.MessageType.VMPP_ARCHIVE_LOCK_FAILED:

View File

@ -47,6 +47,8 @@ namespace XenAdmin
public const string COMPANY_NAME_SHORT = "[Citrix]";
public const string SEARCH = "[xensearch]";
public const string UPDATE = "[xsupdate]";
public const string UPDATEISO = "[iso]";
public const string BACKUP = "[xbk]";
public const string CHECK_FOR_UPDATES_URL = "[BRANDING_XENSERVER_UPDATE_URL]";
public static string Search
@ -67,6 +69,15 @@ namespace XenAdmin
}
}
public static string UpdateIso
{
get
{
var s = UPDATEISO;
return s != "[" + "iso]" ? s : InvisibleMessages.ISO_UPDATE;
}
}
public static string CheckForUpdatesUrl
{
get

View File

@ -75,6 +75,17 @@ namespace XenAdmin.Commands
return selection.AllItemsAre<VBD>() && selection.AtLeastOneXenObjectCan<VBD>(CanExecute);
}
// We only need to check for IO Drivers for hosts before Ely
private bool AreIODriversNeededAndMissing(VM vm)
{
if (Helpers.ElyOrGreater(vm.Connection))
{
return false;
}
return !vm.GetVirtualisationStatus.HasFlag(VM.VirtualisationStatus.IO_DRIVERS_INSTALLED);
}
private bool CanExecute(VBD vbd)
{
VM vm = vbd.Connection.Resolve<VM>(vbd.VM);
@ -85,7 +96,7 @@ namespace XenAdmin.Commands
return false;
if (vdi.type == vdi_type.system)
return false;
if (!vm.GetVirtualisationStatus.HasFlag(VM.VirtualisationStatus.IO_DRIVERS_INSTALLED))
if (AreIODriversNeededAndMissing(vm))
return false;
if (vbd.currently_attached)
return false;
@ -121,7 +132,7 @@ namespace XenAdmin.Commands
if (vdi.type == vdi_type.system)
return Messages.TOOLTIP_DEACTIVATE_SYSVDI;
if (!vm.GetVirtualisationStatus.HasFlag(VM.VirtualisationStatus.IO_DRIVERS_INSTALLED))
if (AreIODriversNeededAndMissing(vm))
return string.Format(
vm.HasNewVirtualisationStates ? Messages.CANNOT_ACTIVATE_VD_VM_NEEDS_IO_DRIVERS : Messages.CANNOT_ACTIVATE_VD_VM_NEEDS_TOOLS,
Helpers.GetName(vm).Ellipsise(50));

View File

@ -96,11 +96,16 @@ namespace XenAdmin.Commands
return (DialogResult)Program.Invoke(Program.MainWindow,
(DialogInvoker)delegate()
{
return new ThreeButtonDialog(
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, string.Format(Messages.ACTIVATION_FAILED_MESSAGE, InvisibleMessages.ACTIVATION_SERVER)),
"ActivationServerUnavailable",
new ThreeButtonDialog.TBDButton(Messages.ACTIVATION_SAVE, DialogResult.Yes),
ThreeButtonDialog.ButtonCancel).ShowDialog(Program.MainWindow);
ThreeButtonDialog.ButtonCancel))
{
dialogResult = dlg.ShowDialog(Program.MainWindow);
}
return dialogResult;
});
}

View File

@ -100,8 +100,11 @@ namespace XenAdmin.Commands
: string.Format(Messages.ADD_HOST_TO_POOL_DISCONNECTED_POOL_MULTIPLE,
Helpers.GetName(_pool).Ellipsise(500));
new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, message, Messages.XENCENTER)).ShowDialog(Parent);
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, message, Messages.XENCENTER)))
{
dlg.ShowDialog(Parent);
}
return;
}
@ -121,9 +124,9 @@ namespace XenAdmin.Commands
Helpers.FeatureForbidden(host, Host.RestrictCpuMasking) &&
!PoolJoinRules.FreeHostPaidMaster(host, master, false))) // in this case we can upgrade the license and then mask the CPU
{
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPUMASKING : Messages.UPSELL_BLURB_CPUMASKING + Messages.UPSELL_BLURB_CPUMASKING_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPUMASKING);
dlg.ShowDialog(Parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPUMASKING : Messages.UPSELL_BLURB_CPUMASKING + Messages.UPSELL_BLURB_CPUMASKING_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPUMASKING))
dlg.ShowDialog(Parent);
return;
}
@ -221,13 +224,15 @@ namespace XenAdmin.Commands
string poolName = Helpers.GetName(pool).Ellipsise(500);
string hostName = Helpers.GetName(host).Ellipsise(500);
string msg = string.Format(Messages.HA_HOST_ENABLE_NTOL_RAISE_QUERY, poolName, hostName, currentNtol, max);
if (new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(null, msg, Messages.HIGH_AVAILABILITY),
ThreeButtonDialog.ButtonYes,
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)).ShowDialog(Program.MainWindow)
== DialogResult.Yes)
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)))
{
doit = true;
if (dlg.ShowDialog(Program.MainWindow) == DialogResult.Yes)
{
doit = true;
}
}
});
return doit;
@ -279,13 +284,16 @@ namespace XenAdmin.Commands
msg = string.Format(f, poolName, currentNtol, hostName, targetNtol);
}
if (new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, msg, Messages.HIGH_AVAILABILITY),
ThreeButtonDialog.ButtonYes,
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)
).ShowDialog(Program.MainWindow) == DialogResult.No)
))
{
cancel = true;
if (dlg.ShowDialog(Program.MainWindow) == DialogResult.No)
{
cancel = true;
}
}
});

View File

@ -106,7 +106,10 @@ namespace XenAdmin.Commands
string text = String.Format(Messages.HOST_ALREADY_IN_POOL, hostToAdd.Name, _pool.Name, hostPool.Name);
string caption = Messages.POOL_JOIN_IMPOSSIBLE;
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation, text, caption)).ShowDialog(Program.MainWindow);
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation, text, caption)))
{
dlg.ShowDialog(Program.MainWindow);
}
}
else
{

View File

@ -80,11 +80,14 @@ namespace XenAdmin.Commands
}
else
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
FriendlyErrorNames.VBDS_MAX_ALLOWED,
Messages.DISK_ADD)).ShowDialog(Program.MainWindow);
SystemIcons.Error,
FriendlyErrorNames.VBDS_MAX_ALLOWED,
Messages.DISK_ADD)))
{
dlg.ShowDialog(Program.MainWindow);
}
}
}
else

View File

@ -72,30 +72,33 @@ namespace XenAdmin.Commands
protected override void ExecuteCore(SelectedItemCollection selection)
{
ApplyLicenseEditionAction action = new ApplyLicenseEditionAction(xos, _edition, _licenseServerAddress, _licenseServerPort, null);
ActionProgressDialog actionProgress = new ActionProgressDialog(action, ProgressBarStyle.Marquee);
// close dialog even when there's an error as this action shows its own error dialog box.
action.Completed += s =>
{
Program.Invoke(Program.MainWindow, () =>
{
Failure f = action.Exception as Failure;
if (f != null && f.ErrorDescription[0] == Failure.RBAC_PERMISSION_DENIED_FRIENDLY)
return;
actionProgress.Close();
});
if (action.Exception != null)
{
ShowLicensingFailureDialog(action.LicenseFailures, action.Exception.Message, Parent);
}
};
actionProgress.ShowDialog(Parent);
if (actionProgress.action.Succeeded)
using (var actionProgress = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
{
InvokeSuccedded(null);
//ActionProgressDialog closureDialog = actionProgress;
// close dialog even when there's an error as this action shows its own error dialog box.
action.Completed += s =>
{
Program.Invoke(Program.MainWindow, () =>
{
Failure f = action.Exception as Failure;
if (f != null && f.ErrorDescription[0] == Failure.RBAC_PERMISSION_DENIED_FRIENDLY)
return;
actionProgress.Close();
});
if (action.Exception != null)
{
ShowLicensingFailureDialog(action.LicenseFailures, action.Exception.Message, Parent);
}
};
actionProgress.ShowDialog(Parent);
if (actionProgress.action.Succeeded)
{
InvokeSuccedded(null);
}
}
}
@ -111,10 +114,15 @@ namespace XenAdmin.Commands
if (licenseFailures.Count == 1)
{
Program.Invoke(Program.MainWindow, () => new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, licenseFailures[0].AlertText,
Messages.LICENSE_ERROR_TITLE),
ThreeButtonDialog.ButtonOK).ShowDialog(parent));
Program.Invoke(Program.MainWindow, () =>
{
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Error, licenseFailures[0].AlertText,
Messages.LICENSE_ERROR_TITLE),
ThreeButtonDialog.ButtonOK))
{
dlg.ShowDialog(parent);
}
});
}
else
{
@ -125,9 +133,13 @@ namespace XenAdmin.Commands
failureDic.Add(new SelectedItem(f.Host), f.AlertText);
}
Program.Invoke(Program.MainWindow, () => new CommandErrorDialog(
Messages.LICENSE_ERROR_TITLE, exceptionMessage,
failureDic).ShowDialog(parent));
Program.Invoke(Program.MainWindow, () =>
{
using (var dlg = new CommandErrorDialog(Messages.LICENSE_ERROR_TITLE, exceptionMessage, failureDic))
{
dlg.ShowDialog(parent);
}
});
}
}
}

View File

@ -69,11 +69,14 @@ namespace XenAdmin.Commands
if (vm.VBDs.Count >= vm.MaxVBDsAllowed)
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
FriendlyErrorNames.VBDS_MAX_ALLOWED,
Messages.DISK_ATTACH)).ShowDialog(Program.MainWindow);
Messages.DISK_ATTACH)))
{
dlg.ShowDialog(Program.MainWindow);
}
}
else
{

View File

@ -80,10 +80,10 @@ namespace XenAdmin.Commands
{
SaveFileDialog dialog = new SaveFileDialog();
dialog.AddExtension = true;
dialog.Filter = string.Format("{0} (*.xbk)|*.xbk|{1} (*.*)|*.*", Messages.XS_BACKUP_FILES, Messages.ALL_FILES);
dialog.Filter = string.Format("{0} (*.{1})|*.{1}|{2} (*.*)|*.*", Messages.XS_BACKUP_FILES, Branding.BACKUP, Messages.ALL_FILES);
dialog.FilterIndex = 0;
dialog.RestoreDirectory = true;
dialog.DefaultExt = "xbk";
dialog.DefaultExt = Branding.BACKUP;
if (dialog.ShowDialog(Parent) != DialogResult.Cancel)
new HostBackupRestoreAction(host, HostBackupRestoreAction.HostBackupRestoreType.backup, dialog.FileName).RunAsync();

View File

@ -51,11 +51,16 @@ namespace XenAdmin.Commands
var action = (AsyncAction)sender;
if (action.Result == false.ToString())
MainWindowCommandInterface.Invoke(() =>
new ThreeButtonDialog(
{
using (var dlg =new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Information,
Messages.VIF_HOTPLUG_FAILED_MESSAGE,
Messages.VIF_HOTPLUG_FAILED_TITLE)).ShowDialog(Program.MainWindow));
Messages.VIF_HOTPLUG_FAILED_TITLE)))
{
dlg.ShowDialog(Program.MainWindow);
}
});
}
}
}

View 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;
using System.Collections.Generic;
using System.Text;
using XenAPI;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAdmin.Wizards.NewVMWizard;
using XenAdmin.Properties;
using System.Drawing;
using System.Collections.ObjectModel;
using System.Windows.Forms;
using XenAdmin.Dialogs;
using XenAdmin.Actions;
namespace XenAdmin.Commands
{
/// <summary>
/// Launches the Control Domain Memory dialog.
/// </summary>
internal class ChangeControlDomainMemoryCommand : Command
{
/// <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.
/// </summary>
public ChangeControlDomainMemoryCommand()
{
}
public ChangeControlDomainMemoryCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
: base(mainWindow, selection)
{
}
protected override void ExecuteCore(SelectedItemCollection selection)
{
Host host = selection[0].HostAncestor;
using (var dlg = new ControlDomainMemoryDialog(host))
dlg.ShowDialog(Program.MainWindow);
}
protected override bool ConfirmationRequired
{
get { return false; }
}
private bool CanExecute(Host host)
{
return host != null && host.IsLive && Helpers.ElyOrGreater(host);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.ContainsOneItemOfType<Host>() && selection.AtLeastOneXenObjectCan<Host>(CanExecute);
}
public override string MenuText
{
get
{
return Messages.HOST_MENU_CONTROL_DOMAIN_MEMORY;
}
}
}
}

View File

@ -130,14 +130,6 @@ namespace XenAdmin.Commands
/// Gets the current selection context for the Command.
/// </summary>
public SelectedItemCollection GetSelection()
{
return GetSelectionCore();
}
/// <summary>
/// Gets the current selection context for the Command.
/// </summary>
protected virtual SelectedItemCollection GetSelectionCore()
{
return _selection;
}
@ -197,7 +189,6 @@ namespace XenAdmin.Commands
public virtual string MenuText
{
get { return null; }
set { throw new NotImplementedException(); }
}
/// <summary>
@ -409,35 +400,19 @@ namespace XenAdmin.Commands
foreach (SelectedItem item in GetSelection())
{
string reason = GetCantExecuteReason(item);
if (item == null || item.XenObject == null)
continue;
if (MainWindowCommandInterface != null && CanExecuteCore(new SelectedItemCollection(item)))
continue;
string reason = GetCantExecuteReasonCore(item);
if (reason != null)
{
cantExecuteReasons.Add(item, reason);
}
}
return cantExecuteReasons;
}
private string GetCantExecuteReason(SelectedItem item)
{
SelectedItemCollection selection = GetSelection();
((ICommand)this).SetSelection(new[] { item });
try
{
if (!CanExecute() && item.XenObject != null)
{
return GetCantExecuteReasonCore(item);
}
return null;
}
finally
{
((ICommand)this).SetSelection(selection);
}
}
/// <summary>
/// Gets the reason that the specified item from the selection cant execute. This is displayed in the error dialog.

View File

@ -114,17 +114,11 @@ namespace XenAdmin.Commands
base.DropDownItems.Add(hostMenuItem);
}
if (base.DropDownItems.Count <= 0)
{
ToolStripMenuItem hostMenuItem = new ToolStripMenuItem(Messages.HOST_MENU_EMPTY);
hostMenuItem.Enabled = false;
hostMenuItem.Font = Program.DefaultFont;
base.DropDownItems.Add(hostMenuItem);
}
if (Helpers.GetPool(connection) != null)
{
base.DropDownItems.Add(new ToolStripSeparator());
if (base.DropDownItems.Count > 0)
base.DropDownItems.Add(new ToolStripSeparator());
// Add a final option for connecting a new server and adding it to the pool in one action
AddNewHostToPoolCommand cmd = new AddNewHostToPoolCommand(Command.MainWindowCommandInterface, Helpers.GetPool(connection));
CommandToolStripMenuItem connectAndAddToPoolMenuItem = new CommandToolStripMenuItem(cmd);

View File

@ -84,15 +84,9 @@ namespace XenAdmin.Commands
}
}
if (base.DropDownItems.Count <= 0)
{
ToolStripMenuItem hostMenuItem = new ToolStripMenuItem(Messages.HOST_MENU_EMPTY);
hostMenuItem.Font = Program.DefaultFont;
hostMenuItem.Enabled = false;
base.DropDownItems.Add(hostMenuItem);
}
if (base.DropDownItems.Count > 0)
base.DropDownItems.Add(new ToolStripSeparator());
base.DropDownItems.Add(new ToolStripSeparator());
base.DropDownItems.Add(new CommandToolStripMenuItem(new NewPoolCommand(Command.MainWindowCommandInterface, selection)));
}

View File

@ -187,11 +187,15 @@ namespace XenAdmin.Commands
text = string.Format(VMGroup<T>.ChangeMultipleWarningString, groupName.Ellipsise(250));
}
return new ThreeButtonDialog(
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, text, VMGroup<T>.ChangeVMsGroupString),
ThreeButtonDialog.ButtonYes,
ThreeButtonDialog.ButtonNo).
ShowDialog() == DialogResult.Yes;
ThreeButtonDialog.ButtonNo))
{
dialogResult = dlg.ShowDialog();
}
return dialogResult == DialogResult.Yes;
}
protected override void ExecuteCore(SelectedItemCollection selection)

View File

@ -112,10 +112,8 @@ namespace XenAdmin.Commands
Image = _command.ToolBarImage;
}
if (_command.ToolTipText != null)
{
ToolTipText = _command.ToolTipText;
}
//null is allowed (CA-147657)
ToolTipText = _command.ToolTipText;
}
}

View File

@ -41,6 +41,7 @@ using System.Diagnostics;
using System.Text.RegularExpressions;
using System.Collections.ObjectModel;
using System.Drawing;
using XenAdmin.Dialogs;
using XenAdmin.Plugins;
@ -339,7 +340,7 @@ namespace XenAdmin.Commands
{
public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
{
items.Add(new MoveVirtualDiskCommand(mainWindow, selection));
items.Add(MoveVirtualDiskDialog.MoveMigrateCommand(mainWindow, selection));
// Default behaviour of this command is very conservative, they wont be able to delete if there are multi vbds,
// or if any of the vbds are plugged on top of the other constraints.
items.Add(new DeleteVirtualDiskCommand(mainWindow, selection));
@ -361,11 +362,10 @@ namespace XenAdmin.Commands
{
public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
{
items.Add(MoveVirtualDiskDialog.MoveMigrateCommand(mainWindow, selection));
// Default behaviour of this command is very conservative, they wont be able to delete if there are multi vbds,
// or if any of the vbds are plugged on top of the other constraints.
items.Add(new DeleteVirtualDiskCommand(mainWindow, selection));
items.AddSeparator();
items.Add(new PropertiesCommand(mainWindow, selection));
}
public override bool IsValid(SelectedItemCollection selection)
@ -387,7 +387,10 @@ namespace XenAdmin.Commands
public override bool IsValid(SelectedItemCollection selection)
{
return selection.ContainsOneItemOfType<XenAPI.Network>();
return selection.ContainsOneItemOfType<XenAPI.Network>() &&
!(selection.FirstAsXenObject as XenAPI.Network).IsGuestInstallerNetwork;
// CA-218956 - Expose HIMN when showing hidden objects
// HIMN should not be editable
}
}

View File

@ -46,12 +46,12 @@ namespace XenAdmin.Commands
{
public MigrateVMToolStripMenuItem()
: base(new MigrateVMCommand2(), false, vm_operations.pool_migrate)
: base(new MigrateVmToServerCommand(), false, vm_operations.pool_migrate)
{
}
public MigrateVMToolStripMenuItem(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, bool inContextMenu)
: base(new MigrateVMCommand2(mainWindow, selection), inContextMenu, vm_operations.pool_migrate)
: base(new MigrateVmToServerCommand(mainWindow, selection), inContextMenu, vm_operations.pool_migrate)
{
}
@ -76,60 +76,59 @@ namespace XenAdmin.Commands
}
}
private class MigrateVMCommand2 : Command
/// <summary>
/// This is the command used for enabling the VM's drop-right ToolStripMenuItem "Migrate to Server >"
/// </summary>
private class MigrateVmToServerCommand : Command
{
public MigrateVMCommand2()
public MigrateVmToServerCommand()
{
}
public MigrateVMCommand2(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
public MigrateVmToServerCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
: base(mainWindow, selection)
{
}
private static bool CanExecute(VM vm)
{
if (vm.Connection != null && vm.Connection.IsConnected)
if (Helpers.FeatureForbidden(vm.Connection, Host.RestrictIntraPoolMigrate))
if (vm == null || vm.Connection == null || !vm.Connection.IsConnected)
return false;
if (vm.is_a_template || vm.Locked)
return false;
if (Helpers.FeatureForbidden(vm.Connection, Host.RestrictIntraPoolMigrate))
return false;
if (vm != null && !vm.is_a_template && !vm.Locked)
{
if(Helpers.TampaOrGreater(vm.Connection))
return vm.allowed_operations != null && vm.allowed_operations.Contains(vm_operations.pool_migrate);
if (Helpers.TampaOrGreater(vm.Connection))
return vm.allowed_operations != null && vm.allowed_operations.Contains(vm_operations.pool_migrate);
return SelectionInVisiblePool(vm.Connection) && vm.Connection.Cache.HostCount > 1 && vm.allowed_operations != null && vm.allowed_operations.Contains(vm_operations.pool_migrate);
}
return false;
return SelectionInVisiblePool(vm.Connection) && vm.Connection.Cache.HostCount > 1 && vm.allowed_operations != null && vm.allowed_operations.Contains(vm_operations.pool_migrate);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
if (!selection.AllItemsAre<VM>())
{
return false;
}
IXenConnection connection = selection.GetConnectionOfFirstItem();
IXenConnection connection = null;
bool atLeaseOneCanExecute = false;
bool atLeastOneCanExecute = false;
foreach (SelectedItem item in selection)
{
VM vm = (VM)item.XenObject;
//all items should be VMs
VM vm = item.XenObject as VM;
if (vm == null)
return false;
// all VMs must be on the same connection
if (connection != null && vm.Connection != connection)
{
return false;
}
if (CanExecute(item.XenObject as VM))
{
atLeaseOneCanExecute = true;
}
//at least one VM should be able to execute
if (CanExecute(vm))
atLeastOneCanExecute = true;
}
return atLeaseOneCanExecute;
return atLeastOneCanExecute;
}
private static bool SelectionInVisiblePool(IXenConnection connection)
@ -141,7 +140,7 @@ namespace XenAdmin.Commands
if (pool == null)
return false;
return pool!=null&&pool.IsVisible;
return pool.IsVisible;
}
public override string MenuText

View File

@ -56,7 +56,9 @@ namespace XenAdmin.Commands
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private readonly vm_operations _operation;
public VMOperationToolStripMenuItem(Command command, bool inContextMenu, vm_operations operation)
private readonly bool _resumeAfter;
protected VMOperationToolStripMenuItem(Command command, bool inContextMenu, vm_operations operation)
: base(command, inContextMenu)
{
if (operation != vm_operations.start_on && operation != vm_operations.resume_on && operation != vm_operations.pool_migrate)
@ -64,6 +66,9 @@ namespace XenAdmin.Commands
throw new ArgumentException("Invalid operation", "operation");
}
if (operation.Equals(vm_operations.resume_on))
_resumeAfter = true;
_operation = operation;
base.DropDownItems.Add(new ToolStripMenuItem());
}
@ -139,9 +144,9 @@ namespace XenAdmin.Commands
{
foreach (VMOperationToolStripMenuSubItem item in base.DropDownItems)
{
if (item.Tag is Host)
Host host = item.Tag as Host;
if (host != null)
{
Host host = (Host)item.Tag;
item.Command = new VMOperationWlbHostCommand(Command.MainWindowCommandInterface, selection, host, _operation, recommendations.GetStarRating(host));
hostMenuItems.Add(item);
}
@ -191,17 +196,11 @@ namespace XenAdmin.Commands
foreach (VMOperationToolStripMenuSubItem item in dropDownItems)
{
if (item.Tag is Host)
Host host = item.Tag as Host;
if (host != null)
{
Host host = (Host)item.Tag;
string hostNameText = host.Name.EscapeAmpersands();
VMOperationCommand cmd = new VMOperationHostCommand(Command.MainWindowCommandInterface, selection, delegate { return host; }, hostNameText, _operation, session);
VMOperationCommand cpmCmd = new CrossPoolMigrateCommand(Command.MainWindowCommandInterface, selection, host)
{
MenuText = hostNameText
};
VMOperationCommand cmd = new VMOperationHostCommand(Command.MainWindowCommandInterface, selection, delegate { return host; }, host.Name.EscapeAmpersands(), _operation, session);
VMOperationCommand cpmCmd = new CrossPoolMigrateCommand(Command.MainWindowCommandInterface, selection, host, _resumeAfter);
VMOperationToolStripMenuSubItem tempItem = item;
Program.Invoke(Program.MainWindow, delegate

View File

@ -75,10 +75,8 @@ namespace XenAdmin.Commands
SecondImage = _command.SecondImage;
}
if (_command.ToolTipText != null)
{
ToolTipText = _command.ToolTipText;
}
//null is allowed (CA-147657)
ToolTipText = _command.ToolTipText;
StarRating = _command.StarRating;
}

View File

@ -65,11 +65,14 @@ namespace XenAdmin.Commands
if (failedConnections.Count > 0)
{
if (!Program.RunInAutomatedTestMode)
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
MessageBoxMessage(failedConnections),
Messages.PERMISSION_DENIED)).ShowDialog(Program.MainWindow);
Messages.PERMISSION_DENIED)))
{
dlg.ShowDialog(Program.MainWindow);
}
return false; // returning false stops the command from proceeding
}

View File

@ -46,7 +46,11 @@ namespace XenAdmin.Commands
public CrossPoolCopyVMCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, Host preSelectedHost)
: base(mainWindow, selection, preSelectedHost)
{
MenuText = Messages.MAINWINDOW_COPY_VM;
}
public override string MenuText
{
get { return Messages.MAINWINDOW_COPY_VM; }
}
protected override void ExecuteCore(SelectedItemCollection selection)
@ -87,7 +91,11 @@ namespace XenAdmin.Commands
public CrossPoolCopyTemplateCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, Host preSelectedHost)
: base(mainWindow, selection, preSelectedHost)
{
MenuText = Messages.MAINWINDOW_COPY_TEMPLATE;
}
public override string MenuText
{
get { return Messages.MAINWINDOW_COPY_TEMPLATE; }
}
public new static bool CanExecute(VM vm, Host preSelectedHost)

View File

@ -47,28 +47,31 @@ namespace XenAdmin.Commands
{
internal class CrossPoolMigrateCommand : VMOperationCommand
{
private bool _resumeAfter;
public CrossPoolMigrateCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
: base(mainWindow, selection)
{ }
protected Host preSelectedHost = null;
public CrossPoolMigrateCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, Host preSelectedHost)
public CrossPoolMigrateCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, Host preSelectedHost, bool resumeAfter=false)
: base(mainWindow, selection)
{
this.preSelectedHost = preSelectedHost;
_resumeAfter = resumeAfter;
}
private string menuText = Messages.HOST_MENU_CPM_TEXT;
public override string MenuText
{
get { return menuText; }
set { menuText = value; }
get { return preSelectedHost == null ? Messages.HOST_MENU_CPM_TEXT : preSelectedHost.Name.EscapeAmpersands(); }
}
public override string ContextMenuText { get { return Messages.HOST_MENU_CPM_TEXT; } }
public override Image MenuImage { get { return Resources._000_MigrateVM_h32bit_16; } }
public override Image MenuImage
{
get { return preSelectedHost == null ? Resources._000_MigrateVM_h32bit_16 : Resources._000_TreeConnected_h32bit_16; }
}
protected override void ExecuteCore(SelectedItemCollection selection)
{
@ -80,10 +83,9 @@ namespace XenAdmin.Commands
}
else
{
MainWindowCommandInterface.ShowPerConnectionWizard(con,
new CrossPoolMigrateWizard(con, selection, preSelectedHost, WizardMode.Migrate));
var wizard = new CrossPoolMigrateWizard(con, selection, preSelectedHost, WizardMode.Migrate, _resumeAfter);
MainWindowCommandInterface.ShowPerConnectionWizard(con, wizard);
}
}
protected override Host GetHost(VM vm)
@ -93,9 +95,9 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPM : Messages.UPSELL_BLURB_CPM + Messages.UPSELL_BLURB_CPM_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPM);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_CPM : Messages.UPSELL_BLURB_CPM + Messages.UPSELL_BLURB_CPM_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPM))
dlg.ShowDialog(parent);
}
protected override bool CanExecute(VM vm)
@ -109,7 +111,7 @@ namespace XenAdmin.Commands
if (preselectedHost != null)
{
failureFound = new CrossPoolMigrateCanMigrateFilter(preselectedHost, new List<VM> { vm }).FailureFound;
failureFound = new CrossPoolMigrateCanMigrateFilter(preselectedHost, new List<VM> {vm}, WizardMode.Migrate).FailureFound;
}
return !failureFound &&

View File

@ -38,14 +38,18 @@ using XenAPI;
namespace XenAdmin.Commands
{
/// <summary>
/// The command for the 'Home Server' subitem which is shown when WLB isn't enabled in the submenu for start-on, resume-on or migrate.
/// The command for the 'Target Server' subitem which is shown when WLB isn't enabled in the submenu for start-on, resume-on or migrate.
/// </summary>
internal class CrossPoolMigrateToHomeCommand : CrossPoolMigrateCommand
{
public CrossPoolMigrateToHomeCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, Host preSelectedHost)
: base(mainWindow, selection, preSelectedHost)
{
MenuText = Messages.HOME_SERVER_MENU_ITEM;
}
public override string MenuText
{
get { return Messages.HOME_SERVER_MENU_ITEM; }
}
public override Image MenuImage

View File

@ -46,7 +46,11 @@ namespace XenAdmin.Commands
public CrossPoolMoveVMCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, Host preSelectedHost)
: base(mainWindow, selection, preSelectedHost)
{
MenuText = Messages.MAINWINDOW_MOVEVM;
}
public override string MenuText
{
get { return Messages.MAINWINDOW_MOVEVM; }
}
protected override void ExecuteCore(SelectedItemCollection selection)

View File

@ -118,9 +118,9 @@ namespace XenAdmin.Commands
private static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR))
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -94,9 +94,9 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR))
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -97,9 +97,9 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR))
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -94,9 +94,9 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR))
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -77,6 +77,17 @@ namespace XenAdmin.Commands
return selection.AllItemsAre<VBD>() && selection.AtLeastOneXenObjectCan<VBD>(CanExecute);
}
// We only need to check for IO Drivers for hosts before Ely
private bool AreIODriversNeededAndMissing(VM vm)
{
if (Helpers.ElyOrGreater(vm.Connection))
{
return false;
}
return !vm.GetVirtualisationStatus.HasFlag(VM.VirtualisationStatus.IO_DRIVERS_INSTALLED);
}
private bool CanExecute(VBD vbd)
{
VDI vdi = vbd.Connection.Resolve<VDI>(vbd.VDI);
@ -87,7 +98,7 @@ namespace XenAdmin.Commands
return false;
if (vdi.type == vdi_type.system && vbd.IsOwner)
return false;
if (!vm.GetVirtualisationStatus.HasFlag(VM.VirtualisationStatus.IO_DRIVERS_INSTALLED))
if (AreIODriversNeededAndMissing(vm))
return false;
if (!vbd.currently_attached)
return false;
@ -124,7 +135,7 @@ namespace XenAdmin.Commands
if (vdi.type == vdi_type.system && vbd.IsOwner)
return Messages.TOOLTIP_DEACTIVATE_SYSVDI;
if (!vm.GetVirtualisationStatus.HasFlag(VM.VirtualisationStatus.IO_DRIVERS_INSTALLED))
if (AreIODriversNeededAndMissing(vm))
return string.Format(
vm.HasNewVirtualisationStates ? Messages.CANNOT_DEACTIVATE_VDI_NEEDS_IO_DRIVERS : Messages.CANNOT_DEACTIVATE_VDI_NEEDS_TOOLS,
Helpers.GetName(vm).Ellipsise(50));

View File

@ -66,14 +66,14 @@ namespace XenAdmin.Commands
protected override void ExecuteCore(SelectedItemCollection selection)
{
List<Folder> folders = new List<Folder>(selection.AsXenObjects<Folder>(CanExecute));
List<IXenObject> folders = new List<IXenObject>(selection.AsXenObjects<Folder>(CanExecute));
folders.RemoveAll((Predicate<Folder>)delegate(Folder folder)
folders.RemoveAll((Predicate<IXenObject>)delegate(IXenObject folder)
{
// if the list contains any folders that are children to others in the list then
// they will automatically get deleted, so remove them here.
foreach (Folder f in folders)
foreach (var f in folders)
{
if (folder.opaque_ref.StartsWith(f.opaque_ref + "/"))
{
@ -83,12 +83,7 @@ namespace XenAdmin.Commands
return false;
});
List<AsyncAction> actions = new List<AsyncAction>();
foreach (Folder folder in folders)
{
actions.Add(new FolderAction((IXenObject)folder, null, FolderAction.Kind.Delete));
}
RunMultipleActions(actions, Messages.DELETING_FOLDERS, Messages.DELETING_FOLDERS, Messages.DELETED_FOLDERS, true);
new DeleteFolderAction(folders).RunAsync();
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -70,7 +70,10 @@ namespace XenAdmin.Commands
if (conn.Cache.HostCount > 1)
{
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation, Messages.MESSAGEBOX_SLAVES_EJECT, Messages.XENCENTER)).ShowDialog(Program.MainWindow);
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation, Messages.MESSAGEBOX_SLAVES_EJECT, Messages.XENCENTER)))
{
dlg.ShowDialog(Program.MainWindow);
}
return;
}

View File

@ -32,10 +32,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using XenAPI;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.TabPages;
using XenAdmin.Core;
using XenAdmin.Commands.Controls;
using XenAdmin.Dialogs;
@ -63,26 +63,17 @@ namespace XenAdmin.Commands
}
public DeleteVirtualDiskCommand(IMainWindow mainWindow, VDI vdi)
: base(mainWindow, vdi)
{
}
public override string ContextMenuText
{
get
{
bool allSnaps = true;
foreach (VDI vdi in GetSelection().AsXenObjects<VDI>())
{
if (vdi.is_a_snapshot)
continue;
allSnaps = false;
break;
}
// Default to Virtual Disk in the mixed case of snaps/non snaps as it is the more general term
return allSnaps ? Messages.DELETE_SNAPSHOT_MENU_ITEM : Messages.DELETE_VIRTUAL_DISK;
var selection = GetSelection();
if (selection.Count > 1)
return Messages.MAINWINDOW_DELETE_OBJECTS;
return selection.AsXenObjects<VDI>().All(v => v.is_a_snapshot)
? Messages.DELETE_SNAPSHOT_MENU_ITEM
: Messages.DELETE_VIRTUAL_DISK;
}
}
@ -419,8 +410,11 @@ namespace XenAdmin.Commands
DeactivateVBDCommand cmd = new DeactivateVBDCommand(Program.MainWindow, vbd);
if (!cmd.CanExecute())
{
return string.Format(Messages.CANNOT_DELETE_CANNOT_DEACTIVATE_REASON,
Helpers.GetName(vm).Ellipsise(20), cmd.ToolTipText);
var reasons = cmd.GetCantExecuteReasons();
return reasons.Count > 0
? string.Format(Messages.CANNOT_DELETE_CANNOT_DEACTIVATE_REASON,
Helpers.GetName(vm).Ellipsise(20), reasons.ElementAt(0).Value)
: Messages.UNKNOWN;
}
}
}

View File

@ -92,41 +92,55 @@ namespace XenAdmin.Commands
Pool pool = Helpers.GetPool(network.Connection);
if (pool != null && pool.ha_enabled)
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
string.Format(Messages.BOND_DELETE_HA_ENABLED, pif.Name, pool.Name),
Messages.DELETE_BOND)).ShowDialog(Parent);
Messages.DELETE_BOND)))
{
dlg.ShowDialog(Parent);
}
return;
}
string message = string.Format(will_disturb_secondary ? Messages.BOND_DELETE_WILL_DISTURB_BOTH : Messages.BOND_DELETE_WILL_DISTURB_PRIMARY, msg);
if (DialogResult.OK !=
new ThreeButtonDialog(
DialogResult result;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, message, Messages.DELETE_BOND),
"NetworkingConfigWarning",
new ThreeButtonDialog.TBDButton(Messages.BOND_DELETE_CONTINUE, DialogResult.OK),
ThreeButtonDialog.ButtonCancel).ShowDialog(Parent))
ThreeButtonDialog.ButtonCancel))
{
return;
result = dlg.ShowDialog(Parent);
}
if (DialogResult.OK != result)
return;
}
else if (will_disturb_secondary)
{
if (DialogResult.OK !=
new ThreeButtonDialog(
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, string.Format(Messages.BOND_DELETE_WILL_DISTURB_SECONDARY, msg), Messages.XENCENTER),
ThreeButtonDialog.ButtonOK,
ThreeButtonDialog.ButtonCancel).ShowDialog(Parent))
ThreeButtonDialog.ButtonCancel))
{
dialogResult = dlg.ShowDialog(Parent);
}
if (DialogResult.OK != dialogResult)
return;
}
else
{
if (DialogResult.OK !=
new ThreeButtonDialog(
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, msg, Messages.XENCENTER),
new ThreeButtonDialog.TBDButton(Messages.OK, DialogResult.OK, ThreeButtonDialog.ButtonType.ACCEPT, true),
ThreeButtonDialog.ButtonCancel).ShowDialog(Program.MainWindow))
ThreeButtonDialog.ButtonCancel))
{
dialogResult = dlg.ShowDialog(Parent);
}
if (DialogResult.OK != dialogResult)
return;
}

View File

@ -31,6 +31,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XenAPI;
using XenAdmin.Commands.Controls;
@ -142,7 +143,10 @@ namespace XenAdmin.Commands
DeactivateVBDCommand cmd = new DeactivateVBDCommand(Program.MainWindow, vbd);
if (!cmd.CanExecute())
return cmd.ToolTipText;
{
var reasons = cmd.GetCantExecuteReasons();
return reasons.Count > 0 ? reasons.ElementAt(0).Value : Messages.UNKNOWN;
}
}
}
return base.GetCantExecuteReasonCore(item);
@ -165,8 +169,8 @@ namespace XenAdmin.Commands
if (actionsToComplete.Count == 1)
actionsToComplete[0].RunAsync();
else
RunMultipleActions(actionsToComplete, Messages.ACTION_DETATCHING_MULTIPLE_VDIS_TITLE,
Messages.ACTION_DETATCHING_MULTIPLE_VDIS_STATUS, Messages.COMPLETED, true);
RunMultipleActions(actionsToComplete, Messages.ACTION_DETACHING_MULTIPLE_VDIS_TITLE,
Messages.ACTION_DETACHING_MULTIPLE_VDIS_STATUS, Messages.COMPLETED, true);
}
private List<AsyncAction> getDetachVDIAction(VDI vdi)
@ -190,9 +194,9 @@ namespace XenAdmin.Commands
return true;
MultipleWarningDialog warningDialog = new MultipleWarningDialog(
Messages.MESSAGEBOX_DETATCH_VD_TITLE_MUTLIPLE,
Messages.MULTI_VDI_DETATCH_WARNING,
Messages.DETATCH_ALL_BUTTON_LABEL);
Messages.MESSAGEBOX_DETACH_VD_TITLE_MUTLIPLE,
Messages.MULTI_VDI_DETACH_WARNING,
Messages.DETACH_ALL_BUTTON_LABEL);
SelectedItemCollection selectedItems = GetSelection();
List<VDI> sysDisks = new List<VDI>();

View File

@ -0,0 +1,121 @@
/* 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 XenAPI;
using System.Linq;
using XenAdmin.Actions;
namespace XenAdmin.Commands
{
/// <summary>
/// Shows the properties dialog for the selected XenObject.
/// </summary>
internal class DisablePvsReadCachingCommand : Command
{
/// <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.
/// </summary>
internal DisablePvsReadCachingCommand()
{
}
public DisablePvsReadCachingCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
: base(mainWindow, selection)
{
}
public DisablePvsReadCachingCommand(IMainWindow mainWindow, IXenObject xenObject)
: base(mainWindow, xenObject)
{
}
protected virtual void Execute(IList<VM> vms)
{
var actions = new List<AsyncAction>();
foreach (var vm in vms)
{
var pvsProxy = vm.PvsProxy;
if (pvsProxy != null)
actions.Add(new PvsProxyDestroyAction(pvsProxy));
}
if (actions.Any())
{
if (actions.Count == 1)
{
actions[0].RunAsync();
}
else
{
new ParallelAction(
Messages.ACTION_DISABLE_PVS_READ_CACHING,
Messages.ACTION_DISABLING_PVS_READ_CACHING,
Messages.ACTION_DISABLED_PVS_READ_CACHING,
actions).RunAsync();
}
}
}
protected override void ExecuteCore(SelectedItemCollection selection)
{
Execute(selection.AsXenObjects<VM>());
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
// Can execute criteria: A selection of VMs in the same pool, where at least one doesn't have PVS read caching enabled
if (selection.Any() && selection.AllItemsAre<VM>() && selection.GetConnectionOfAllItems() != null)
{
var vms = selection.AsXenObjects<VM>();
if (vms.Any(vm => vm.PvsProxy != null))
{
return true;
}
}
return false;
}
public override string ButtonText
{
get { return Messages.DISABLE_PVS_READ_CACHING_BUTTON; }
}
public override string MenuText
{
get { return Messages.DISABLE_PVS_READ_CACHING_MENU; }
}
}
}

View File

@ -91,9 +91,9 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_DR : Messages.UPSELL_BLURB_DR + Messages.UPSELL_BLURB_DR_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_DR))
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -71,7 +71,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return _connection != null && _connection.IsConnected;
return _connection != null && (_connection.IsConnected || _connection.InProgress);
}
/// <summary>
@ -129,8 +129,10 @@ namespace XenAdmin.Commands
}
});
ActionProgressDialog pd = new ActionProgressDialog(waitForCancelAction, ProgressBarStyle.Marquee);
pd.ShowDialog(Parent);
using (var pd = new ActionProgressDialog(waitForCancelAction, ProgressBarStyle.Marquee))
{
pd.ShowDialog(Parent);
}
}
else
{

View File

@ -63,9 +63,9 @@ namespace XenAdmin.Commands
if (Helpers.FeatureForbidden(selection[0].XenObject, Host.RestrictWLB))
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB);
dlg.ShowDialog(Parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB))
dlg.ShowDialog(Parent);
return;
}

View File

@ -163,10 +163,12 @@ namespace XenAdmin.Commands
SR sr = cd.Connection.Resolve<SR>(vdi.SR);
if (sr != null && !sr.shared)
{
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation,
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation,
Messages.DRAG_DROP_LOCAL_CD_LOADED,
Messages.DRAG_DROP_LOCAL_CD_LOADED_TITLE))
.ShowDialog(MainWindowCommandInterface.Form);
Messages.DRAG_DROP_LOCAL_CD_LOADED_TITLE)))
{
dlg.ShowDialog(MainWindowCommandInterface.Form);
}
return;
}
}

View File

@ -162,12 +162,6 @@ namespace XenAdmin.Commands
protected override void ExecuteCore()
{
Folder targetFolder = GetTargetNodeAncestorAsXenObjectOrGroupingTag<Folder>();
List<AsyncAction> actions = new List<AsyncAction>();
foreach (IXenObject draggedItem in GetItemsNotAlreadyInTargetFolder())
{
actions.Add(new FolderAction(draggedItem, targetFolder, FolderAction.Kind.Move));
}
if (DraggedNodes != null)
{
@ -180,8 +174,7 @@ namespace XenAdmin.Commands
}
}
MultipleActionLauncher launcher = new MultipleActionLauncher(actions, string.Format(Messages.MOVE_OBJECTS_TO_FOLDER, targetFolder.Name), Messages.MOVING, Messages.MOVED, true);
launcher.Run();
new MoveToFolderAction(GetItemsNotAlreadyInTargetFolder(), targetFolder).RunAsync();
// need to now wait until the operation has finished... then we can expand the node.
ThreadPool.QueueUserWorkItem(delegate

View File

@ -216,10 +216,12 @@ namespace XenAdmin.Commands
SR sr = cd.Connection.Resolve<SR>(vdi.SR);
if (sr != null && !sr.shared)
{
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation,
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Exclamation,
Messages.DRAG_DROP_LOCAL_CD_LOADED,
Messages.DRAG_DROP_LOCAL_CD_LOADED_TITLE))
.ShowDialog(MainWindowCommandInterface.Form);
Messages.DRAG_DROP_LOCAL_CD_LOADED_TITLE)))
{
dlg.ShowDialog(MainWindowCommandInterface.Form);
}
return;
}
}

View File

@ -0,0 +1,116 @@
/* 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.Text;
using XenAPI;
using XenAdmin.Dialogs;
using XenAdmin.Network;
using XenAdmin.Properties;
using System.Drawing;
using System.Collections.ObjectModel;
using System.Linq;
using XenAdmin.Model;
namespace XenAdmin.Commands
{
/// <summary>
/// Shows the properties dialog for the selected XenObject.
/// </summary>
internal class EnablePvsReadCachingCommand : Command
{
/// <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.
/// </summary>
internal EnablePvsReadCachingCommand()
{
}
public EnablePvsReadCachingCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
: base(mainWindow, selection)
{
}
public EnablePvsReadCachingCommand(IMainWindow mainWindow, IXenObject xenObject)
: base(mainWindow, xenObject)
{
}
protected virtual void Execute(IList<VM> vms)
{
using (var dlg = new EnablePvsReadCachingDialog(vms))
{
dlg.ShowDialog(Program.MainWindow);
}
}
protected override void ExecuteCore(SelectedItemCollection selection)
{
Execute(selection.AsXenObjects<VM>());
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
// Must have a selection, of all VMs
if (selection.Any() && selection.AllItemsAre<VM>())
{
// Must all be in the same pool, which must have at least one PVS site
var connection = selection.GetConnectionOfAllItems();
if (connection == null || !connection.Cache.PVS_sites.Any())
{
return false;
}
// At least one must not currently have a PVS Proxy
var vms = selection.AsXenObjects<VM>();
if (vms.Any(vm => vm.PvsProxy == null))
{
return true;
}
}
return false;
}
public override string ButtonText
{
get { return Messages.ENABLE_PVS_READ_CACHING_BUTTON; }
}
public override string MenuText
{
get { return Messages.ENABLE_PVS_READ_CACHING_MENU; }
}
}
}

View File

@ -55,7 +55,7 @@ namespace XenAdmin.Commands
Pool poolAncestor = selection.PooAncestorFromConnection;
if ((poolAncestor != null || hostAncestor != null) //CA-61207: this check ensures there's no cross-pool selection
&& (selection.FirstIsPool || selection.FirstIsHost || selection.FirstIsRealVM || selection.FirstIsVMappliance))
&& (selection.FirstIs<Pool>() || selection.FirstIs<Host>() || selection.FirstIsRealVM || selection.FirstIs<VM_appliance>()))
{
if (selection.AllItemsAre<VM>())
return selection.AtLeastOneXenObjectCan<VM>(CanExportVm);

View File

@ -134,12 +134,16 @@ namespace XenAdmin.Commands
string msg = string.Format(Messages.CONFIRM_EXPORT_NOT_ENOUGH_MEMORY, Util.DiskSizeString((long)neededSpace),
Util.DiskSizeString((long)freeSpace), vm.Name);
DialogResult dr = new ThreeButtonDialog(
DialogResult dr;
using (var d = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, msg),
"ExportVmDialogInsufficientDiskSpace",
new ThreeButtonDialog.TBDButton(Messages.CONTINUE_WITH_EXPORT, DialogResult.OK),
new ThreeButtonDialog.TBDButton(Messages.CHOOSE_ANOTHER_DESTINATION, DialogResult.Retry),
ThreeButtonDialog.ButtonCancel).ShowDialog(Parent);
ThreeButtonDialog.ButtonCancel))
{
dr = d.ShowDialog(Parent);
}
if (dr == DialogResult.Retry)
{
@ -155,12 +159,16 @@ namespace XenAdmin.Commands
string msg = string.Format(Messages.CONFIRM_EXPORT_FAT, Util.DiskSizeString((long)neededSpace),
Util.DiskSizeString(4 * Util.BINARY_GIGA), vm.Name);
DialogResult dr = new ThreeButtonDialog(
DialogResult dr;
using (var d = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, msg),
"ExportVmDialogFSLimitExceeded",
new ThreeButtonDialog.TBDButton(Messages.CONTINUE_WITH_EXPORT, DialogResult.OK),
new ThreeButtonDialog.TBDButton(Messages.CHOOSE_ANOTHER_DESTINATION, DialogResult.Retry),
ThreeButtonDialog.ButtonCancel).ShowDialog(Parent);
ThreeButtonDialog.ButtonCancel))
{
dr = d.ShowDialog(Parent);
}
if (dr == DialogResult.Retry)
{

View File

@ -82,9 +82,9 @@ namespace XenAdmin.Commands
if (Helpers.FeatureForbidden(pool, Host.RestrictHA))
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_HA : Messages.UPSELL_BLURB_HA + Messages.UPSELL_BLURB_HA_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_HA);
dlg.ShowDialog(Parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_HA : Messages.UPSELL_BLURB_HA + Messages.UPSELL_BLURB_HA_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_HA))
dlg.ShowDialog(Parent);
}
else if (pool.ha_enabled)
{

View File

@ -79,12 +79,15 @@ namespace XenAdmin.Commands
if (pool != null && pool.ha_enabled && host.IsMaster())
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
String.Format(Messages.HA_CANNOT_EVACUATE_MASTER,
Helpers.GetName(host).Ellipsise(Helpers.DEFAULT_NAME_TRIM_LENGTH)),
Messages.XENCENTER)).ShowDialog(Parent);
SystemIcons.Error,
String.Format(Messages.HA_CANNOT_EVACUATE_MASTER,
Helpers.GetName(host).Ellipsise(Helpers.DEFAULT_NAME_TRIM_LENGTH)),
Messages.XENCENTER)))
{
dlg.ShowDialog(Parent);
}
}
else
{

View File

@ -116,11 +116,14 @@ namespace XenAdmin.Commands
{
log.ErrorFormat("Failed to import search from '{0}'", filename);
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
String.Format(Messages.UNABLE_TO_IMPORT_SEARCH, filename, Branding.Search),
Messages.XENCENTER)).ShowDialog(Parent);
Messages.XENCENTER)))
{
dlg.ShowDialog(Parent);
}
}
}
}

View File

@ -36,7 +36,9 @@ using XenAdmin.Network;
using XenAdmin.Wizards.PatchingWizard;
using XenAdmin.Properties;
using System.Drawing;
using System.Collections.ObjectModel;
using System.Linq;
using XenAdmin.Core;
using XenAPI;
namespace XenAdmin.Commands
@ -66,14 +68,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
foreach (IXenConnection xenConnection in ConnectionsManager.XenConnectionsCopy)
{
if (xenConnection.IsConnected)
{
return true;
}
}
return false;
return ConnectionsManager.XenConnectionsCopy.Any(xenConnection => xenConnection.IsConnected);
}
public override Image ContextMenuImage

View File

@ -119,16 +119,24 @@ namespace XenAdmin.Commands
{
if (vm.FindVMCDROM() == null)
{
if (new ThreeButtonDialog(
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
null,
Messages.NEW_DVD_DRIVE_REQUIRED,
Messages.XENCENTER),
ThreeButtonDialog.ButtonYes,
ThreeButtonDialog.ButtonNo).ShowDialog(Parent) == DialogResult.Yes)
ThreeButtonDialog.ButtonNo))
{
dialogResult = dlg.ShowDialog(Parent);
}
if (dialogResult == DialogResult.Yes)
{
CreateCdDriveAction createDriveAction = new CreateCdDriveAction(vm, true,NewDiskDialog.ShowMustRebootBoxCD,NewDiskDialog.ShowVBDWarningBox);
new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee).ShowDialog(Parent);
using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
{
dlg.ShowDialog(Parent);
}
if (createDriveAction.Succeeded)
{
@ -142,7 +150,7 @@ namespace XenAdmin.Commands
DialogResult dr = new InstallToolsWarningDialog(vm.Connection).ShowDialog(Parent);
if (dr == DialogResult.Yes)
{
InstallPVToolsAction installToolsAction = new InstallPVToolsAction( vm, XSToolsSRNotFound, Properties.Settings.Default.ShowHiddenVMs);
var installToolsAction = new InstallPVToolsAction(vm, Properties.Settings.Default.ShowHiddenVMs);
installToolsAction.Completed += InstallToolsActionCompleted;
installToolsAction.RunAsync();
@ -152,15 +160,6 @@ namespace XenAdmin.Commands
return null;
}
private static void XSToolsSRNotFound()
{
Program.Invoke(Program.MainWindow, delegate
{
new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, Messages.XS_TOOLS_SR_NOT_FOUND, Messages.XENCENTER)).ShowDialog(Program.MainWindow);
});
}
/// <summary>
/// Attempts to install tools on several VMs
/// </summary>
@ -180,16 +179,24 @@ namespace XenAdmin.Commands
if (newDvdDrivesRequired)
{
if (new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.NEW_DVD_DRIVES_REQUIRED, Messages.XENCENTER),
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.NEW_DVD_DRIVES_REQUIRED, Messages.XENCENTER),
ThreeButtonDialog.ButtonYes,
ThreeButtonDialog.ButtonNo).ShowDialog(Parent) == DialogResult.Yes)
ThreeButtonDialog.ButtonNo))
{
dialogResult = dlg.ShowDialog(Parent);
}
if (dialogResult == DialogResult.Yes)
{
foreach (VM vm in vms)
{
if (CanExecute(vm) && vm.FindVMCDROM() == null)
{
CreateCdDriveAction createDriveAction = new CreateCdDriveAction(vm, true,NewDiskDialog.ShowMustRebootBoxCD,NewDiskDialog.ShowVBDWarningBox);
new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee).ShowDialog(Parent);
using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
{
dlg.ShowDialog(Parent);
}
}
}
ShowMustRebootBox();
@ -206,7 +213,7 @@ namespace XenAdmin.Commands
{
foreach (VM vm in vms)
{
InstallPVToolsAction installToolsAction = new InstallPVToolsAction(vm, XSToolsSRNotFound, Properties.Settings.Default.ShowHiddenVMs);
var installToolsAction = new InstallPVToolsAction(vm, Properties.Settings.Default.ShowHiddenVMs);
if (vms.IndexOf(vm) == 0)
{
@ -255,11 +262,14 @@ namespace XenAdmin.Commands
{
if (!MainWindowCommandInterface.RunInAutomatedTestMode)
{
new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Information,
Messages.NEW_DVD_DRIVE_REBOOT_TOOLS,
Messages.NEW_DVD_DRIVE_CREATED)).ShowDialog(Parent);
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Information,
Messages.NEW_DVD_DRIVE_REBOOT_TOOLS,
Messages.NEW_DVD_DRIVE_CREATED)))
{
dlg.ShowDialog(Parent);
}
}
}

View File

@ -32,8 +32,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Core;
using XenAdmin.Dialogs;
using XenAPI;
@ -55,17 +53,9 @@ namespace XenAdmin.Commands
{
}
public MigrateVirtualDiskCommand(IMainWindow mainWindow, VDI vdi)
: base(mainWindow, vdi)
{
}
public override string ContextMenuText
{
get
{
return Messages.MOVE_VDI_CONTEXT_MENU;
}
get { return GetSelection().Count > 1 ? Messages.MAINWINDOW_MOVE_OBJECTS : Messages.MOVE_VDI_CONTEXT_MENU; }
}
protected override void ExecuteCore(SelectedItemCollection selection)
@ -75,49 +65,40 @@ namespace XenAdmin.Commands
bool featureForbidden = vdis.TrueForAll(vdi => Helpers.FeatureForbidden(vdi.Connection, Host.RestrictCrossPoolMigrate));
if (featureForbidden)
{
ShowUpsellDialog(Parent);
string theText = HiddenFeatures.LinkLabelHidden
? Messages.MIGRATE_VDI_UPSELL_BLURB
: Messages.MIGRATE_VDI_UPSELL_BLURB + Messages.MIGRATE_VDI_UPSELL_BLURB_MORE;
using (var dlg = new UpsellDialog(theText, InvisibleMessages.UPSELL_LEARNMOREURL_CPM))
dlg.ShowDialog(Parent);
}
else
{
new VDIMigrateDialog(selection.FirstAsXenObject.Connection, vdis).Show(Program.MainWindow);
new MoveVirtualDiskDialog(selection.FirstAsXenObject.Connection, null, vdis).Show(Program.MainWindow);
}
}
public static void ShowUpsellDialog(IWin32Window parent)
{
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.MIGRATE_VDI_UPSELL_BLURB : Messages.MIGRATE_VDI_UPSELL_BLURB + Messages.MIGRATE_VDI_UPSELL_BLURB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_CPM);
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.Count >= 1 && selection.All(v=>VDIIsSuitable(v.XenObject as VDI));
return selection.Count > 0 && selection.All(v => CanBeMigrated(v.XenObject as VDI));
}
private SR GetSR(VDI vdi)
private bool CanBeMigrated(VDI vdi)
{
return vdi.Connection.Resolve(vdi.SR);
}
if (vdi == null || vdi.is_a_snapshot || vdi.Locked || vdi.IsHaType)
return false;
private bool VDIIsSuitable(VDI vdi)
{
if (vdi == null)
return false;
if (vdi.is_a_snapshot)
return false;
if (vdi.Locked)
return false;
if (vdi.IsHaType)
return false;
if(vdi.Connection.ResolveAll(vdi.VBDs).Count < 1)
if(vdi.Connection.ResolveAll(vdi.VBDs).Count == 0)
return false;
if(vdi.GetVMs().Any(vm=>!vm.IsRunning) && !Helpers.DundeeOrGreater(vdi.Connection))
return false;
SR sr = GetSR(vdi);
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))
return false;
return true;
}
@ -126,6 +107,7 @@ namespace XenAdmin.Commands
VDI vdi = item.XenObject as VDI;
if (vdi == null)
return base.GetCantExecuteReasonCore(item);
if (vdi.is_a_snapshot)
return Messages.CANNOT_MOVE_VDI_IS_SNAPSHOT;
if (vdi.Locked)
@ -136,11 +118,14 @@ namespace XenAdmin.Commands
return Messages.CANNOT_MOVE_DR_VD;
if (vdi.GetVMs().Any(vm => !vm.IsRunning) && !Helpers.DundeeOrGreater(vdi.Connection))
return Messages.CANNOT_MIGRATE_VDI_NON_RUNNING_VM;
SR sr = GetSR(vdi);
SR sr = vdi.Connection.Resolve(vdi.SR);
if (sr == null)
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))
return Messages.UNSUPPORTED_SR_TYPE;
return base.GetCantExecuteReasonCore(item);
}

View File

@ -31,7 +31,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using XenAPI;
using XenAdmin.Dialogs;
@ -56,50 +56,34 @@ namespace XenAdmin.Commands
{
}
public MoveVirtualDiskCommand(IMainWindow mainWindow, VDI vdi)
: base(mainWindow, vdi)
{
}
public override string ContextMenuText
{
get
{
return Messages.MOVE_VDI_CONTEXT_MENU;
}
get { return GetSelection().Count > 1 ? Messages.MAINWINDOW_MOVE_OBJECTS : Messages.MOVE_VDI_CONTEXT_MENU; }
}
protected override void ExecuteCore(SelectedItemCollection selection)
{
VDI vdi = (VDI)selection[0].XenObject;
MainWindowCommandInterface.ShowPerXenModelObjectWizard(vdi, new MoveVirtualDiskDialog(vdi));
var vdis = selection.AsXenObjects<VDI>();
new MoveVirtualDiskDialog(selection.GetConnectionOfFirstItem(), vdis, null).Show(Program.MainWindow);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
if (selection != null && selection.Count == 1)
{
VDI vdi = selection[0].XenObject as VDI;
if (vdi == null)
return false;
if (vdi.is_a_snapshot)
return false;
if (vdi.Locked)
return false;
if (vdi.VBDs.Count != 0)
return false;
if (vdi.IsHaType)
return false;
return selection.Count > 0 && selection.All(v => CanBeMoved(v.XenObject as VDI));
}
SR sr = vdi.Connection.Resolve(vdi.SR);
if (sr == null || sr.HBALunPerVDI)
return false;
return true;
}
return false;
private bool CanBeMoved(VDI vdi)
{
if (vdi == null || vdi.is_a_snapshot || vdi.Locked || vdi.IsHaType)
return false;
if (vdi.VBDs.Count != 0)
return false;
SR sr = vdi.Connection.Resolve(vdi.SR);
if (sr == null || sr.HBALunPerVDI)
return false;
return true;
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
@ -107,6 +91,7 @@ namespace XenAdmin.Commands
VDI vdi = item.XenObject as VDI;
if (vdi == null)
return base.GetCantExecuteReasonCore(item);
if (vdi.is_a_snapshot)
return Messages.CANNOT_MOVE_VDI_IS_SNAPSHOT;
if (vdi.Locked)
@ -117,7 +102,12 @@ namespace XenAdmin.Commands
return Messages.CANNOT_MOVE_DR_VD;
if (vdi.VBDs.Count != 0)
return Messages.CANNOT_MOVE_VDI_WITH_VBDS;
if (vdi.Connection.Resolve(vdi.SR).HBALunPerVDI)
SR sr = vdi.Connection.Resolve(vdi.SR);
if (sr == null)
return base.GetCantExecuteReasonCore(item);
if (sr.HBALunPerVDI)
return Messages.UNSUPPORTED_SR_TYPE;
return base.GetCantExecuteReasonCore(item);

View File

@ -116,7 +116,7 @@ namespace XenAdmin.Commands
if (newPaths.Count > 0)
{
FolderAction action = new FolderAction(connection, FolderAction.Kind.New, newPaths.ToArray());
var action = new CreateFolderAction(connection, newPaths.ToArray());
Action<ActionBase> completed = null;
completed = delegate

View File

@ -83,7 +83,19 @@ namespace XenAdmin.Commands
}
}
Execute(selection[0].Connection, selection[0].HostAncestor, template);
var connection = selection[0].Connection;
Host host = null;
if (template != null)
{
host = template.Home();
}
else
{
host = selection[0].HostAncestor;
}
Execute(connection, host, template);
}
private void Execute(IXenConnection connection, Host DefaultAffinity, VM DefaultTemplate)

View File

@ -330,4 +330,21 @@ namespace XenAdmin.Commands
}
}
}
internal class VdiEditSizeLocationCommand : PropertiesCommand
{
public VdiEditSizeLocationCommand(IMainWindow mainWindow, IXenObject xenObject)
: base(mainWindow, xenObject)
{
}
protected override void Execute(IXenObject xenObject)
{
using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
{
dialog.SelectVdiSizeLocationPage();
dialog.ShowDialog(Parent);
}
}
}
}

View File

@ -35,7 +35,6 @@ using System.Text;
using XenAdmin.Core;
using XenAPI;
using XenAdmin.Wizards;
using System.Collections.ObjectModel;
namespace XenAdmin.Commands
@ -91,7 +90,8 @@ namespace XenAdmin.Commands
&& !sr.HasPBDs
&& sr.CanCreateWithXenCenter
&& !HelpersGUI.GetActionInProgress(sr)
&& !(sr.type == "cslg" && Helpers.FeatureForbidden(sr.Connection, Host.RestrictStorageChoices));
&& !(sr.type == "cslg" && Helpers.FeatureForbidden(sr.Connection, Host.RestrictStorageChoices))
&& (SM.GetByType(sr.Connection, sr.type) != null);
}
public override string MenuText

View File

@ -31,6 +31,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Properties;
@ -120,12 +121,32 @@ namespace XenAdmin.Commands
get
{
List<Host> hosts = GetSelection().AsXenObjects<Host>();
bool hasRunningVMs = (hosts.Find(h => h.resident_VMs.Count >= 2) != null); // 2 not 1, because the Control Domain doesn't count
if (hosts.Count == 1)
return (hasRunningVMs ? Messages.CONFIRM_REBOOT_SERVER : Messages.CONFIRM_REBOOT_SERVER_NO_VMS);
else
return (hasRunningVMs ? Messages.CONFIRM_REBOOT_SERVERS : Messages.CONFIRM_REBOOT_SERVERS_NO_VMS);
bool hasRunningVMs = false;
var hciHosts = new List<Host>();
foreach (Host h in hosts)
{
if (h.HasRunningVMs)
hasRunningVMs = true;
if (h.Connection.ResolveAll(h.resident_VMs).Exists(v => v.HciWarnBeforeShutdown))
hciHosts.Add(h);
}
if (hciHosts.Count > 0)
return hciHosts.Count == 1
? string.Format(Messages.CONFIRM_REBOOT_HCI_WARN_SERVER, hciHosts[0].Name)
: string.Format(Messages.CONFIRM_REBOOT_HCI_WARN_SERVERS, string.Join("\n", hciHosts.Select(h => h.Name)));
if (hasRunningVMs)
return hosts.Count == 1
? string.Format(Messages.CONFIRM_REBOOT_SERVER, hosts[0].Name)
: Messages.CONFIRM_REBOOT_SERVERS;
return hosts.Count == 1
? string.Format(Messages.CONFIRM_REBOOT_SERVER_NO_VMS, hosts[0].Name)
: Messages.CONFIRM_REBOOT_SERVERS_NO_VMS;
}
}
@ -183,5 +204,21 @@ namespace XenAdmin.Commands
return Messages.MAINWINDOW_REBOOT_HOST_CONTEXT_MENU;
}
}
protected override string ConfirmationDialogYesButtonLabel
{
get
{
return Messages.CONFIRM_REBOOT_SERVER_YES_BUTTON_LABEL;
}
}
protected override bool ConfirmationDialogNoButtonSelected
{
get
{
return true;
}
}
}
}

View File

@ -37,6 +37,7 @@ using XenAdmin.Actions;
using XenAdmin.Controls;
using XenAdmin.Model;
using XenAPI;
using System.Linq;
namespace XenAdmin.Commands
@ -77,18 +78,12 @@ namespace XenAdmin.Commands
protected override void ExecuteCore(SelectedItemCollection selection)
{
var actions = new List<AsyncAction>();
var objectsToBeRemoved = (from VirtualTreeNode node in _nodes
let xenObject = node.Tag as IXenObject
where xenObject != null
select xenObject).ToList();
foreach (VirtualTreeNode node in _nodes)
{
IXenObject xenObject = node.Tag as IXenObject;
if (xenObject != null)
actions.Add(new FolderAction(xenObject, null, FolderAction.Kind.Delete));
}
if (actions.Count != 0)
RunMultipleActions(actions, Messages.REMOVE_FROM_FOLDER, Messages.REMOVING_FROM_FOLDER, Messages.REMOVED_FROM_FOLDER, true);
new DeleteFolderAction(objectsToBeRemoved).RunAsync();
}
public override string MenuText

View File

@ -85,11 +85,14 @@ namespace XenAdmin.Commands
if (selection.Count == 1 && pool.master == host.opaque_ref)
{
// Trying to remove the master from a pool.
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
Messages.MESSAGEBOX_POOL_MASTER_REMOVE,
Messages.XENCENTER)).ShowDialog(MainWindowCommandInterface.Form);
Messages.XENCENTER)))
{
dlg.ShowDialog(MainWindowCommandInterface.Form);
}
return;
}
@ -175,11 +178,14 @@ namespace XenAdmin.Commands
{
MainWindowCommandInterface.Invoke(delegate
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Exclamation,
string.Format(Messages.MESSAGEBOX_RECONNECT_FAIL, connection.Hostname),
Messages.MESSAGEBOX_RECONNECT_FAIL_TITLE)).ShowDialog(Parent);
Messages.MESSAGEBOX_RECONNECT_FAIL_TITLE)))
{
dlg.ShowDialog(Parent);
}
});
return;
}

View File

@ -71,7 +71,7 @@ namespace XenAdmin.Commands
string newName = _newName;
Folders.FixupRelativePath(ref newName);
FolderAction action = new FolderAction(_folder, newName, FolderAction.Kind.Rename);
FolderAction action = new RenameFolderAction(_folder, newName);
action.Completed += action_Completed;
action.RunAsync();
}

View File

@ -77,11 +77,14 @@ namespace XenAdmin.Commands
if (srList.Find(s => !s.MultipathAOK) != null)
{
new ThreeButtonDialog(
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Warning,
Messages.MULTIPATH_FAILED,
Messages.MULTIPATHING)).ShowDialog(Parent);
Messages.MULTIPATHING)))
{
dlg.ShowDialog(Parent);
}
}
new RepairSRDialog(srList).Show(Parent);

View File

@ -98,10 +98,10 @@ namespace XenAdmin.Commands
oldDir = Directory.GetCurrentDirectory();
OpenFileDialog dialog = new OpenFileDialog();
dialog.AddExtension = true;
dialog.Filter = string.Format("{0} (*.xbk)|*.xbk|{1} (*.*)|*.*", Messages.XS_BACKUP_FILES, Messages.ALL_FILES);
dialog.Filter = string.Format("{0} (*.{1})|*.{1}|{2} (*.*)|*.*", Messages.XS_BACKUP_FILES, Branding.BACKUP, Messages.ALL_FILES);
dialog.FilterIndex = 0;
dialog.RestoreDirectory = true;
dialog.DefaultExt = "xbk";
dialog.DefaultExt = Branding.BACKUP;
dialog.CheckPathExists = false;
if (dialog.ShowDialog(Parent) == DialogResult.Cancel)
return;
@ -153,11 +153,14 @@ namespace XenAdmin.Commands
MainWindowCommandInterface.Invoke(delegate
{
new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Information,
string.Format(Messages.RESTORE_FROM_BACKUP_FINALIZE, Helpers.GetName(action.Host)),
Messages.XENCENTER)).ShowDialog(Parent);
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Information,
string.Format(Messages.RESTORE_FROM_BACKUP_FINALIZE, Helpers.GetName(action.Host)),
Messages.XENCENTER)))
{
dlg.ShowDialog(Parent);
}
});
}
}

View File

@ -64,10 +64,14 @@ namespace XenAdmin.Commands
{
foreach (IXenConnection xenConnection in ConnectionsManager.XenConnectionsCopy)
{
if (xenConnection.IsConnected)
{
return true;
}
if (!xenConnection.IsConnected)
continue;
var pool = Helpers.GetPoolOfOne(xenConnection);
if (pool != null && pool.IsUpgradeForbidden)
continue;
return true;
}
return false;
}

View File

@ -57,6 +57,15 @@ namespace XenAdmin.Commands
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectedItemCollection"/> class with one item
/// </summary>
/// <param name="item">The itemsthat will populate the collection.</param>
public SelectedItemCollection(SelectedItem item)
: base(new List<SelectedItem> {item})
{
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectedItemCollection"/> class.
/// </summary>
@ -252,25 +261,11 @@ namespace XenAdmin.Commands
}
/// <summary>
/// Gets a value indicating whether the first item is a pool.
/// Gets a value indicating whether the first item is a T.
/// </summary>
public bool FirstIsPool
public bool FirstIs<T>() where T : IXenObject
{
get
{
return First is Pool;
}
}
/// <summary>
/// Gets a value indicating whether the first item is a host.
/// </summary>
public bool FirstIsHost
{
get
{
return First is Host;
}
return First is T;
}
/// <summary>
@ -280,29 +275,7 @@ namespace XenAdmin.Commands
{
get
{
return FirstIsHost && ((Host)this[0].XenObject).IsLive;
}
}
/// <summary>
/// Gets a value indicating whether the first item is a VM.
/// </summary>
public bool FirstIsVM
{
get
{
return First is VM;
}
}
/// <summary>
/// Gets a value indicating whether the first item is a SR.
/// </summary>
public bool FirstIsSR
{
get
{
return First is SR;
return FirstIs<Host>() && ((Host)this[0].XenObject).IsLive;
}
}
@ -313,7 +286,7 @@ namespace XenAdmin.Commands
{
get
{
return FirstIsVM && !((VM)this[0].XenObject).is_a_template;
return FirstIs<VM>() && !((VM)this[0].XenObject).is_a_template;
}
}
@ -324,29 +297,7 @@ namespace XenAdmin.Commands
{
get
{
return FirstIsVM && ((VM)this[0].XenObject).is_a_template && !((VM)this[0].XenObject).is_a_snapshot;
}
}
/// <summary>
/// Gets a value indicating whether the first item is a VM_appliance.
/// </summary>
public bool FirstIsVMappliance
{
get
{
return First is VM_appliance;
}
}
/// <summary>
/// Gets a value indicating whether the first item is a GroupingTag.
/// </summary>
public bool FirstIsGroup
{
get
{
return First is GroupingTag;
return FirstIs<VM>() && ((VM)this[0].XenObject).is_a_template && !((VM)this[0].XenObject).is_a_snapshot;
}
}

View File

@ -31,6 +31,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Core;
@ -132,14 +133,31 @@ namespace XenAdmin.Commands
get
{
List<Host> hosts = GetSelection().AsXenObjects<Host>();
bool hasRunningVMs = (hosts.Find(h => h.resident_VMs.Count >= 2) != null); // 2 not 1, because the Control Domain doesn't count
bool hasRunningVMs = false;
var hciHosts = new List<Host>();
if (hosts.Count == 1)
return (hasRunningVMs
? string.Format(Messages.CONFIRM_SHUTDOWN_SERVER, hosts[0].Name)
: string.Format(Messages.CONFIRM_SHUTDOWN_SERVER_NO_VMS, hosts[0].Name));
else
return (hasRunningVMs ? Messages.CONFIRM_SHUTDOWN_SERVERS : Messages.CONFIRM_SHUTDOWN_SERVERS_NO_VMS);
foreach (Host h in hosts)
{
if (h.HasRunningVMs)
hasRunningVMs = true;
if (h.Connection.ResolveAll(h.resident_VMs).Exists(v => v.HciWarnBeforeShutdown))
hciHosts.Add(h);
}
if (hciHosts.Count > 0)
return hciHosts.Count == 1
? string.Format(Messages.CONFIRM_SHUTDOWN_HCI_WARN_SERVER, hciHosts[0].Name)
: string.Format(Messages.CONFIRM_SHUTDOWN_HCI_WARN_SERVERS, string.Join("\n", hciHosts.Select(h => h.Name)));
if (hasRunningVMs)
return hosts.Count == 1
? string.Format(Messages.CONFIRM_SHUTDOWN_SERVER, hosts[0].Name)
: Messages.CONFIRM_SHUTDOWN_SERVERS;
return hosts.Count == 1
? string.Format(Messages.CONFIRM_SHUTDOWN_SERVER_NO_VMS, hosts[0].Name)
: Messages.CONFIRM_SHUTDOWN_SERVERS_NO_VMS;
}
}

View File

@ -101,11 +101,15 @@ namespace XenAdmin.Commands
}
if (brokenCDs.Count > 0)
{
DialogResult d = new ThreeButtonDialog(
DialogResult d;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(null, Messages.EJECT_BEFORE_VM_START_MESSAGE_BOX, vms.Count > 1 ? Messages.STARTING_VMS_MESSAGEBOX_TITLE : Messages.STARTING_VM_MESSAGEBOX_TITLE),
new ThreeButtonDialog.TBDButton(Messages.EJECT_BUTTON_LABEL, DialogResult.OK, ThreeButtonDialog.ButtonType.ACCEPT, true),
new ThreeButtonDialog.TBDButton(Messages.IGNORE_BUTTON_LABEL, DialogResult.Ignore),
ThreeButtonDialog.ButtonCancel).ShowDialog(MainWindowCommandInterface.Form);
ThreeButtonDialog.ButtonCancel))
{
d = dlg.ShowDialog(MainWindowCommandInterface.Form);
}
if (d == DialogResult.Cancel)
return;
if (d == DialogResult.Ignore)

View File

@ -99,10 +99,12 @@ namespace XenAdmin.Commands
}
else
{
new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.TAKE_SNAPSHOT_ERROR, Messages.XENCENTER))
.ShowDialog(MainWindowCommandInterface.Form);
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.TAKE_SNAPSHOT_ERROR,
Messages.XENCENTER)))
{
dlg.ShowDialog(MainWindowCommandInterface.Form);
}
}
}
return null;

View File

@ -84,8 +84,8 @@ namespace XenAdmin.Commands
public static void ShowUpsellDialog(IWin32Window parent)
{
UpsellDialog dlg = new UpsellDialog(VMGroup<T>.UpsellBlurb, VMGroup<T>.UpsellLearnMoreUrl);
dlg.ShowDialog(parent);
using (var dlg = new UpsellDialog(VMGroup<T>.UpsellBlurb, VMGroup<T>.UpsellLearnMoreUrl))
dlg.ShowDialog(parent);
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -203,20 +203,18 @@ namespace XenAdmin.Commands
{
Program.Invoke(Program.MainWindow, () =>
{
if (
new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning,
String.Format(
isStart
? Messages.
HA_INVALID_CONFIG_START
: Messages.
HA_INVALID_CONFIG_RESUME,
Helpers.GetName(vm).Ellipsise(500)),
Messages.HIGH_AVAILABILITY),
ThreeButtonDialog.ButtonOK,
ThreeButtonDialog.ButtonCancel).ShowDialog(
Program.MainWindow) == DialogResult.Cancel)
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning,
String.Format(isStart ? Messages.HA_INVALID_CONFIG_START : Messages.HA_INVALID_CONFIG_RESUME,
Helpers.GetName(vm).Ellipsise(500)),
Messages.HIGH_AVAILABILITY),
ThreeButtonDialog.ButtonOK,
ThreeButtonDialog.ButtonCancel))
{
dialogResult = dlg.ShowDialog(Program.MainWindow);
}
if (dialogResult == DialogResult.Cancel)
{
throw new CancelledException();
}
@ -304,7 +302,10 @@ namespace XenAdmin.Commands
Helpers.GetName(VMStartAction.VM).Ellipsise(100));
Program.Invoke(Program.MainWindow, delegate()
{
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Warning, msg, Messages.HIGH_AVAILABILITY)).ShowDialog(Program.MainWindow);
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Warning, msg, Messages.HIGH_AVAILABILITY)))
{
dlg.ShowDialog(Program.MainWindow);
}
});
}
else
@ -316,10 +317,14 @@ namespace XenAdmin.Commands
Program.Invoke(Program.MainWindow, delegate()
{
DialogResult r = new ThreeButtonDialog(
DialogResult r;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, msg, Messages.HIGH_AVAILABILITY),
ThreeButtonDialog.ButtonYes,
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)).ShowDialog(Program.MainWindow);
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, ThreeButtonDialog.ButtonType.CANCEL, true)))
{
r = dlg.ShowDialog(Program.MainWindow);
}
if (r == DialogResult.Yes)
{

View File

@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using XenAdmin.Core;
using XenAdmin.Properties;
using XenAPI;
@ -67,10 +68,11 @@ namespace XenAdmin.Commands
VM vm = (VM)item.XenObject;
string reason = GetVmCannotBootOnHostReason(vm, GetHost(vm), session, operation);
_cantBootReasons[vm] = reason;
if (reason == null)
_noneCanBoot = false;
else
_cantBootReasons[vm] = reason;
}
}
@ -83,24 +85,14 @@ namespace XenAdmin.Commands
{
get
{
List<string> uniqueReasons = new List<string>();
if (_noneCanBoot)
{
var uniqueReasons = _cantBootReasons.Values.Distinct().ToList();
foreach (VM vm in _cantBootReasons.Keys)
{
if (!uniqueReasons.Contains(_cantBootReasons[vm]))
{
uniqueReasons.Add(_cantBootReasons[vm]);
}
}
if (_noneCanBoot && uniqueReasons.Count == 1)
{
return string.Format(Messages.MAINWINDOW_CONTEXT_REASON, _text, uniqueReasons[0]);
}
else
{
return _text;
if (uniqueReasons.Count == 1)
return string.Format(Messages.MAINWINDOW_CONTEXT_REASON, _text, uniqueReasons[0]);
}
return _text;
}
}
@ -108,13 +100,13 @@ namespace XenAdmin.Commands
{
get
{
return _noneCanBoot ? Resources._000_ServerDisconnected_h32bit_16 : Resources._000_TreeConnected_h32bit_16;
return Resources._000_TreeConnected_h32bit_16;
}
}
protected override bool CanExecute(VM vm)
{
return vm != null && _cantBootReasons.ContainsKey(vm) && _cantBootReasons[vm] == null;
return vm != null && !_cantBootReasons.ContainsKey(vm);
}
private static string GetVmCannotBootOnHostReason(VM vm, Host host, Session session, vm_operations operation)
@ -172,13 +164,8 @@ namespace XenAdmin.Commands
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
VM vm = item.XenObject as VM;
if (vm == null)
base.GetCantExecuteReasonCore(item);
if (_cantBootReasons.ContainsKey(vm))
{
if (vm != null && _cantBootReasons.ContainsKey(vm))
return _cantBootReasons[vm];
}
return base.GetCantExecuteReasonCore(item);
}

View File

@ -84,9 +84,9 @@ namespace XenAdmin.Commands
if (Helpers.FeatureForbidden(selection[0].XenObject, Host.RestrictWLB))
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB);
dlg.ShowDialog(Parent);
using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
InvisibleMessages.UPSELL_LEARNMOREURL_WLB))
dlg.ShowDialog(Parent);
return;
}

View File

@ -587,7 +587,7 @@ namespace XenAdmin.ConsoleView
{
if (Clipboard.ContainsText() && Clipboard.GetText() == text)
return;
Clipboard.SetText(text);
Clip.SetClipboardText(text);
});
}
}
@ -880,15 +880,7 @@ namespace XenAdmin.ConsoleView
Program.AssertOnEventThread();
if (clipboardStash != "")
{
try
{
Clipboard.SetText(clipboardStash);
}
catch (Exception ex)
{
Log.Error("Clipboard.SetText failed");
Log.Error(ex, ex);
}
Clip.SetClipboardText(clipboardStash);
}
}

View File

@ -24,6 +24,7 @@ namespace XenAdmin.ConsoleView
if (disposing && vncScreen != null && !vncScreen.IsDisposed)
{
vncScreen.GpuStatusChanged -= ShowGpuWarningIfRequired;
vncScreen.Dispose();
}
@ -46,99 +47,29 @@ namespace XenAdmin.ConsoleView
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VNCTabView));
this.buttonPanel = new System.Windows.Forms.Panel();
this.gradientPanel1 = new XenAdmin.Controls.GradientPanel.GradientPanel();
this.HostLabel = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.buttonSSH = new System.Windows.Forms.Button();
this.toggleConsoleButton = new System.Windows.Forms.Button();
this.multipleDvdIsoList1 = new XenAdmin.Controls.MultipleDvdIsoList();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.sendCAD = new System.Windows.Forms.Button();
this.contentPanel = new System.Windows.Forms.Panel();
this.bottomPanel = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox1 = new XenAdmin.Controls.DecentGroupBox();
this.scaleCheckBox = new System.Windows.Forms.CheckBox();
this.fullscreenButton = new System.Windows.Forms.Button();
this.dockButton = new System.Windows.Forms.Button();
this.tip = new System.Windows.Forms.ToolTip(this.components);
this.LifeCycleMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.panel2 = new System.Windows.Forms.Panel();
this.powerStateLabel = new System.Windows.Forms.Label();
this.dedicatedGpuWarning = new System.Windows.Forms.Label();
this.buttonPanel.SuspendLayout();
this.gradientPanel1 = new XenAdmin.Controls.GradientPanel.GradientPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.HostLabel = new System.Windows.Forms.Label();
this.buttonSSH = new System.Windows.Forms.Button();
this.toggleConsoleButton = new System.Windows.Forms.Button();
this.multipleDvdIsoList1 = new XenAdmin.Controls.MultipleDvdIsoList();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.tableLayoutPanel1.SuspendLayout();
this.gradientPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.bottomPanel.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// buttonPanel
//
this.buttonPanel.Controls.Add(this.gradientPanel1);
resources.ApplyResources(this.buttonPanel, "buttonPanel");
this.buttonPanel.Name = "buttonPanel";
//
// gradientPanel1
//
resources.ApplyResources(this.gradientPanel1, "gradientPanel1");
this.gradientPanel1.Controls.Add(this.tableLayoutPanel2);
this.gradientPanel1.Name = "gradientPanel1";
this.gradientPanel1.Scheme = XenAdmin.Controls.GradientPanel.GradientPanel.Schemes.Tab;
//
// HostLabel
//
this.HostLabel.AutoEllipsis = true;
resources.ApplyResources(this.HostLabel, "HostLabel");
this.HostLabel.ForeColor = System.Drawing.Color.White;
this.HostLabel.Name = "HostLabel";
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.HostLabel, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.buttonSSH, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.toggleConsoleButton, 5, 0);
this.tableLayoutPanel2.Controls.Add(this.multipleDvdIsoList1, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 1, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// buttonSSH
//
resources.ApplyResources(this.buttonSSH, "buttonSSH");
this.buttonSSH.Name = "buttonSSH";
this.buttonSSH.UseVisualStyleBackColor = true;
this.buttonSSH.Click += new System.EventHandler(this.buttonSSH_Click);
//
// toggleConsoleButton
//
resources.ApplyResources(this.toggleConsoleButton, "toggleConsoleButton");
this.toggleConsoleButton.Name = "toggleConsoleButton";
this.tip.SetToolTip(this.toggleConsoleButton, resources.GetString("toggleConsoleButton.ToolTip"));
this.toggleConsoleButton.UseVisualStyleBackColor = true;
this.toggleConsoleButton.Click += new System.EventHandler(this.toggleConsoleButton_Click);
//
// multipleDvdIsoList1
//
resources.ApplyResources(this.multipleDvdIsoList1, "multipleDvdIsoList1");
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
this.multipleDvdIsoList1.VM = null;
//
// pictureBox1
//
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Image = global::XenAdmin.Properties.Resources._001_LifeCycle_h32bit_24;
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.LifeCycleButton_MouseClick);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
this.pictureBox1.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
this.pictureBox1.MouseLeave += new System.EventHandler(this.pictureBox1_MouseLeave);
this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp);
//
// sendCAD
//
resources.ApplyResources(this.sendCAD, "sendCAD");
@ -151,28 +82,15 @@ namespace XenAdmin.ConsoleView
resources.ApplyResources(this.contentPanel, "contentPanel");
this.contentPanel.Name = "contentPanel";
//
// bottomPanel
//
this.bottomPanel.Controls.Add(this.tableLayoutPanel1);
resources.ApplyResources(this.bottomPanel, "bottomPanel");
this.bottomPanel.Name = "bottomPanel";
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.sendCAD, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.scaleCheckBox, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.fullscreenButton, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.fullscreenButton, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.dockButton, 3, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// scaleCheckBox
//
resources.ApplyResources(this.scaleCheckBox, "scaleCheckBox");
@ -201,18 +119,12 @@ namespace XenAdmin.ConsoleView
//
// LifeCycleMenuStrip
//
this.LifeCycleMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
this.LifeCycleMenuStrip.Name = "LifeCycleMenuStrip";
resources.ApplyResources(this.LifeCycleMenuStrip, "LifeCycleMenuStrip");
this.LifeCycleMenuStrip.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.LifeCycleMenuStrip_Closing);
this.LifeCycleMenuStrip.Opened += new System.EventHandler(this.LifeCycleMenuStrip_Opened);
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.buttonPanel);
this.panel2.Name = "panel2";
//
// powerStateLabel
//
this.powerStateLabel.AutoEllipsis = true;
@ -230,6 +142,67 @@ namespace XenAdmin.ConsoleView
this.dedicatedGpuWarning.ForeColor = System.Drawing.SystemColors.ControlText;
this.dedicatedGpuWarning.Name = "dedicatedGpuWarning";
//
// gradientPanel1
//
this.gradientPanel1.Controls.Add(this.tableLayoutPanel2);
resources.ApplyResources(this.gradientPanel1, "gradientPanel1");
this.gradientPanel1.Name = "gradientPanel1";
this.gradientPanel1.Scheme = XenAdmin.Controls.GradientPanel.GradientPanel.Schemes.Tab;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.HostLabel, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.buttonSSH, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.toggleConsoleButton, 5, 0);
this.tableLayoutPanel2.Controls.Add(this.multipleDvdIsoList1, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 1, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// HostLabel
//
this.HostLabel.AutoEllipsis = true;
resources.ApplyResources(this.HostLabel, "HostLabel");
this.HostLabel.ForeColor = System.Drawing.Color.White;
this.HostLabel.Name = "HostLabel";
//
// buttonSSH
//
resources.ApplyResources(this.buttonSSH, "buttonSSH");
this.buttonSSH.Name = "buttonSSH";
this.buttonSSH.UseVisualStyleBackColor = true;
this.buttonSSH.Click += new System.EventHandler(this.buttonSSH_Click);
//
// toggleConsoleButton
//
resources.ApplyResources(this.toggleConsoleButton, "toggleConsoleButton");
this.toggleConsoleButton.Name = "toggleConsoleButton";
this.tip.SetToolTip(this.toggleConsoleButton, resources.GetString("toggleConsoleButton.ToolTip"));
this.toggleConsoleButton.UseVisualStyleBackColor = true;
this.toggleConsoleButton.Click += new System.EventHandler(this.toggleConsoleButton_Click);
//
// multipleDvdIsoList1
//
resources.ApplyResources(this.multipleDvdIsoList1, "multipleDvdIsoList1");
this.multipleDvdIsoList1.LabelNewCdForeColor = System.Drawing.SystemColors.HotTrack;
this.multipleDvdIsoList1.LabelSingleDvdForeColor = System.Drawing.SystemColors.ControlText;
this.multipleDvdIsoList1.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
this.multipleDvdIsoList1.VM = null;
//
// pictureBox1
//
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Image = global::XenAdmin.Properties.Resources._001_LifeCycle_h32bit_24;
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.LifeCycleButton_MouseClick);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
this.pictureBox1.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
this.pictureBox1.MouseLeave += new System.EventHandler(this.pictureBox1_MouseLeave);
this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp);
//
// VNCTabView
//
resources.ApplyResources(this, "$this");
@ -237,18 +210,15 @@ namespace XenAdmin.ConsoleView
this.Controls.Add(this.contentPanel);
this.Controls.Add(this.dedicatedGpuWarning);
this.Controls.Add(this.powerStateLabel);
this.Controls.Add(this.bottomPanel);
this.Controls.Add(this.panel2);
this.Controls.Add(this.gradientPanel1);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "VNCTabView";
this.buttonPanel.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.gradientPanel1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.bottomPanel.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -256,26 +226,22 @@ namespace XenAdmin.ConsoleView
#endregion
private System.Windows.Forms.Panel buttonPanel;
public System.Windows.Forms.Button dockButton;
private System.Windows.Forms.Button dockButton;
private System.Windows.Forms.Button sendCAD;
private System.Windows.Forms.Panel contentPanel;
private System.Windows.Forms.Panel bottomPanel;
public System.Windows.Forms.CheckBox scaleCheckBox;
private System.Windows.Forms.CheckBox scaleCheckBox;
private System.Windows.Forms.Button fullscreenButton;
private XenAdmin.Controls.DecentGroupBox groupBox1;
private System.Windows.Forms.ToolTip tip;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.ContextMenuStrip LifeCycleMenuStrip;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Panel panel2;
private XenAdmin.Controls.GradientPanel.GradientPanel gradientPanel1;
private System.Windows.Forms.Label HostLabel;
public System.Windows.Forms.Button toggleConsoleButton;
private System.Windows.Forms.Button toggleConsoleButton;
private XenAdmin.Controls.MultipleDvdIsoList multipleDvdIsoList1;
private System.Windows.Forms.Label powerStateLabel;
private System.Windows.Forms.Label dedicatedGpuWarning;
public System.Windows.Forms.Button buttonSSH;
private System.Windows.Forms.Button buttonSSH;
}
}

View File

@ -43,7 +43,8 @@ using XenAdmin.Commands;
using XenAdmin.Dialogs;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
using XenAdmin.Controls.ConsoleTab;
namespace XenAdmin.ConsoleView
{
@ -65,8 +66,8 @@ namespace XenAdmin.ConsoleView
private readonly VM source;
private readonly Host targetHost;
private VM_guest_metrics guestMetrics = null;
private Form fullscreenForm = null;
private Form fullscreenHint = null;
private FullScreenForm fullscreenForm;
private FullScreenHint fullscreenHint;
private Size LastDesktopSize;
private bool switchOnTabOpened = false;
@ -96,7 +97,9 @@ namespace XenAdmin.ConsoleView
HostLabel.Font = Program.HeaderGradientFont;
HostLabel.ForeColor = Program.HeaderGradientForeColor;
multipleDvdIsoList1.SetTextColor(Program.HeaderGradientForeColor);
multipleDvdIsoList1.LabelSingleDvdForeColor = Program.HeaderGradientForeColor;
multipleDvdIsoList1.LabelNewCdForeColor = Program.HeaderGradientForeColor;
multipleDvdIsoList1.LinkLabelLinkColor = Color.White;
#pragma warning disable 0219
// Force the handle to be created, because resize events
@ -131,7 +134,7 @@ namespace XenAdmin.ConsoleView
hostMetrics.PropertyChanged += Server_PropertyChanged;
}
HostLabel.Text = string.Format(Messages.CONSOLE_HOST, host.Name);
HostLabel.Text = string.Format(source.IsControlDomainZero ? Messages.CONSOLE_HOST : Messages.CONSOLE_HOST_NUTANIX, host.Name);
HostLabel.Visible = true;
}
}
@ -153,9 +156,10 @@ namespace XenAdmin.ConsoleView
log.DebugFormat("'{0}' console: Update power state (on VNCTabView constructor)", this.source.Name);
updatePowerState();
this.vncScreen = new XSVNCScreen(source, new EventHandler(RDPorVNCResizeHandler), this, elevatedUsername, elevatedPassword);
ShowGpuWarningIfRequired();
ShowGpuWarningIfRequired(vncScreen.MustConnectRemoteDesktop());
vncScreen.GpuStatusChanged += ShowGpuWarningIfRequired;
if (source.is_control_domain || source.IsHVM && !hasRDP) //Linux HVM guests should only have one console: the console switch button vanishes altogether.
if (source.IsControlDomainZero || source.IsHVM && !hasRDP) //Linux HVM guests should only have one console: the console switch button vanishes altogether.
{
toggleConsoleButton.Visible = false;
}
@ -185,8 +189,6 @@ namespace XenAdmin.ConsoleView
this.vncScreen.Parent = this.contentPanel;
this.vncScreen.Dock = DockStyle.Fill;
this.Dock = DockStyle.Fill;
string rdpLabel = GuessNativeConsoleLabel(source);
this.toggleConsoleButton.Text = rdpLabel;
@ -210,6 +212,12 @@ namespace XenAdmin.ConsoleView
vncScreen.AutoSwitchRDPLater = true;
}
public bool IsScaled
{
get { return scaleCheckBox.Checked; }
set { scaleCheckBox.Checked = value; }
}
//CA-75479 - add to aid debugging
private void toggleConsoleButton_EnabledChanged(object sender, EventArgs e)
{
@ -243,7 +251,7 @@ namespace XenAdmin.ConsoleView
private void Host_CollectionChanged(object sender, CollectionChangeEventArgs e)
{
if (source.is_control_domain)
if (source.IsControlDomainZero)
return;
Host host = e.Element as Host;
@ -279,7 +287,7 @@ namespace XenAdmin.ConsoleView
if (this.guestMetrics != null)
this.guestMetrics.PropertyChanged -= guestMetrics_PropertyChanged;
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
Host host = source.Connection.Resolve<Host>(source.resident_on);
if (host != null)
@ -520,9 +528,11 @@ namespace XenAdmin.ConsoleView
if (source.is_control_domain && e.PropertyName == "name_label")
{
HostLabel.Text = string.Format(Messages.CONSOLE_HOST, source.AffinityServerString);
string text = string.Format(source.IsControlDomainZero ? Messages.CONSOLE_HOST : Messages.CONSOLE_HOST_NUTANIX, source.AffinityServerString);
HostLabel.Text = text;
if (parentVNCView != null && parentVNCView.undockedForm != null)
parentVNCView.undockedForm.Text = source.AffinityServerString;
parentVNCView.undockedForm.Text = text;
}
}
@ -580,7 +590,7 @@ namespace XenAdmin.ConsoleView
private void Server_EnabledPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName != "enabled" || source.is_control_domain)
if (e.PropertyName != "enabled" || source.IsControlDomainZero)
return;
Host host = sender as Host;
@ -601,14 +611,9 @@ namespace XenAdmin.ConsoleView
multipleDvdIsoList1.VM = source;
}
private void cdLabel_Click(object sender, EventArgs e)
{
new InstallToolsCommand(Program.MainWindow, source, this).Execute();
}
private void updatePowerState()
{
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
Host host = source.Connection.Resolve<Host>(source.resident_on);
if (host == null)
@ -674,7 +679,7 @@ namespace XenAdmin.ConsoleView
private void hideTopBarContents()
{
VMPowerOff();
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
log.DebugFormat("'{0}' console: Hide top bar contents, server is unavailable", source.Name);
DisablePowerStateLabel(Messages.CONSOLE_HOST_DEAD);
@ -767,17 +772,6 @@ namespace XenAdmin.ConsoleView
}
}
public bool isPaused
{
get
{
if (vncScreen != null && !isFullscreen)
return vncScreen.wasPaused;
else
return false;
}
}
public void Pause()
{
if (vncScreen != null && !isFullscreen)
@ -904,7 +898,7 @@ namespace XenAdmin.ConsoleView
int twoTimeBorderPadding = VNCGraphicsClient.BORDER_PADDING * 2;
return new Size(vncScreen.DesktopSize.Width + twoTimeBorderPadding,
vncScreen.DesktopSize.Height + buttonPanel.Height + bottomPanel.Height + twoTimeBorderPadding);
vncScreen.DesktopSize.Height + gradientPanel1.Height + tableLayoutPanel1.Height + twoTimeBorderPadding);
}
else
{
@ -1025,41 +1019,18 @@ namespace XenAdmin.ConsoleView
if (!isFullscreen)
{
if (vncScreen.showConnectionBar)
fullscreenForm = new XenAdmin.Controls.ConsoleTab.FullScreenForm(vncScreen);
else
fullscreenForm = new Form();
fullscreenForm.ShowIcon = false;
fullscreenForm.ShowInTaskbar = false;
fullscreenForm = new FullScreenForm(this);
fullscreenForm.FormClosing += delegate { toggleFullscreen(); };
fullscreenForm.FormBorderStyle = FormBorderStyle.None;
fullscreenForm.FormClosing += new FormClosingEventHandler(
delegate(Object o, FormClosingEventArgs a)
{
toggleFullscreen();
});
//fullscreenForm.Deactivate += new EventHandler(
// delegate(Object o, EventArgs e)
// {
// toggleFullscreen();
// });
if (source != null && source.Connection != null)
source.Connection.BeforeConnectionEnd += Connection_BeforeConnectionEnd;
vncScreen.Parent = fullscreenForm is Controls.ConsoleTab.FullScreenForm
? (Control) ((Controls.ConsoleTab.FullScreenForm) fullscreenForm).contentPanel
: fullscreenForm;
fullscreenForm.AttachVncScreen(vncScreen);
vncScreen.DisplayFocusRectangle = false;
Screen screen = Screen.FromControl(this);
fullscreenForm.StartPosition = FormStartPosition.Manual;
fullscreenForm.Location = screen.WorkingArea.Location;
fullscreenForm.Size = screen.Bounds.Size;
fullscreenHint = new Controls.ConsoleTab.FullScreenHint(GetFullScreenMessage());
fullscreenHint.Show(fullscreenForm);
fullscreenHint = new FullScreenHint();
fullscreenForm.Show();
fullscreenHint.Show(fullscreenForm);
FocusVNC();
vncScreen.CaptureKeyboardAndMouse();
@ -1069,6 +1040,7 @@ namespace XenAdmin.ConsoleView
if (source != null && source.Connection != null)
source.Connection.BeforeConnectionEnd -= Connection_BeforeConnectionEnd;
fullscreenForm.DetachVncScreen(vncScreen);
vncScreen.Parent = this.contentPanel;
vncScreen.DisplayFocusRectangle = true;
FocusVNC();
@ -1089,20 +1061,6 @@ namespace XenAdmin.ConsoleView
fullscreenForm.Refresh();
}
string GetFullScreenMessage()
{
switch (Properties.Settings.Default.FullScreenShortcutKey)
{
case 0:
return Messages.VNC_FULLSCREEN_MESSAGE_CTRL_ALT;
case 1:
return Messages.VNC_FULLSCREEN_MESSAGE_CTRL_ALT_F;
case 2:
return Messages.VNC_FULLSCREEN_MESSAGE_F12;
default:
return Messages.VNC_FULLSCREEN_MESSAGE_CTRL_ENTER;
}
}
void Connection_BeforeConnectionEnd(object sender, EventArgs e)
{
Program.Invoke(this, toggleFullscreen);
@ -1200,12 +1158,16 @@ namespace XenAdmin.ConsoleView
if (CanEnableRDPOnCreamOrGreater(source.Connection))
{
ThreeButtonDialog d = new ThreeButtonDialog(
DialogResult dialogResult;
using (ThreeButtonDialog dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(System.Drawing.SystemIcons.Question, Messages.FORCE_ENABLE_RDP),
"EnableRDPonVM",
"EnableRDPonVM",
new ThreeButtonDialog.TBDButton(Messages.YES, DialogResult.Yes),
new ThreeButtonDialog.TBDButton(Messages.NO, DialogResult.No));
if (d.ShowDialog(Program.MainWindow) == DialogResult.Yes)
new ThreeButtonDialog.TBDButton(Messages.NO, DialogResult.No)))
{
dialogResult = dlg.ShowDialog(Program.MainWindow);
}
if (dialogResult == DialogResult.Yes)
{
Session session = source.Connection.DuplicateSession();
Dictionary<string, string> _arguments = new Dictionary<string, string>();
@ -1411,7 +1373,7 @@ namespace XenAdmin.ConsoleView
ContextMenuItemCollection contextMenuItems = new ContextMenuItemCollection();
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
// We're looking at the host console
if (host.Connection.IsConnected)
@ -1437,7 +1399,7 @@ namespace XenAdmin.ConsoleView
public void showHeaderBar(bool showHeaderBar, bool showLifecycleIcon)
{
panel2.Visible = showHeaderBar;
gradientPanel1.Visible = showHeaderBar;
pictureBox1.Visible = showLifecycleIcon;
}
@ -1516,10 +1478,9 @@ namespace XenAdmin.ConsoleView
inToogleConsoleFocus = false;
}
internal void ShowGpuWarningIfRequired()
private void ShowGpuWarningIfRequired(bool mustConnectRemoteDesktop)
{
dedicatedGpuWarning.Visible = vncScreen != null && (vncScreen.UseVNC || string.IsNullOrEmpty(vncScreen.rdpIP)) &&
vncScreen.Source.HasGPUPassthrough && vncScreen.Source.power_state == vm_power_state.Running;
dedicatedGpuWarning.Visible = mustConnectRemoteDesktop;
}
internal bool IsVNC
@ -1544,7 +1505,10 @@ namespace XenAdmin.ConsoleView
{
log.Error("Error starting PuTTY.", ex);
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Error, Messages.ERROR_PUTTY_LAUNCHING, Messages.XENCENTER)).ShowDialog(Parent);
using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Error, Messages.ERROR_PUTTY_LAUNCHING, Messages.XENCENTER)))
{
dlg.ShowDialog(Parent);
}
}
}
}
@ -1571,7 +1535,7 @@ namespace XenAdmin.ConsoleView
if (source.IsWindows)
return false;
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
Host host = source.Connection.Resolve<Host>(source.resident_on);
if (host == null)

View File

@ -117,11 +117,318 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<data name="gradientPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<data name="sendCAD.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="sendCAD.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<data name="sendCAD.Location" type="System.Drawing.Point, System.Drawing">
<value>2, 2</value>
</data>
<data name="sendCAD.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="sendCAD.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="sendCAD.Size" type="System.Drawing.Size, System.Drawing">
<value>209, 30</value>
</data>
<data name="sendCAD.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="sendCAD.Text" xml:space="preserve">
<value>Ctrl+Alt+Del の送信(&amp;A) (Ctrl+Alt+Ins)</value>
</data>
<data name="&gt;&gt;sendCAD.Name" xml:space="preserve">
<value>sendCAD</value>
</data>
<data name="&gt;&gt;sendCAD.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;sendCAD.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;sendCAD.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="contentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="contentPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 105</value>
</data>
<data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 400</value>
</data>
<data name="contentPanel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<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>5</value>
</data>
<data name="scaleCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="scaleCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="scaleCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="scaleCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>433, 8</value>
</data>
<data name="scaleCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="scaleCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 17</value>
</data>
<data name="scaleCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="scaleCheckBox.Text" xml:space="preserve">
<value>ウィンドウに合わせる(&amp;E)</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Name" xml:space="preserve">
<value>scaleCheckBox</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;scaleCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="fullscreenButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fullscreenButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="fullscreenButton.Location" type="System.Drawing.Point, System.Drawing">
<value>578, 2</value>
</data>
<data name="fullscreenButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="fullscreenButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>114, 30</value>
</data>
<data name="fullscreenButton.Size" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="fullscreenButton.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="fullscreenButton.Text" xml:space="preserve">
<value>全画面(&amp;C) (Ctrl+Alt)</value>
</data>
<data name="&gt;&gt;fullscreenButton.Name" xml:space="preserve">
<value>fullscreenButton</value>
</data>
<data name="&gt;&gt;fullscreenButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fullscreenButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fullscreenButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="dockButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="dockButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="dockButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="dockButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dockButton.Location" type="System.Drawing.Point, System.Drawing">
<value>489, 2</value>
</data>
<data name="dockButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="dockButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="dockButton.Text" xml:space="preserve">
<value>切り離す(&amp;U)</value>
</data>
<data name="dockButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="dockButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;dockButton.Name" xml:space="preserve">
<value>dockButton</value>
</data>
<data name="&gt;&gt;dockButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dockButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dockButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 505</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="tableLayoutPanel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>320, 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>703, 34</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="sendCAD" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="scaleCheckBox" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="fullscreenButton" Row="0" RowSpan="1" Column="4" ColumnSpan="1" />&lt;Control Name="dockButton" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,16" />&lt;Rows Styles="Percent,100" />&lt;/TableLayoutSettings></value>
</data>
<metadata name="tip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="LifeCycleMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>81, 17</value>
</metadata>
<data name="LifeCycleMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 4</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Name" xml:space="preserve">
<value>LifeCycleMenuStrip</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="powerStateLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="powerStateLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="powerStateLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="powerStateLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
</data>
<data name="powerStateLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="powerStateLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="powerStateLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;powerStateLabel.Name" xml:space="preserve">
<value>powerStateLabel</value>
</data>
<data name="&gt;&gt;powerStateLabel.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="&gt;&gt;powerStateLabel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;powerStateLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dedicatedGpuWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="dedicatedGpuWarning.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="dedicatedGpuWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dedicatedGpuWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 71</value>
</data>
<data name="dedicatedGpuWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="dedicatedGpuWarning.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
<value>この VM にはパススルー GPU が割り当てられているため、リモート デスクトップで接続する必要があります。</value>
</data>
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.Name" xml:space="preserve">
<value>dedicatedGpuWarning</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.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="&gt;&gt;dedicatedGpuWarning.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>5</value>
</data>
@ -131,7 +438,6 @@
<data name="HostLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<data name="HostLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 11.25pt</value>
</data>
@ -139,13 +445,13 @@
<value>NoControl</value>
</data>
<data name="HostLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>3, 0</value>
</data>
<data name="HostLabel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 0, 0, 0</value>
</data>
<data name="HostLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
<value>8, 37</value>
</data>
<data name="HostLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -187,14 +493,11 @@
<value>114, 23</value>
</data>
<data name="buttonSSH.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>2</value>
</data>
<data name="buttonSSH.Text" xml:space="preserve">
<value>SSH コンソールを開く</value>
</data>
<metadata name="tip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="&gt;&gt;buttonSSH.Name" xml:space="preserve">
<value>buttonSSH</value>
</data>
@ -223,10 +526,10 @@
<value>3, 6, 6, 6</value>
</data>
<data name="toggleConsoleButton.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 24</value>
<value>175, 24</value>
</data>
<data name="toggleConsoleButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>3</value>
</data>
<data name="toggleConsoleButton.Text" xml:space="preserve">
<value>ゲスト コンソールの検索中...</value>
@ -250,16 +553,16 @@
<value>Fill</value>
</data>
<data name="multipleDvdIsoList1.Location" type="System.Drawing.Point, System.Drawing">
<value>33, 3</value>
<value>47, 3</value>
</data>
<data name="multipleDvdIsoList1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 12, 3</value>
</data>
<data name="multipleDvdIsoList1.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 31</value>
<value>337, 31</value>
</data>
<data name="multipleDvdIsoList1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;multipleDvdIsoList1.Name" xml:space="preserve">
<value>multipleDvdIsoList1</value>
@ -283,7 +586,7 @@
<value>NoControl</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 1</value>
<value>15, 1</value>
</data>
<data name="pictureBox1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>1, 1, 1, 1</value>
@ -331,7 +634,7 @@
<value>703, 37</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -346,7 +649,10 @@
<value>0</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="HostLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="buttonSSH" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;Control Name="toggleConsoleButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" />&lt;Control Name="multipleDvdIsoList1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" />&lt;Rows Styles="Percent,100,Absolute,37" />&lt;/TableLayoutSettings></value>
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="HostLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="buttonSSH" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;Control Name="toggleConsoleButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" />&lt;Control Name="multipleDvdIsoList1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" />&lt;Rows Styles="Percent,100,Absolute,100" />&lt;/TableLayoutSettings></value>
</data>
<data name="gradientPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="gradientPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
@ -355,7 +661,7 @@
<value>703, 37</value>
</data>
<data name="gradientPanel1.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
<value>0</value>
</data>
<data name="&gt;&gt;gradientPanel1.Name" xml:space="preserve">
<value>gradientPanel1</value>
@ -364,413 +670,11 @@
<value>XenAdmin.Controls.GradientPanel.GradientPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gradientPanel1.Parent" xml:space="preserve">
<value>buttonPanel</value>
<value>$this</value>
</data>
<data name="&gt;&gt;gradientPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="buttonPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="buttonPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
</data>
<data name="buttonPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;buttonPanel.Name" xml:space="preserve">
<value>buttonPanel</value>
</data>
<data name="&gt;&gt;buttonPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonPanel.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;buttonPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="sendCAD.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="sendCAD.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="sendCAD.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="sendCAD.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="sendCAD.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="sendCAD.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="sendCAD.Size" type="System.Drawing.Size, System.Drawing">
<value>224, 30</value>
</data>
<data name="sendCAD.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="sendCAD.Text" xml:space="preserve">
<value>Ctrl+Alt+Del の送信(&amp;A) (Ctrl+Alt+Ins)</value>
</data>
<data name="&gt;&gt;sendCAD.Name" xml:space="preserve">
<value>sendCAD</value>
</data>
<data name="&gt;&gt;sendCAD.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;sendCAD.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;sendCAD.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="contentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="contentPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 105</value>
</data>
<data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 398</value>
</data>
<data name="contentPanel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="groupBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>574, 9</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>2, 17</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>XenAdmin.Controls.DecentGroupBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="scaleCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Right</value>
</data>
<data name="scaleCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="scaleCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="scaleCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>367, 7</value>
</data>
<data name="scaleCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>136, 21</value>
</data>
<data name="scaleCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="scaleCheckBox.Text" xml:space="preserve">
<value>ウィンドウに合わせる(&amp;E)</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Name" xml:space="preserve">
<value>scaleCheckBox</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;scaleCheckBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="fullscreenButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="fullscreenButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fullscreenButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="fullscreenButton.Location" type="System.Drawing.Point, System.Drawing">
<value>582, 3</value>
</data>
<data name="fullscreenButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>114, 30</value>
</data>
<data name="fullscreenButton.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 30</value>
</data>
<data name="fullscreenButton.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="fullscreenButton.Text" xml:space="preserve">
<value>全画面(&amp;C) (Ctrl+Alt)</value>
</data>
<data name="&gt;&gt;fullscreenButton.Name" xml:space="preserve">
<value>fullscreenButton</value>
</data>
<data name="&gt;&gt;fullscreenButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fullscreenButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fullscreenButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dockButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="dockButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="dockButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="dockButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="dockButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dockButton.Location" type="System.Drawing.Point, System.Drawing">
<value>483, 3</value>
</data>
<data name="dockButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 27</value>
</data>
<data name="dockButton.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="dockButton.Text" xml:space="preserve">
<value>切り離す(&amp;U)</value>
</data>
<data name="dockButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="dockButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;dockButton.Name" xml:space="preserve">
<value>dockButton</value>
</data>
<data name="&gt;&gt;dockButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dockButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dockButton.ZOrder" xml:space="preserve">
<value>4</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.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>320, 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>703, 36</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="sendCAD" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="groupBox1" Row="0" RowSpan="1" Column="4" ColumnSpan="1" />&lt;Control Name="scaleCheckBox" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="fullscreenButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" />&lt;Control Name="dockButton" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" />&lt;Rows Styles="Percent,100" />&lt;/TableLayoutSettings></value>
</data>
<data name="bottomPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="bottomPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 503</value>
</data>
<data name="bottomPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 36</value>
</data>
<data name="bottomPanel.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;bottomPanel.Name" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;bottomPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bottomPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bottomPanel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<metadata name="LifeCycleMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>81, 17</value>
</metadata>
<data name="LifeCycleMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 4</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Name" xml:space="preserve">
<value>LifeCycleMenuStrip</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="panel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="panel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="powerStateLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="powerStateLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="powerStateLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="powerStateLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
</data>
<data name="powerStateLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="powerStateLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="powerStateLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;powerStateLabel.Name" xml:space="preserve">
<value>powerStateLabel</value>
</data>
<data name="&gt;&gt;powerStateLabel.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="&gt;&gt;powerStateLabel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;powerStateLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dedicatedGpuWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="dedicatedGpuWarning.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="dedicatedGpuWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dedicatedGpuWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 71</value>
</data>
<data name="dedicatedGpuWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="dedicatedGpuWarning.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
<value>この VM にはパススルー GPU が割り当てられているため、リモート デスクトップで接続する必要があります。</value>
</data>
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.Name" xml:space="preserve">
<value>dedicatedGpuWarning</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.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="&gt;&gt;dedicatedGpuWarning.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -117,11 +117,318 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="gradientPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="sendCAD.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="sendCAD.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="sendCAD.Location" type="System.Drawing.Point, System.Drawing">
<value>2, 2</value>
</data>
<data name="sendCAD.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="sendCAD.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="sendCAD.Size" type="System.Drawing.Size, System.Drawing">
<value>209, 30</value>
</data>
<data name="sendCAD.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="sendCAD.Text" xml:space="preserve">
<value>Send Ctrl+&amp;Alt+Del (Ctrl+Alt+Insert)</value>
</data>
<data name="&gt;&gt;sendCAD.Name" xml:space="preserve">
<value>sendCAD</value>
</data>
<data name="&gt;&gt;sendCAD.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;sendCAD.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;sendCAD.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="contentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="contentPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 105</value>
</data>
<data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 400</value>
</data>
<data name="contentPanel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<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>5</value>
</data>
<data name="scaleCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="scaleCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="scaleCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="scaleCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>433, 8</value>
</data>
<data name="scaleCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="scaleCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 17</value>
</data>
<data name="scaleCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="scaleCheckBox.Text" xml:space="preserve">
<value>Scal&amp;e</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Name" xml:space="preserve">
<value>scaleCheckBox</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;scaleCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="fullscreenButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fullscreenButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="fullscreenButton.Location" type="System.Drawing.Point, System.Drawing">
<value>578, 2</value>
</data>
<data name="fullscreenButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="fullscreenButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>114, 30</value>
</data>
<data name="fullscreenButton.Size" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="fullscreenButton.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="fullscreenButton.Text" xml:space="preserve">
<value>Fulls&amp;creen (Ctrl+Alt)</value>
</data>
<data name="&gt;&gt;fullscreenButton.Name" xml:space="preserve">
<value>fullscreenButton</value>
</data>
<data name="&gt;&gt;fullscreenButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fullscreenButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fullscreenButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="dockButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="dockButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="dockButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="dockButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dockButton.Location" type="System.Drawing.Point, System.Drawing">
<value>489, 2</value>
</data>
<data name="dockButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="dockButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="dockButton.Text" xml:space="preserve">
<value>&amp;Undock</value>
</data>
<data name="dockButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="dockButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;dockButton.Name" xml:space="preserve">
<value>dockButton</value>
</data>
<data name="&gt;&gt;dockButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dockButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dockButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 505</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="tableLayoutPanel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>320, 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>703, 34</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="sendCAD" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="scaleCheckBox" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="fullscreenButton" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="dockButton" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,16" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="tip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="LifeCycleMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>81, 17</value>
</metadata>
<data name="LifeCycleMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 4</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Name" xml:space="preserve">
<value>LifeCycleMenuStrip</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="powerStateLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="powerStateLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="powerStateLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="powerStateLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
</data>
<data name="powerStateLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="powerStateLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="powerStateLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;powerStateLabel.Name" xml:space="preserve">
<value>powerStateLabel</value>
</data>
<data name="&gt;&gt;powerStateLabel.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="&gt;&gt;powerStateLabel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;powerStateLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dedicatedGpuWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="dedicatedGpuWarning.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="dedicatedGpuWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dedicatedGpuWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 71</value>
</data>
<data name="dedicatedGpuWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="dedicatedGpuWarning.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
<value>This VM has a pass-through GPU assigned. You must connect to it using Remote Desktop.</value>
</data>
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.Name" xml:space="preserve">
<value>dedicatedGpuWarning</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.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="&gt;&gt;dedicatedGpuWarning.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>5</value>
</data>
@ -131,7 +438,6 @@
<data name="HostLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="HostLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 11.25pt</value>
</data>
@ -187,14 +493,11 @@
<value>114, 23</value>
</data>
<data name="buttonSSH.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>2</value>
</data>
<data name="buttonSSH.Text" xml:space="preserve">
<value>Open SSH Console</value>
</data>
<metadata name="tip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="&gt;&gt;buttonSSH.Name" xml:space="preserve">
<value>buttonSSH</value>
</data>
@ -226,7 +529,7 @@
<value>175, 24</value>
</data>
<data name="toggleConsoleButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>3</value>
</data>
<data name="toggleConsoleButton.Text" xml:space="preserve">
<value>Looking for guest console...</value>
@ -259,7 +562,7 @@
<value>337, 31</value>
</data>
<data name="multipleDvdIsoList1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;multipleDvdIsoList1.Name" xml:space="preserve">
<value>multipleDvdIsoList1</value>
@ -331,7 +634,7 @@
<value>703, 37</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -346,7 +649,10 @@
<value>0</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="HostLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="buttonSSH" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="toggleConsoleButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="multipleDvdIsoList1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,100,Absolute,37" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="HostLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="buttonSSH" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="toggleConsoleButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="multipleDvdIsoList1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,100,Absolute,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="gradientPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="gradientPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
@ -355,7 +661,7 @@
<value>703, 37</value>
</data>
<data name="gradientPanel1.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
<value>0</value>
</data>
<data name="&gt;&gt;gradientPanel1.Name" xml:space="preserve">
<value>gradientPanel1</value>
@ -364,413 +670,11 @@
<value>XenAdmin.Controls.GradientPanel.GradientPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gradientPanel1.Parent" xml:space="preserve">
<value>buttonPanel</value>
<value>$this</value>
</data>
<data name="&gt;&gt;gradientPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="buttonPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="buttonPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
</data>
<data name="buttonPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;buttonPanel.Name" xml:space="preserve">
<value>buttonPanel</value>
</data>
<data name="&gt;&gt;buttonPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonPanel.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;buttonPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="sendCAD.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="sendCAD.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="sendCAD.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="sendCAD.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="sendCAD.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="sendCAD.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="sendCAD.Size" type="System.Drawing.Size, System.Drawing">
<value>209, 30</value>
</data>
<data name="sendCAD.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="sendCAD.Text" xml:space="preserve">
<value>Send Ctrl+&amp;Alt+Del (Ctrl+Alt+Insert)</value>
</data>
<data name="&gt;&gt;sendCAD.Name" xml:space="preserve">
<value>sendCAD</value>
</data>
<data name="&gt;&gt;sendCAD.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;sendCAD.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;sendCAD.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="contentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="contentPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 105</value>
</data>
<data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 398</value>
</data>
<data name="contentPanel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="groupBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>574, 9</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>2, 17</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>XenAdmin.Controls.DecentGroupBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="scaleCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Right</value>
</data>
<data name="scaleCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="scaleCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="scaleCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>425, 9</value>
</data>
<data name="scaleCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 17</value>
</data>
<data name="scaleCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="scaleCheckBox.Text" xml:space="preserve">
<value>Scal&amp;e</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Name" xml:space="preserve">
<value>scaleCheckBox</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;scaleCheckBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="fullscreenButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="fullscreenButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fullscreenButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="fullscreenButton.Location" type="System.Drawing.Point, System.Drawing">
<value>582, 3</value>
</data>
<data name="fullscreenButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>114, 30</value>
</data>
<data name="fullscreenButton.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 30</value>
</data>
<data name="fullscreenButton.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="fullscreenButton.Text" xml:space="preserve">
<value>Fulls&amp;creen (Ctrl+Alt)</value>
</data>
<data name="&gt;&gt;fullscreenButton.Name" xml:space="preserve">
<value>fullscreenButton</value>
</data>
<data name="&gt;&gt;fullscreenButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fullscreenButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fullscreenButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dockButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="dockButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="dockButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="dockButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="dockButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dockButton.Location" type="System.Drawing.Point, System.Drawing">
<value>483, 3</value>
</data>
<data name="dockButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="dockButton.Text" xml:space="preserve">
<value>&amp;Undock</value>
</data>
<data name="dockButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="dockButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;dockButton.Name" xml:space="preserve">
<value>dockButton</value>
</data>
<data name="&gt;&gt;dockButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dockButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dockButton.ZOrder" xml:space="preserve">
<value>4</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.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>320, 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>703, 36</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="sendCAD" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="groupBox1" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="scaleCheckBox" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="fullscreenButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="dockButton" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="bottomPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="bottomPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 503</value>
</data>
<data name="bottomPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 36</value>
</data>
<data name="bottomPanel.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;bottomPanel.Name" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;bottomPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bottomPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bottomPanel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<metadata name="LifeCycleMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>81, 17</value>
</metadata>
<data name="LifeCycleMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 4</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Name" xml:space="preserve">
<value>LifeCycleMenuStrip</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="panel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="panel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="powerStateLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="powerStateLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="powerStateLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="powerStateLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
</data>
<data name="powerStateLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="powerStateLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="powerStateLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;powerStateLabel.Name" xml:space="preserve">
<value>powerStateLabel</value>
</data>
<data name="&gt;&gt;powerStateLabel.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="&gt;&gt;powerStateLabel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;powerStateLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dedicatedGpuWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="dedicatedGpuWarning.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="dedicatedGpuWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dedicatedGpuWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 71</value>
</data>
<data name="dedicatedGpuWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="dedicatedGpuWarning.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
<value>This VM has a pass-through GPU assigned. You must connect to it using Remote Desktop.</value>
</data>
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.Name" xml:space="preserve">
<value>dedicatedGpuWarning</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.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="&gt;&gt;dedicatedGpuWarning.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -117,11 +117,318 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<data name="gradientPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<data name="sendCAD.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="sendCAD.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<data name="sendCAD.Location" type="System.Drawing.Point, System.Drawing">
<value>2, 2</value>
</data>
<data name="sendCAD.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="sendCAD.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="sendCAD.Size" type="System.Drawing.Size, System.Drawing">
<value>209, 30</value>
</data>
<data name="sendCAD.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="sendCAD.Text" xml:space="preserve">
<value>发送 Ctrl+Alt+Del(&amp;A) (Ctrl+Alt+Insert)</value>
</data>
<data name="&gt;&gt;sendCAD.Name" xml:space="preserve">
<value>sendCAD</value>
</data>
<data name="&gt;&gt;sendCAD.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;sendCAD.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;sendCAD.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="contentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="contentPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 105</value>
</data>
<data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 400</value>
</data>
<data name="contentPanel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<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>5</value>
</data>
<data name="scaleCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="scaleCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="scaleCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="scaleCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>433, 8</value>
</data>
<data name="scaleCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="scaleCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 17</value>
</data>
<data name="scaleCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="scaleCheckBox.Text" xml:space="preserve">
<value>缩放(&amp;E)</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Name" xml:space="preserve">
<value>scaleCheckBox</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;scaleCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="fullscreenButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fullscreenButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="fullscreenButton.Location" type="System.Drawing.Point, System.Drawing">
<value>578, 2</value>
</data>
<data name="fullscreenButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="fullscreenButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>114, 30</value>
</data>
<data name="fullscreenButton.Size" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="fullscreenButton.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="fullscreenButton.Text" xml:space="preserve">
<value>全屏(&amp;C) (Ctrl+Alt)</value>
</data>
<data name="&gt;&gt;fullscreenButton.Name" xml:space="preserve">
<value>fullscreenButton</value>
</data>
<data name="&gt;&gt;fullscreenButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fullscreenButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fullscreenButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="dockButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="dockButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="dockButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="dockButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dockButton.Location" type="System.Drawing.Point, System.Drawing">
<value>489, 2</value>
</data>
<data name="dockButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="dockButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="dockButton.Text" xml:space="preserve">
<value>取消停靠(&amp;U)</value>
</data>
<data name="dockButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="dockButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;dockButton.Name" xml:space="preserve">
<value>dockButton</value>
</data>
<data name="&gt;&gt;dockButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dockButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dockButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 505</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="tableLayoutPanel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>320, 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>703, 34</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="sendCAD" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="scaleCheckBox" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="fullscreenButton" Row="0" RowSpan="1" Column="4" ColumnSpan="1" />&lt;Control Name="dockButton" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,16" />&lt;Rows Styles="Percent,100" />&lt;/TableLayoutSettings></value>
</data>
<metadata name="tip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="LifeCycleMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>81, 17</value>
</metadata>
<data name="LifeCycleMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 4</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Name" xml:space="preserve">
<value>LifeCycleMenuStrip</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="powerStateLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="powerStateLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="powerStateLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="powerStateLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
</data>
<data name="powerStateLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="powerStateLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="powerStateLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;powerStateLabel.Name" xml:space="preserve">
<value>powerStateLabel</value>
</data>
<data name="&gt;&gt;powerStateLabel.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="&gt;&gt;powerStateLabel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;powerStateLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dedicatedGpuWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="dedicatedGpuWarning.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="dedicatedGpuWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dedicatedGpuWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 71</value>
</data>
<data name="dedicatedGpuWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="dedicatedGpuWarning.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
<value>此 VM 分配有直通 GPU。必须使用远程桌面进行连接。</value>
</data>
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.Name" xml:space="preserve">
<value>dedicatedGpuWarning</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.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="&gt;&gt;dedicatedGpuWarning.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>5</value>
</data>
@ -131,7 +438,6 @@
<data name="HostLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<data name="HostLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 11.25pt</value>
</data>
@ -139,13 +445,13 @@
<value>NoControl</value>
</data>
<data name="HostLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>3, 0</value>
</data>
<data name="HostLabel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 0, 0, 0</value>
</data>
<data name="HostLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
<value>8, 37</value>
</data>
<data name="HostLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -187,14 +493,11 @@
<value>114, 23</value>
</data>
<data name="buttonSSH.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>2</value>
</data>
<data name="buttonSSH.Text" xml:space="preserve">
<value>打开 SSH 控制台</value>
</data>
<metadata name="tip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="&gt;&gt;buttonSSH.Name" xml:space="preserve">
<value>buttonSSH</value>
</data>
@ -226,7 +529,7 @@
<value>175, 24</value>
</data>
<data name="toggleConsoleButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>3</value>
</data>
<data name="toggleConsoleButton.Text" xml:space="preserve">
<value>正在查找来宾控制台...</value>
@ -250,16 +553,16 @@
<value>Fill</value>
</data>
<data name="multipleDvdIsoList1.Location" type="System.Drawing.Point, System.Drawing">
<value>33, 3</value>
<value>47, 3</value>
</data>
<data name="multipleDvdIsoList1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 12, 3</value>
</data>
<data name="multipleDvdIsoList1.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 31</value>
<value>337, 31</value>
</data>
<data name="multipleDvdIsoList1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;multipleDvdIsoList1.Name" xml:space="preserve">
<value>multipleDvdIsoList1</value>
@ -283,7 +586,7 @@
<value>NoControl</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 1</value>
<value>15, 1</value>
</data>
<data name="pictureBox1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>1, 1, 1, 1</value>
@ -331,7 +634,7 @@
<value>703, 37</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -346,7 +649,10 @@
<value>0</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="HostLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="buttonSSH" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;Control Name="toggleConsoleButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" />&lt;Control Name="multipleDvdIsoList1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" />&lt;Rows Styles="Percent,100,Absolute,37" />&lt;/TableLayoutSettings></value>
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="HostLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="buttonSSH" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;Control Name="toggleConsoleButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" />&lt;Control Name="multipleDvdIsoList1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" />&lt;Rows Styles="Percent,100,Absolute,100" />&lt;/TableLayoutSettings></value>
</data>
<data name="gradientPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="gradientPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
@ -355,7 +661,7 @@
<value>703, 37</value>
</data>
<data name="gradientPanel1.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
<value>0</value>
</data>
<data name="&gt;&gt;gradientPanel1.Name" xml:space="preserve">
<value>gradientPanel1</value>
@ -364,413 +670,11 @@
<value>XenAdmin.Controls.GradientPanel.GradientPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gradientPanel1.Parent" xml:space="preserve">
<value>buttonPanel</value>
<value>$this</value>
</data>
<data name="&gt;&gt;gradientPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buttonPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="buttonPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="buttonPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
</data>
<data name="buttonPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;buttonPanel.Name" xml:space="preserve">
<value>buttonPanel</value>
</data>
<data name="&gt;&gt;buttonPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonPanel.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;buttonPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="sendCAD.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="sendCAD.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="sendCAD.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="sendCAD.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="sendCAD.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="sendCAD.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>123, 30</value>
</data>
<data name="sendCAD.Size" type="System.Drawing.Size, System.Drawing">
<value>209, 30</value>
</data>
<data name="sendCAD.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="sendCAD.Text" xml:space="preserve">
<value>发送 Ctrl+Alt+Del(&amp;A) (Ctrl+Alt+Insert)</value>
</data>
<data name="&gt;&gt;sendCAD.Name" xml:space="preserve">
<value>sendCAD</value>
</data>
<data name="&gt;&gt;sendCAD.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;sendCAD.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;sendCAD.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="contentPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="contentPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 105</value>
</data>
<data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 398</value>
</data>
<data name="contentPanel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
<value>contentPanel</value>
</data>
<data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="groupBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>574, 9</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>2, 17</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>XenAdmin.Controls.DecentGroupBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="scaleCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Right</value>
</data>
<data name="scaleCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="scaleCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="scaleCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>457, 7</value>
</data>
<data name="scaleCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 21</value>
</data>
<data name="scaleCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="scaleCheckBox.Text" xml:space="preserve">
<value>缩放(&amp;E)</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Name" xml:space="preserve">
<value>scaleCheckBox</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scaleCheckBox.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;scaleCheckBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="fullscreenButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="fullscreenButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="fullscreenButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="fullscreenButton.Location" type="System.Drawing.Point, System.Drawing">
<value>582, 3</value>
</data>
<data name="fullscreenButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>114, 30</value>
</data>
<data name="fullscreenButton.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 30</value>
</data>
<data name="fullscreenButton.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="fullscreenButton.Text" xml:space="preserve">
<value>全屏(&amp;C) (Ctrl+Alt)</value>
</data>
<data name="&gt;&gt;fullscreenButton.Name" xml:space="preserve">
<value>fullscreenButton</value>
</data>
<data name="&gt;&gt;fullscreenButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;fullscreenButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;fullscreenButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dockButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="dockButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="dockButton.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="dockButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="dockButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dockButton.Location" type="System.Drawing.Point, System.Drawing">
<value>483, 3</value>
</data>
<data name="dockButton.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>85, 30</value>
</data>
<data name="dockButton.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 27</value>
</data>
<data name="dockButton.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="dockButton.Text" xml:space="preserve">
<value>取消停靠(&amp;U)</value>
</data>
<data name="dockButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="dockButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageBeforeText</value>
</data>
<data name="&gt;&gt;dockButton.Name" xml:space="preserve">
<value>dockButton</value>
</data>
<data name="&gt;&gt;dockButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dockButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dockButton.ZOrder" xml:space="preserve">
<value>4</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.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>320, 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>703, 36</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?>&lt;TableLayoutSettings>&lt;Controls>&lt;Control Name="sendCAD" Row="0" RowSpan="1" Column="0" ColumnSpan="1" />&lt;Control Name="groupBox1" Row="0" RowSpan="1" Column="4" ColumnSpan="1" />&lt;Control Name="scaleCheckBox" Row="0" RowSpan="1" Column="2" ColumnSpan="1" />&lt;Control Name="fullscreenButton" Row="0" RowSpan="1" Column="5" ColumnSpan="1" />&lt;Control Name="dockButton" Row="0" RowSpan="1" Column="3" ColumnSpan="1" />&lt;/Controls>&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" />&lt;Rows Styles="Percent,100" />&lt;/TableLayoutSettings></value>
</data>
<data name="bottomPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="bottomPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 503</value>
</data>
<data name="bottomPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 36</value>
</data>
<data name="bottomPanel.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;bottomPanel.Name" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;bottomPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bottomPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bottomPanel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<metadata name="LifeCycleMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>81, 17</value>
</metadata>
<data name="LifeCycleMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 4</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Name" xml:space="preserve">
<value>LifeCycleMenuStrip</value>
</data>
<data name="&gt;&gt;LifeCycleMenuStrip.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="panel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="panel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 37</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="powerStateLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="powerStateLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="powerStateLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="powerStateLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
</data>
<data name="powerStateLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="powerStateLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="powerStateLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;powerStateLabel.Name" xml:space="preserve">
<value>powerStateLabel</value>
</data>
<data name="&gt;&gt;powerStateLabel.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="&gt;&gt;powerStateLabel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;powerStateLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="dedicatedGpuWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="dedicatedGpuWarning.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt, style=Bold</value>
</data>
<data name="dedicatedGpuWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="dedicatedGpuWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 71</value>
</data>
<data name="dedicatedGpuWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>703, 34</value>
</data>
<data name="dedicatedGpuWarning.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="dedicatedGpuWarning.Text" xml:space="preserve">
<value>此 VM 分配有直通 GPU。必须使用远程桌面进行连接。</value>
</data>
<data name="dedicatedGpuWarning.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.Name" xml:space="preserve">
<value>dedicatedGpuWarning</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.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="&gt;&gt;dedicatedGpuWarning.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;dedicatedGpuWarning.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -42,7 +42,7 @@ namespace XenAdmin.ConsoleView
public partial class VNCView : UserControl
{
private readonly VM source;
public readonly VNCTabView vncTabView;
private readonly VNCTabView vncTabView;
public Form undockedForm = null;
public bool isDocked
@ -53,14 +53,6 @@ namespace XenAdmin.ConsoleView
}
}
public bool isPaused
{
get
{
return vncTabView.isPaused;
}
}
public void Pause()
{
if (vncTabView != null && isDocked)
@ -78,10 +70,9 @@ namespace XenAdmin.ConsoleView
Program.AssertOnEventThread();
this.source = source;
this.vncTabView = new VNCTabView(this, source, elevatedUsername, elevatedPassword);
this.vncTabView = new VNCTabView(this, source, elevatedUsername, elevatedPassword) {Dock = DockStyle.Fill};
InitializeComponent();
this.Dock = DockStyle.Fill;
this.Controls.Add(this.vncTabView);
}
@ -128,7 +119,7 @@ namespace XenAdmin.ConsoleView
this.Controls.Remove(vncTabView);
undockedForm.Controls.Add(vncTabView);
oldScaledSetting = vncTabView.scaleCheckBox.Checked;
oldScaledSetting = vncTabView.IsScaled;
vncTabView.showHeaderBar(!source.is_control_domain, true);
@ -144,15 +135,13 @@ namespace XenAdmin.ConsoleView
}
undockedForm.HelpButton = true;
//undockedForm.MinimizeBox = false;
//undockedForm.MaximizeBox = false;
undockedForm.HelpButtonClicked += undockedForm_HelpButtonClicked;
undockedForm.HelpRequested += undockedForm_HelpRequested;
undockedForm.Show();
if(Properties.Settings.Default.PreserveScaleWhenUndocked)
vncTabView.scaleCheckBox.Checked = oldScaledSetting;
vncTabView.IsScaled = oldScaledSetting;
this.reattachConsoleButton.Show();
this.findConsoleButton.Show();
@ -164,7 +153,7 @@ namespace XenAdmin.ConsoleView
this.oldUndockedSize = undockedForm.Size;
if (!Properties.Settings.Default.PreserveScaleWhenUndocked)
vncTabView.scaleCheckBox.Checked = oldScaledSetting;
vncTabView.IsScaled = oldScaledSetting;
this.reattachConsoleButton.Hide();
this.findConsoleButton.Hide();
@ -192,7 +181,10 @@ namespace XenAdmin.ConsoleView
if (source.is_control_domain)
{
Host host = source.Connection.Resolve(source.resident_on);
return host == null ? source.Name : string.Format(Messages.CONSOLE_HOST, host.Name);
if (host == null)
return source.Name;
return string.Format(source.IsControlDomainZero ? Messages.CONSOLE_HOST : Messages.CONSOLE_HOST_NUTANIX, host.Name);
}
else
{

View File

@ -71,7 +71,6 @@ namespace XenAdmin.ConsoleView
private volatile bool useVNC = true;
private bool autoCaptureKeyboardAndMouse = true;
internal bool showConnectionBar = true;
private readonly Color focusColor = SystemColors.MenuHighlight;
@ -114,6 +113,8 @@ namespace XenAdmin.ConsoleView
public event EventHandler UserCancelledAuth;
public event EventHandler VncConnectionAttemptCancelled;
public event Action<bool> GpuStatusChanged;
public event Action<string> ConnectionNameChanged;
internal readonly VNCTabView parentVNCTabView;
@ -225,7 +226,7 @@ namespace XenAdmin.ConsoleView
return true;
}
public bool wasPaused = true;
private bool wasPaused = true;
public void Pause()
{
@ -352,32 +353,45 @@ namespace XenAdmin.ConsoleView
if (networks == null)
return null;
List<string> ipAddresses = new List<string>();
List<string> ipAddresses = new List<string>();
List<string> ipv6Addresses = new List<string>();
List<string> ipAddressesForNetworksWithoutPifs = new List<string>();
List<string> ipv6AddressesForNetworksWithoutPifs = new List<string>();
foreach (VIF vif in vm.Connection.ResolveAll(vm.VIFs))
{
XenAPI.Network network = vif.Connection.Resolve(vif.network);
XenAPI.Host host = vm.Connection.Resolve(vm.resident_on);
XenAPI.PIF pif = Helpers.FindPIF(network, host);
if (pif != null && pif.LinkStatus == PIF.LinkState.Connected)
Host host = vm.Connection.Resolve(vm.resident_on);
PIF pif = Helpers.FindPIF(network, host);
foreach (var networkInfo in networks.Where(n => n.Key.StartsWith(String.Format("{0}/ip", vif.device))))
{
foreach (var networkInfo in networks.Where(n => n.Key.StartsWith(String.Format("{0}/ip", vif.device))))
if (networkInfo.Key.EndsWith("ip")) // IPv4 address
{
if (networkInfo.Key.EndsWith("ip")) // IPv4 address
if (pif == null)
ipAddressesForNetworksWithoutPifs.Add(networkInfo.Value);
else if (pif.LinkStatus == PIF.LinkState.Connected)
ipAddresses.Add(networkInfo.Value);
else
}
else
{
if (networkInfo.Key.Contains("ipv6")) // IPv6 address, enclose in square brackets
{
if (networkInfo.Key.Contains("ipv6")) // IPv6 address, enclose in square brackets
if (pif == null)
ipv6AddressesForNetworksWithoutPifs.Add(String.Format("[{0}]", networkInfo.Value));
else if (pif.LinkStatus == PIF.LinkState.Connected)
ipv6Addresses.Add(String.Format("[{0}]", networkInfo.Value));
else
continue;
}
else
continue;
}
}
}
ipAddresses.AddRange(ipv6Addresses); // make sure IPv4 addresses are scanned first (CA-102755)
// add IP addresses for networks without PIFs
ipAddresses.AddRange(ipAddressesForNetworksWithoutPifs);
ipAddresses.AddRange(ipv6AddressesForNetworksWithoutPifs);
foreach (String ipAddress in ipAddresses)
{
@ -541,7 +555,7 @@ namespace XenAdmin.ConsoleView
if (rdpClient == null)
{
if (this.ParentForm is FullScreenForm)
oldSize = ((FullScreenForm)ParentForm).contentPanel.Size;
oldSize = ((FullScreenForm)ParentForm).GetContentSize();
this.AutoScroll = true;
this.AutoScrollMinSize = oldSize;
@ -568,7 +582,14 @@ namespace XenAdmin.ConsoleView
RemoteConsole.Activate();
}
parentVNCTabView.ShowGpuWarningIfRequired();
if (GpuStatusChanged != null)
GpuStatusChanged(MustConnectRemoteDesktop());
}
internal bool MustConnectRemoteDesktop()
{
return (UseVNC || string.IsNullOrEmpty(rdpIP)) &&
Source.HasGPUPassthrough && Source.power_state == vm_power_state.Running;
}
private void SetKeyboardAndMouseCapture(bool value)
@ -659,7 +680,7 @@ namespace XenAdmin.ConsoleView
}
}
public VM Source
private VM Source
{
get
{
@ -699,6 +720,22 @@ namespace XenAdmin.ConsoleView
}
}
public string ConnectionName
{
get
{
if (Source == null)
return null;
if (Source.IsControlDomainZero)
return string.Format(Messages.CONSOLE_HOST, Source.AffinityServerString);
if (Source.is_control_domain)
return string.Format(Messages.CONSOLE_HOST_NUTANIX, Source.AffinityServerString);
return Source.Name;
}
}
private bool InDefaultConsole()
{
@ -726,10 +763,9 @@ namespace XenAdmin.ConsoleView
{
parentVNCTabView.DisableToggleVNCButton();
}
//Start the polling again
if (Source != null && !Source.is_control_domain)
if (Source != null && !Source.IsControlDomainZero)
{
if (!Source.IsHVM)
{
@ -740,7 +776,7 @@ namespace XenAdmin.ConsoleView
connectionPoller = new Timer(PollRDPPort, null, RETRY_SLEEP_TIME, RDP_POLL_INTERVAL);
}
}
}
}
}
private void VM_PropertyChanged(object sender, PropertyChangedEventArgs e)
@ -786,7 +822,16 @@ namespace XenAdmin.ConsoleView
}
if (e.PropertyName == "power_state" || e.PropertyName == "VGPUs")
parentVNCTabView.ShowGpuWarningIfRequired();
{
Program.Invoke(this, () =>
{
if (GpuStatusChanged != null)
GpuStatusChanged(MustConnectRemoteDesktop());
});
}
if (e.PropertyName == "name_label" && ConnectionNameChanged != null)
ConnectionNameChanged(ConnectionName);
}
internal void imediatelyPollForConsole()

View File

@ -109,6 +109,7 @@ namespace XenAdmin.Controls
this.ReasonColumn});
resources.ApplyResources(this.ServersGridView, "ServersGridView");
this.ServersGridView.Name = "ServersGridView";
this.ServersGridView.VisibleChanged += new System.EventHandler(this.ServersGridView_VisibleChanged);
//
// ImageColumn
//

Some files were not shown because too many files have changed in this diff Show More