Added fullscreen mode switch to CLI (--fullscreen).

Fullscreen and "chrome off" modes only work when cloning a thumbnail.
This commit is contained in:
Lorenz Cuno Klopfenstein 2010-11-17 01:09:27 +01:00
parent d83527e1f9
commit 4abb6f4a7d
3 changed files with 15 additions and 0 deletions

View file

@ -67,6 +67,10 @@ namespace OnTopReplica {
return (FormBorderStyle == FormBorderStyle.SizableToolWindow);
}
set {
//Cancel hiding chrome if no thumbnail is shown
if (!value && !_thumbnailPanel.IsShowingThumbnail)
return;
if (!value) {
Location = new Point {
X = Location.X + SystemInformation.FrameBorderSize.Width,

View file

@ -69,6 +69,9 @@ namespace OnTopReplica.StartupOptions {
.Add("chromeOff", "Disables the window's chrome (border).", s => {
options.DisableChrome = true;
})
.Add("fs|fullscreen", "Starts up in fullscreen mode.", s => {
options.Fullscreen = true;
})
.Add("h|help|?", "Show command line help.", s => {
options.Status = CliStatus.Information;
});

View file

@ -17,6 +17,7 @@ namespace OnTopReplica.StartupOptions {
Opacity = 255;
DisableChrome = false;
MustBeVisible = false;
Fullscreen = false;
}
#region Position and size
@ -51,6 +52,8 @@ namespace OnTopReplica.StartupOptions {
public bool DisableChrome { get; set; }
public bool Fullscreen { get; set; }
#endregion
#region Debug info
@ -136,6 +139,11 @@ namespace OnTopReplica.StartupOptions {
if (EnableClickForwarding) {
form.ClickForwardingEnabled = true;
}
//Fullscreen
if (Fullscreen) {
form.IsFullscreen = true;
}
}
#endregion