public override void ChangeDesktopSize(DesktopSize desktopSize) { Size size = DesktopSizeCalculator.GetSize(this, this.Favorite); try { switch (desktopSize) { case DesktopSize.AutoScale: case DesktopSize.FitToWindow: this.client.AdvancedSettings3.SmartSizing = true; break; case DesktopSize.FullScreen: this.client.FullScreen = true; break; } this.client.DesktopWidth = size.Width; this.client.DesktopHeight = size.Height; } catch (Exception exc) { Logging.Error("Error trying to set the desktop dimensions", exc); } }
protected override void ChangeDesktopSize(DesktopSize desktopSize, System.Drawing.Size size) { try { switch (desktopSize) { case DesktopSize.Custom: this.client.AdvancedSettings3.SmartSizing = false; this.client.FullScreen = false; break; case DesktopSize.AutoScale: case DesktopSize.FitToWindow: this.client.AdvancedSettings3.SmartSizing = true; this.client.FullScreen = false; break; case DesktopSize.FullScreen: this.client.FullScreen = true; this.client.AdvancedSettings3.SmartSizing = false; size = this.MaxSize; break; } client.InvokeIfNecessary(() => { this.client.Height = size.Height; this.client.Width = size.Width; }); } catch (Exception ex) { Log.Error("Error trying to set the desktop dimensions.", ex); } }
private static string ConvertDesktopSize(DesktopSize desktopSize) { if (desktopSize == DesktopSize.FullScreen) { return("1"); } return("0"); }
private static DesktopSize ReadDesktopSize(String str) { DesktopSize tmp = DesktopSize.AutoScale; if (!String.IsNullOrEmpty(str)) { tmp = (DesktopSize)Enum.Parse(typeof(DesktopSize), str); } return(tmp); }
internal DesktopSize ReadDesktopSize() { DesktopSize tmp = DesktopSize.AutoScale; string str = this.ReadString(); if (!String.IsNullOrEmpty(str)) { tmp = (DesktopSize)Enum.Parse(typeof(DesktopSize), str); } return(tmp); }
internal DesktopSize ReadDesktopSize() { DesktopSize tmp = DesktopSize.AutoScale; string str = this.ReadString(); try { if (!String.IsNullOrEmpty(str)) { tmp = (DesktopSize)Enum.Parse(typeof(DesktopSize), str); } } catch { // if the value is something like 768x1024 // The CodePlex Terminals holds the value 'x1024' // which is a custom value. // possible exception: // >> System.ArgumentException: Requested value 'x1024' was not found. << return(DesktopSize.Custom); } return(tmp); }
protected override void ChangeDesktopSize(DesktopSize desktopSize, System.Drawing.Size size) { }
/// <summary> /// Default empty implementation to be overriden by connection /// </summary> public virtual void ChangeDesktopSize(DesktopSize size) { }
protected override void ChangeDesktopSize(DesktopSize desktopSize, System.Drawing.Size size) { this.ResizeClient(); }
public override void ChangeDesktopSize(DesktopSize desktopSize) { Size size = ConnectionManager.GetSize(this, this.Favorite); try { switch (desktopSize) { case DesktopSize.AutoScale: case DesktopSize.FitToWindow: this.client.AdvancedSettings3.SmartSizing = true; break; case DesktopSize.FullScreen: this.client.FullScreen = true; break; } this.client.DesktopWidth = size.Width; this.client.DesktopHeight = size.Height; } catch (Exception exc) { Logging.Error("Error trying to set the desktop dimensions", exc); } }
protected abstract void ChangeDesktopSize(DesktopSize desktopSize, System.Drawing.Size size);
public static Size GetSize(ConnectionBase connection, DesktopSize desktopSize, int desktopSizeWidth, int desktopSizeHeight) { return GetSize(connection, new FavoriteConfigurationElement { DesktopSize = desktopSize, DesktopSizeWidth = desktopSizeWidth, DesktopSizeHeight = desktopSizeHeight }); }
public static Size GetSize(ConnectionBase connection, DesktopSize desktopSize, int desktopSizeWidth, int desktopSizeHeight) { return(GetSize(connection, new FavoriteConfigurationElement { DesktopSize = desktopSize, DesktopSizeWidth = desktopSizeWidth, DesktopSizeHeight = desktopSizeHeight })); }
protected override void ChangeDesktopSize(DesktopSize desktopSize, System.Drawing.Size size) { this.iIcaClient.DesiredHRes = size.Width; this.iIcaClient.DesiredVRes = size.Height; }
public static void GetSize(ref int Height, ref int Width, Connections.Connection Connection, DesktopSize Size) { switch (Size) { case DesktopSize.x640: Width = 640; Height = 480; break; case DesktopSize.x800: Width = 800; Height = 600; break; case DesktopSize.x1024: Width = 1024; Height = 768; break; case DesktopSize.x1280: Width = 1280; Height = 1024; break; case DesktopSize.FitToWindow: Width = Connection.TerminalTabPage.Width; Height = Connection.TerminalTabPage.Height; break; case DesktopSize.FullScreen: Width = Screen.FromControl(Connection).Bounds.Width; Height = Screen.FromControl(Connection).Bounds.Height - 1; break; case DesktopSize.AutoScale: Width = Screen.FromControl(Connection).Bounds.Width; Height = Screen.FromControl(Connection).Bounds.Height - 1; break; case DesktopSize.Custom: break; } int maxWidth = Settings.SupportsRDP6 ? 4096 : 1600; int maxHeight = Settings.SupportsRDP6 ? 2048 : 1200; Width = Math.Min(maxWidth, Width); Height = Math.Min(maxHeight, Height);; }
public void ChangeDesktopSize(System.Drawing.Size? size = null, DesktopSize? desktopSize = null) { if (this.Favorite == null && !desktopSize.HasValue) return; if (!(size.HasValue && desktopSize.HasValue)) { if (desktopSize.HasValue) if (size.HasValue) size = GetSize(this, desktopSize.Value, size.Value.Width, size.Value.Height); else size = GetSize(this, desktopSize.Value, this.Favorite.DesktopSizeWidth, this.Favorite.DesktopSizeHeight); else if (size == null) size = GetSize(); if (size == null) return; } this.ChangeDesktopSize(desktopSize.HasValue ? desktopSize.Value : this.Favorite.DesktopSize, size.Value); }
public void ChangeDesktopSize(DesktopSize size) { }
protected override void ChangeDesktopSize(DesktopSize size, System.Drawing.Size siz) { }
private static string ConvertDesktopSize(DesktopSize desktopSize) { if (desktopSize == DesktopSize.FullScreen) return "1"; return "0"; }
public static void GetSize(ref int Height, ref int Width, Connections.Connection Connection, DesktopSize Size) { switch(Size) { case DesktopSize.x640: Width = 640; Height = 480; break; case DesktopSize.x800: Width = 800; Height = 600; break; case DesktopSize.x1024: Width = 1024; Height = 768; break; case DesktopSize.x1280: Width = 1280; Height = 1024; break; case DesktopSize.FitToWindow: Width = Connection.TerminalTabPage.Width; Height = Connection.TerminalTabPage.Height; break; case DesktopSize.FullScreen: Width = Screen.FromControl(Connection).Bounds.Width; Height = Screen.FromControl(Connection).Bounds.Height - 1; break; case DesktopSize.AutoScale: Width = Screen.FromControl(Connection).Bounds.Width; Height = Screen.FromControl(Connection).Bounds.Height - 1; break; case DesktopSize.Custom: break; } int maxWidth = Settings.SupportsRDP6 ? 4096 : 1600; int maxHeight = Settings.SupportsRDP6 ? 2048 : 1200; Width = Math.Min(maxWidth, Width); Height = Math.Min(maxHeight, Height); ; }