mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Tidied up: moved the full screen message from the VNCTabView class to the more relevant
FullScreenHint class. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
629c2b48d1
commit
38ca217bc3
@ -43,6 +43,7 @@ using XenAdmin.Commands;
|
||||
using XenAdmin.Dialogs;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using XenAdmin.Controls.ConsoleTab;
|
||||
|
||||
|
||||
namespace XenAdmin.ConsoleView
|
||||
@ -66,7 +67,7 @@ namespace XenAdmin.ConsoleView
|
||||
private readonly Host targetHost;
|
||||
private VM_guest_metrics guestMetrics = null;
|
||||
private Form fullscreenForm = null;
|
||||
private Form fullscreenHint = null;
|
||||
private FullScreenHint fullscreenHint;
|
||||
private Size LastDesktopSize;
|
||||
private bool switchOnTabOpened = false;
|
||||
|
||||
@ -1048,8 +1049,7 @@ namespace XenAdmin.ConsoleView
|
||||
fullscreenForm.Location = screen.WorkingArea.Location;
|
||||
fullscreenForm.Size = screen.Bounds.Size;
|
||||
|
||||
fullscreenHint = new Controls.ConsoleTab.FullScreenHint(GetFullScreenMessage());
|
||||
|
||||
fullscreenHint = new FullScreenHint();
|
||||
fullscreenHint.Show(fullscreenForm);
|
||||
fullscreenForm.Show();
|
||||
|
||||
@ -1081,20 +1081,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);
|
||||
|
@ -48,11 +48,26 @@ namespace XenAdmin.Controls.ConsoleTab
|
||||
int nHeightEllipse // width of ellipse
|
||||
);
|
||||
|
||||
public FullScreenHint(string message)
|
||||
public FullScreenHint()
|
||||
{
|
||||
InitializeComponent();
|
||||
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
|
||||
label1.Text = message;
|
||||
label1.Text = GetFullScreenMessage();
|
||||
}
|
||||
|
||||
private 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;
|
||||
}
|
||||
}
|
||||
|
||||
private void FullScreenHint_Load(object sender, EventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user