Added "always on top" option to fullscreen mode.

Localization fixes to fullscreen mode.
This commit is contained in:
Lorenz Cuno Klopfenstein 2010-01-17 12:35:08 +00:00
parent 4932c332f5
commit 51d1f05e1c
11 changed files with 99 additions and 8 deletions

View file

@ -31,6 +31,7 @@
this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.quitFullscreenModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._thumbnail = new OnTopReplica.ThumbnailPanel();
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuContext.SuspendLayout();
this.menuWindows.SuspendLayout();
this.SuspendLayout();
@ -39,9 +40,11 @@
//
this.menuContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.windowsToolStripMenuItem,
this.alwaysOnTopToolStripMenuItem,
this.quitFullscreenModeToolStripMenuItem});
this.menuContext.Name = "contextMenuStrip1";
this.menuContext.Size = new System.Drawing.Size(186, 48);
this.menuContext.Size = new System.Drawing.Size(186, 92);
this.menuContext.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_opening);
//
// windowsToolStripMenuItem
//
@ -91,6 +94,13 @@
this._thumbnail.Size = new System.Drawing.Size(284, 264);
this._thumbnail.TabIndex = 0;
//
// alwaysOnTopToolStripMenuItem
//
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.alwaysOnTopToolStripMenuItem.Text = Strings.FullscreenAlwaysOnTop;
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.Menu_AlwaysOnTop_click);
//
// FullscreenForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -102,7 +112,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FullscreenForm";
this.Text = "OnTopReplica Fullscreen";
this.Text = Strings.FullscreenTitle;
this.TransparencyKey = System.Drawing.Color.Black;
this.menuContext.ResumeLayout(false);
this.menuWindows.ResumeLayout(false);
@ -118,5 +128,6 @@
private System.Windows.Forms.ToolStripMenuItem quitFullscreenModeToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip menuWindows;
private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem;
}
}

View file

@ -6,6 +6,7 @@ using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VistaControls.TaskDialog;
using OnTopReplica.Properties;
namespace OnTopReplica {
@ -15,6 +16,7 @@ namespace OnTopReplica {
InitializeComponent();
_thumbnail.GlassMode = true;
this.TopMost = Settings.Default.FullscreenAlwaysOnTop;
//Set native renderer on context menu
Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer(new Control[] {
@ -66,6 +68,8 @@ namespace OnTopReplica {
}
}
#region Event handling
public event EventHandler<CloseRequestEventArgs> CloseRequest;
protected virtual void OnCloseRequest() {
@ -132,6 +136,10 @@ namespace OnTopReplica {
base.OnKeyUp(e);
}
#endregion
#region Click through
bool _clickThrough = false;
public bool ClickThrough {
@ -158,8 +166,12 @@ namespace OnTopReplica {
base.WndProc(ref m);
}
private void Menu_Quit_click(object sender, EventArgs e) {
OnCloseRequest();
#endregion
#region Menus
private void Menu_opening(object sender, CancelEventArgs e) {
alwaysOnTopToolStripMenuItem.Checked = Settings.Default.FullscreenAlwaysOnTop;
}
private void Menu_Windows_opening(object sender, EventArgs e) {
@ -199,6 +211,18 @@ namespace OnTopReplica {
}
}
private void Menu_AlwaysOnTop_click(object sender, EventArgs e) {
//Switch topmost behavior and store
this.TopMost = Settings.Default.FullscreenAlwaysOnTop
= !Settings.Default.FullscreenAlwaysOnTop;
}
private void Menu_Quit_click(object sender, EventArgs e) {
OnCloseRequest();
}
#endregion
}
}

View file

@ -49,8 +49,8 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>2.8.1.%2a</ApplicationVersion>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>2.8.2.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>

View file

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.8.1.0")]
[assembly: AssemblyFileVersion("2.8.1.0")]
[assembly: AssemblyVersion("2.8.2.0")]
[assembly: AssemblyFileVersion("2.8.2.0")]

View file

@ -11,4 +11,12 @@
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</asmv1:assembly>

View file

@ -177,5 +177,17 @@ namespace OnTopReplica.Properties {
this["FirstTimeClickForwarding"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool FullscreenAlwaysOnTop {
get {
return ((bool)(this["FullscreenAlwaysOnTop"]));
}
set {
this["FullscreenAlwaysOnTop"] = value;
}
}
}
}

View file

@ -41,5 +41,8 @@
<Setting Name="FirstTimeClickForwarding" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="FullscreenAlwaysOnTop" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -444,6 +444,24 @@ namespace OnTopReplica {
}
}
/// <summary>
/// Looks up a localized string similar to Keep always on top.
/// </summary>
internal static string FullscreenAlwaysOnTop {
get {
return ResourceManager.GetString("FullscreenAlwaysOnTop", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to OnTopReplica fullscreen.
/// </summary>
internal static string FullscreenTitle {
get {
return ResourceManager.GetString("FullscreenTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Homepage: www.codeplex.com/ontopreplica..
/// </summary>

View file

@ -531,4 +531,10 @@ a:hover {
<data name="MenuWindowsWholeRegion" xml:space="preserve">
<value>- intera -</value>
</data>
<data name="FullscreenAlwaysOnTop" xml:space="preserve">
<value>Mantieni in primo piano</value>
</data>
<data name="FullscreenTitle" xml:space="preserve">
<value>OnTopReplica a pieno schermo</value>
</data>
</root>

View file

@ -531,4 +531,10 @@ a:hover {
<data name="MenuWindowsWholeRegion" xml:space="preserve">
<value>- whole -</value>
</data>
<data name="FullscreenAlwaysOnTop" xml:space="preserve">
<value>Keep always on top</value>
</data>
<data name="FullscreenTitle" xml:space="preserve">
<value>OnTopReplica fullscreen</value>
</data>
</root>

View file

@ -43,6 +43,9 @@
<setting name="FirstTimeClickForwarding" serializeAs="String">
<value>True</value>
</setting>
<setting name="FullscreenAlwaysOnTop" serializeAs="String">
<value>False</value>
</setting>
</OnTopReplica.Properties.Settings>
</userSettings>
<startup/></configuration>