First commit, synched to version 2.6.

This commit is contained in:
Lorenz Cuno Klopfenstein 2009-05-17 08:56:53 +00:00
parent eb03714ac5
commit e5795cf295
78 changed files with 8383 additions and 0 deletions

20
OnTopReplica.sln Normal file
View file

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C# Express 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnTopReplica", "OnTopReplica\OnTopReplica.csproj", "{E626BD6E-BF38-4EB7-A128-5CA6F40EF557}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E626BD6E-BF38-4EB7-A128-5CA6F40EF557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E626BD6E-BF38-4EB7-A128-5CA6F40EF557}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E626BD6E-BF38-4EB7-A128-5CA6F40EF557}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E626BD6E-BF38-4EB7-A128-5CA6F40EF557}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

225
OnTopReplica/AboutForm.Designer.cs generated Normal file
View file

@ -0,0 +1,225 @@
namespace OnTopReplica {
partial class AboutForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
this.themedLabel1 = new VistaControls.ThemeText.ThemedLabel();
this.themedLabel2 = new VistaControls.ThemeText.ThemedLabel();
this.panel1 = new System.Windows.Forms.Panel();
this.button3 = new System.Windows.Forms.Button();
this.progressBar1 = new VistaControls.ProgressBar();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.label2 = new System.Windows.Forms.Label();
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// themedLabel1
//
this.themedLabel1.Font = new System.Drawing.Font("Segoe UI", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.themedLabel1.Location = new System.Drawing.Point(0, 0);
this.themedLabel1.Name = "themedLabel1";
this.themedLabel1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
this.themedLabel1.Size = new System.Drawing.Size(200, 40);
this.themedLabel1.TabIndex = 0;
this.themedLabel1.Text = Strings.ApplicationName;
//
// themedLabel2
//
this.themedLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.themedLabel2.Font = new System.Drawing.Font("Segoe UI", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.themedLabel2.GlowSize = 11;
this.themedLabel2.Location = new System.Drawing.Point(200, 0);
this.themedLabel2.Name = "themedLabel2";
this.themedLabel2.Padding = new System.Windows.Forms.Padding(6, 0, 0, 0);
this.themedLabel2.Size = new System.Drawing.Size(177, 40);
this.themedLabel2.TabIndex = 1;
this.themedLabel2.Text = "v2";
//
// panel1
//
this.panel1.BackgroundImage = global::OnTopReplica.Properties.Resources.back;
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.linkLabel2);
this.panel1.Controls.Add(this.linkLabel1);
this.panel1.Controls.Add(this.label2);
this.panel1.Location = new System.Drawing.Point(0, 40);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(377, 105);
this.panel1.TabIndex = 10;
//
// button3
//
this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.button3.Image = ((System.Drawing.Image)(resources.GetObject("button3.Image")));
this.button3.Location = new System.Drawing.Point(313, 79);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(23, 23);
this.button3.TabIndex = 3;
this.button3.UseVisualStyleBackColor = true;
this.button3.Visible = false;
this.button3.Click += new System.EventHandler(this.Abort_click);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(205, 79);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(102, 23);
this.progressBar1.TabIndex = 3;
this.progressBar1.Visible = false;
//
// button2
//
this.button2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Image = global::OnTopReplica.Properties.Resources.component;
this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button2.Location = new System.Drawing.Point(205, 79);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(102, 23);
this.button2.TabIndex = 2;
this.button2.Text = Strings.UpdateNow;
this.button2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.Update_click);
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Image = global::OnTopReplica.Properties.Resources.xiao_down;
this.button1.Location = new System.Drawing.Point(351, 79);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(23, 23);
this.button1.TabIndex = 4;
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Toggle_click);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(6, 75);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(199, 31);
this.label1.TabIndex = 13;
this.label1.Text = Strings.UpdateDisclaimer;
//
// linkLabel2
//
this.linkLabel2.AutoSize = true;
this.linkLabel2.BackColor = System.Drawing.Color.Transparent;
this.linkLabel2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.linkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.linkLabel2.Location = new System.Drawing.Point(7, 58);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(252, 21);
this.linkLabel2.TabIndex = 1;
this.linkLabel2.TabStop = true;
this.linkLabel2.Text = Strings.Homepage;
this.linkLabel2.UseCompatibleTextRendering = true;
this.linkLabel2.VisitedLinkColor = System.Drawing.Color.Blue;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.BackColor = System.Drawing.Color.Transparent;
this.linkLabel1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.linkLabel1.LinkColor = System.Drawing.Color.Blue;
this.linkLabel1.Location = new System.Drawing.Point(7, 37);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(212, 21);
this.linkLabel1.TabIndex = 0;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = Strings.CreatedBy;
this.linkLabel1.UseCompatibleTextRendering = true;
this.linkLabel1.VisitedLinkColor = System.Drawing.Color.Blue;
//
// label2
//
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(7, 4);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(287, 33);
this.label2.TabIndex = 10;
this.label2.Text = Strings.Slogan;
//
// webBrowser1
//
this.webBrowser1.AllowWebBrowserDrop = false;
this.webBrowser1.Location = new System.Drawing.Point(0, 146);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScriptErrorsSuppressed = true;
this.webBrowser1.Size = new System.Drawing.Size(377, 200);
this.webBrowser1.TabIndex = 14;
//
// AboutForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(377, 145);
this.Controls.Add(this.webBrowser1);
this.Controls.Add(this.themedLabel2);
this.Controls.Add(this.themedLabel1);
this.Controls.Add(this.panel1);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "AboutForm";
this.Text = Strings.ApplicationName;
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private VistaControls.ThemeText.ThemedLabel themedLabel1;
private VistaControls.ThemeText.ThemedLabel themedLabel2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.LinkLabel linkLabel2;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2;
private VistaControls.ProgressBar progressBar1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.WebBrowser webBrowser1;
}
}

315
OnTopReplica/AboutForm.cs Normal file
View file

@ -0,0 +1,315 @@
using System.Diagnostics;
using System.Windows.Forms;
using VistaControls.Dwm.Helpers;
using System.Drawing;
using System.Runtime.InteropServices;
using OnTopReplica.Properties;
using System.Deployment.Application;
using System;
using VistaControls.TaskDialog;
using System.ComponentModel;
namespace OnTopReplica {
public partial class AboutForm : GlassForm {
public AboutForm() {
InitializeComponent();
//Add link areas (localized text)
linkLabel1.LinkArea = new LinkArea(linkLabel1.Text.IndexOf("Lorenz Cuno Klopfenstein"), "Lorenz Cuno Klopfenstein".Length);
int linkStart = linkLabel2.Text.IndexOf("www");
linkLabel2.LinkArea = new LinkArea(linkStart, linkLabel2.Text.Length - linkStart - 1);
//Glassify
GlassEnabled = true;
GlassMargins = new VistaControls.Dwm.Margins(0, 0, themedLabel1.Size.Height, 0);
//Remove title and icon from title bar
// Code taken from: https://secure.codeproject.com/KB/vista/HideCaptionIcon.aspx
NativeMethods.WTA_OPTIONS ops = new NativeMethods.WTA_OPTIONS();
ops.Flags = NativeMethods.WTNCA_NODRAWCAPTION | NativeMethods.WTNCA_NODRAWICON;
ops.Mask = NativeMethods.WTNCA_NODRAWCAPTION | NativeMethods.WTNCA_NODRAWICON;
NativeMethods.SetWindowThemeAttribute(this.Handle,
NativeMethods.WindowThemeAttributeType.WTA_NONCLIENT,
ref ops,
(uint)Marshal.SizeOf(typeof(NativeMethods.WTA_OPTIONS))
);
themedLabel2.Text = "v" + Application.ProductVersion.Substring(0, 3);
//Create event handlers
handlerProgressChange = new DeploymentProgressChangedEventHandler(CurrentDeployment_CheckForUpdateProgressChanged);
handlerProgressComplete = new CheckForUpdateCompletedEventHandler(CurrentDeployment_CheckForUpdateCompleted);
handlerUpdateChange = new DeploymentProgressChangedEventHandler(deployment_UpdateProgressChanged);
handlerUpdateComplete = new AsyncCompletedEventHandler(deployment_UpdateCompleted);
}
protected override void OnKeyUp(KeyEventArgs e) {
if (e.KeyCode == Keys.Escape)
this.Close();
base.OnKeyUp(e);
}
private void Lck_click(object sender, LinkLabelLinkClickedEventArgs e) {
Process.Start("http://lorenz.klopfenstein.net");
}
private void Homepage_click(object sender, LinkLabelLinkClickedEventArgs e) {
Process.Start("http://www.codeplex.com/ontopreplica");
}
private void ShowGenericError(string title, string mainContent, Exception ex) {
TaskDialog.Show(mainContent, title, ex.Message, TaskDialogButton.Close, TaskDialogIcon.Stop);
}
#region Bottom toggler
private void Toggle_click(object sender, System.EventArgs e) {
IsExpanded = !IsExpanded;
//Update icon
button1.Image = IsExpanded ? Resources.xiao_up : Resources.xiao_down;
}
bool _isExpanded = false;
bool _isFirstExpansion = true;
public bool IsExpanded {
get { return _isExpanded; }
set {
if(_isExpanded != value)
Size = new Size(Size.Width, Size.Height + ((value) ? webBrowser1.Size.Height : -webBrowser1.Size.Height));
_isExpanded = value;
if (value && _isFirstExpansion) {
//Load text from resources
webBrowser1.DocumentText = Resources.about;
//Register navigation events
webBrowser1.Navigating += new WebBrowserNavigatingEventHandler(webBrowser1_Navigating);
_isFirstExpansion = false;
}
}
}
void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) {
if (e.Url != null && e.Url.IsAbsoluteUri) {
Process.Start(e.Url.ToString());
e.Cancel = true;
}
}
#endregion
#region Updating
bool _isChecking = false;
bool _isUpdating = false;
private void Update_click(object sender, System.EventArgs e) {
ApplicationDeployment deployment = null;
try {
deployment = ApplicationDeployment.CurrentDeployment;
}
catch (InvalidDeploymentException ex) {
var dlg = new TaskDialog(Strings.ErrorUpdate, Strings.ErrorGenericTitle, Strings.ErrorUpdateContent);
dlg.EnableHyperlinks = true;
dlg.CommonIcon = TaskDialogIcon.Stop;
dlg.CommonButtons = TaskDialogButton.Close;
dlg.ExpandedControlText = Strings.ErrorDetailButton;
dlg.ExpandedInformation = ex.Message;
dlg.HyperlinkClick += new EventHandler<HyperlinkEventArgs>(dlg_HyperlinkClick);
dlg.Show(this);
return;
}
catch(Exception ex) {
ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, ex);
return;
}
CheckForUpdate(deployment);
}
private void Abort_click(object sender, EventArgs e) {
StopUpdate();
}
void dlg_HyperlinkClick(object sender, HyperlinkEventArgs e) {
Process.Start(e.Url);
}
public void CheckForUpdate(ApplicationDeployment deployment) {
//Add event handlers
deployment.CheckForUpdateProgressChanged += handlerProgressChange;
deployment.CheckForUpdateCompleted += handlerProgressComplete;
//Update GUI
button2.Visible = false;
progressBar1.Visible = true;
progressBar1.Value = 0;
button3.Visible = true;
_isChecking = true;
try {
deployment.CheckForUpdateAsync();
}
catch (Exception ex) {
ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, ex);
StopUpdate();
}
}
public void InstallUpdate(ApplicationDeployment deployment) {
//Add event handlers
deployment.UpdateProgressChanged += handlerUpdateChange;
deployment.UpdateCompleted += handlerUpdateComplete;
//Update GUI
button2.Visible = false;
progressBar1.Visible = true;
progressBar1.Value = 0;
button3.Visible = true;
_isUpdating = true;
try {
deployment.UpdateAsync();
}
catch (Exception ex) {
ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, ex);
StopUpdate();
}
}
void StopUpdate() {
//Reset UI
progressBar1.Visible = false;
button3.Visible = false;
button2.Visible = true;
try {
ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment;
//Remove all handlers
deployment.CheckForUpdateProgressChanged -= handlerProgressChange;
deployment.CheckForUpdateCompleted -= handlerProgressComplete;
//Abort anything
if (_isChecking)
deployment.CheckForUpdateAsyncCancel();
if (_isUpdating)
deployment.UpdateAsyncCancel();
}
catch {
return;
}
finally {
_isChecking = false;
_isUpdating = false;
}
}
DeploymentProgressChangedEventHandler handlerProgressChange;
CheckForUpdateCompletedEventHandler handlerProgressComplete;
void CurrentDeployment_CheckForUpdateProgressChanged(object sender, DeploymentProgressChangedEventArgs e) {
progressBar1.Value = e.ProgressPercentage;
}
void CurrentDeployment_CheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e) {
progressBar1.Value = 100;
_isChecking = false;
if (e.Error != null) {
ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, e.Error);
StopUpdate();
return;
}
if (e.Cancelled)
//Already was aborted
return;
ApplicationDeployment deployment = null;
try {
deployment = ApplicationDeployment.CurrentDeployment;
}
catch {
//Internal (weird?) error, simply abort
StopUpdate();
return;
}
if (e.UpdateAvailable) {
//Install right away if required
if (e.IsUpdateRequired)
InstallUpdate(deployment);
//Ask user
var dlg = new TaskDialog(string.Format(Strings.AskUpdate, e.AvailableVersion.ToString()), Strings.AskUpdateTitle, Strings.AskUpdateContent);
dlg.CommonIcon = TaskDialogIcon.Information;
dlg.UseCommandLinks = true;
dlg.CustomButtons = new CustomButton[] {
new CustomButton(Result.OK, string.Format(Strings.AskUpdateButtonOk, e.AvailableVersion.ToString())),
new CustomButton(Result.Cancel, Strings.AskUpdateButtonCancel)
};
dlg.ExpandedInformation = string.Format(Strings.AskUpdateExpanded, Application.ProductVersion, e.AvailableVersion.ToString(), e.UpdateSizeBytes);
dlg.ExpandedControlText = Strings.ErrorDetailButton;
if (dlg.Show(this).CommonButton == Result.OK)
InstallUpdate(deployment);
else
StopUpdate();
}
else {
var dlg = new TaskDialog(Strings.InfoUpToDate, Strings.InfoUpToDateTitle);
dlg.CustomIcon = Icon.FromHandle(Resources.thumbs_up.GetHicon());
dlg.CommonButtons = TaskDialogButton.Close;
dlg.Show(this);
StopUpdate();
}
}
DeploymentProgressChangedEventHandler handlerUpdateChange;
AsyncCompletedEventHandler handlerUpdateComplete;
void deployment_UpdateProgressChanged(object sender, DeploymentProgressChangedEventArgs e) {
progressBar1.Value = e.ProgressPercentage;
}
void deployment_UpdateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) {
progressBar1.Value = 100;
_isUpdating = false;
if (e.Error != null) {
ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, e.Error);
StopUpdate();
return;
}
if (e.Cancelled)
return;
var dlg = new TaskDialog(Strings.InfoUpdated, Strings.InfoUpdatedTitle, Strings.InfoUpdatedContent);
dlg.CustomIcon = Icon.FromHandle(Resources.thumbs_up.GetHicon());
dlg.CommonButtons = TaskDialogButton.Close;
dlg.Show(this);
StopUpdate();
}
#endregion
}
}

266
OnTopReplica/AboutForm.resx Normal file
View file

@ -0,0 +1,266 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="button3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALDgAA
Cw4BQL7hQQAAApBJREFUOE91kl1Ik1EYx62IIrwoojLwoiLLZAu6rBsLmRmV05uimB9NarMLv1bhykbN
NrXQmMpyYrNlNe2LZR+aHyRZDLGL3EpCYUquOWy8xJZhvuv997zvlm6mB/6873Oe8/ufc57nLItZMIbP
7m6gqdoko2OYT1EcS58rJD/NaReuj4pdOil8z3RBgsZJIh4m9Xmbi+E2ZIP+7y5p4NIeButoA77YwLSV
8ou/kga9xjxg4A5gb4K7MnNxE1d5GB4wAb0VwKAZTEsRvHXZQL8ReKQCHqrA9dTArUuPNhlVH3CyY70E
3Q7Br7XACw3QXQl0XCOwBGhRgjPLwVkU4OwWjGjSPL2yHVnCdeiYXd7mAmDICvSQAQ/b1MDjc0Br4Txs
koF7ehFMowIOpdhdlRK/h/AVQpWFQlECdrpCe1kItpLpv515uLUEjDEXHxUiz4V9m6UEr50rKBlsIv0I
WAnkDVqjYbZBhmmTHJ/zxcHGI1sLCdwQCYdOYJQDbwxAW1HUzr/rj2H6phQz5jP4bjgJp1I8wbc40qDL
a1IC7xpC1Y449mz9cQH2Xz8ERi/BT7MCU4YsvgvjA/KkbYLJaGmyk3XagFflUfAfSz5mm/IQqE4X4Kmr
yZjSp4HtrMbIJYmn40RCDuHLBROXJhVsdw04vtd8wZ6owdTJMKk/ipkHxfDpUwXYbynA2GUJ3p9KshEW
R1ozdxVXWQrYlzpwnVVgbskxpBBNfjgt+uSpyMAv63kE7qsE+G3urucEiUkJ/z1rl+YgfBZVcEgh/qba
G5eZsXPdFqHAtbmY0GfycHsY5g0WH/05ife0++MllF0ffmixVLC6vuzEGxRvJ813YEmXmJhVkTkq2EqK
V5M2LmT+Ah3C3fcuAveKAAAAAElFTkSuQmCC
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAMDAAAAEAGACoHAAAFgAAACgAAAAwAAAAYAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AABBdztCdjhDeDpCdzlCdjpDdzpFfD5EeTpGfDtFfDtFfjpJgjtHfjlHgTpIgjtNiDxKgzlKhDlKiDhO
iztNijpMjDpPjTtSkz1Vlz1YnD1bpD5dpz1hqT9lrEFkrT5oskJnsD1prT1orD1mqTlmpjlkpDdmozpj
nDVhmDRekzJekTJekDNjkjNeijFbiC1ahSxDeDlDdztDdztEdzpFejpEeDhEdzlEeDpGezhGfThGfDhH
fThHfjlIgjhIgzpKgzhJhDhKhjhLhzlNiTlLiDlPjTlVlz1VmDxYnTxdoT5gqD1iqj9jrkBlr0BnsEBp
rz1nrT1orTtmqzhlpzhopjpjoDVgmzNgmDNflTJejy9cjy5gkS9bii5ciC1chyxbhytCdjpDdzlDeDlG
eztDdjhDdzhDdzdEeDhHfDdFejZFezdGfTdJgzlIgDdIgTlKgzdLhDhKhjlLhjhMiTlQkDpSlDtXmDtY
nTtcozxepz1hqz1jrT1oskBorztpsDxnrjxorTtmqzplqTppqjxioDVfnDRfmDNflTJdkjBekjFcji9c
iy9biS1ciCxciCtgjS1DdjhEezpDeDhCdTdEdTZEdjVFeDVFeDVHdzREezZGfjdIfTZHfTdIgDdJgjdK
hDZKhDZKhDZMhzdTkztSlDpWmjtanjtcozxepz1gqD1kqzxorz1nsD5psDxorztlrTtmqzpmqDxkpTli
oDZgnTVelzNclTJdkjFilTNaji5biy5bii1bii1ciSxfjSxdiypGejpCdTZDdThFdTdGeDdFeDZEdzdG
eDZIejhLgTpIeztLfjdKgDlLgjlMhDpMhTlOhTpPjDtTkTtWlTxZmj5coT5gpT9ipz9kqD9prUForj5p
sEBpsEBpsT9prz9nrD9qrEJkozlloDlinThhmjdgmDZhlzRflDJbjzBcjTFejTBdjDBejC9eiyxejStf
kC1DdTdEdzhFdzlIeDpIeTtKejpKez5NfT1QgD9QgUBPgUBShD9RhUBSh0BTiEFVi0BdlUVak0JdmUNi
n0VlokVnpkZoqUVprERusEVusUVts0ZutEdvs0VvskZusEVvrkZrqEJppENnokJmnz9mnT1qnzxkmDpi
lDhikjZhkjVjkDVmlTZgjzFhjy9jki5ili1DdjdGeDpIeDtMeT1Pe0BRfkRWhkdWg0ZahklbiUtaiUxd
i0tcjExej0tglE1kmU5mnE9nn05ro05up09wq1Bzr1F2s1F1s053tFB2tlF3tlF4tlB2tlB4tlF2sU9z
rU5yqk1yqExwpUxwpUlypkluoUhsnEZsm0VrmkJql0Jtmz5pljtolzhplzZomjNspTJGeDpKeTpMej5S
e0FVgUdahkteiE5jjFNokFdpkllqk1tslltsmVxyoV5xol52pF12p196rWB7sGB+smGAtmCEumKCuWCD
umGCul+Du1+Du2CEvF+FvWGDuF+Dt16As11/sFyAsFyAr1t+rVp9qVt8qFp7pVd6plV5pVN2oU9zn0px
oUZunj9wojxwqThwrjZIdzpOe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pCsuZCvuo+x
uY6zuY63vI26v4+7v4+6vo+9v43Bw47DxI7BwY7AwI7BwI7BwI6/vo69vY68u427uo25uo24uY23uI20
tY2xso2vr42tro2tro6uro6vr4+ysI+0spC2s5G5tpHd28v38umVqWyJnlt9lUt0jT9TeDVbfj5lhEpw
jVaHgn308evo5uDe4dbh4tfj5Njj5djk5djk5djl5djm5tnm5tnm5tnm5tjn59fn59fn5tfn5dfn5djn
5djm5dfm5Nfm5Nfl5Nfl5Nfl5Njl5Njk5Njk49jj49jj4tjj4tjj4tjj4tjk49nk4tnk4tfk4dbr6OH9
9u+KoF+AmFB3kENvijhReDJWezljhkRnh0rV1NSLhX+Qi4eYk4+emZWinpmloZymop2mop2mop2mop2m
op2mop2lop2lop2lop2loZ2loZ2loZ2loZ2loZ2loZ2loZ2loZ2lop2lop2mop2mop2mop2mop2mop2m
op2mop2mop2loJyhnZicmJOVkYyPioWSj4t/lU53kERxiTlqhTBOdi5WfTVXfzlehUJmi0lvklJ1m1h9
p2GBrmaGuWqJxm6K1nCK6XKL6XOHyG+EnGmFnWqGnmiIoGqGn2mHoGqHoGmIommIo2qJpGqKpWmKpmqK
p2qMqGqMqWqMqWqNqWqNqWuMqGqOqGqOqGqOp2mNpmiMpGeLomSIoF+DnFh+l1B7k0l0jkBuijhrhTBm
gypLeCxPei9VfzVZhTheij1lkkNtn0tup05yslN1xVV411l27Fp47F9xplVyjVFxjlFzkFJzklN0klN1
klJ2lFN2lVF2llJ2llJ3mVN4mlJ5m1J5nVF6nlN6n1N9nVN9n1R8n1R9nlN9n1J9nVJ9nFF8m1B8mU97
l014lUd2kkRzj0BwjDpqhzRohS9mgChifiRKeClNfC1RgC5VhjBYjTVfmTphoT5jsEBnxURn2kVr70pn
70tijUBhgT5igj5ihT5lhz5jhz9miEBmiD9oiz9ojD5njD9njD9pkEBqkT9rkz9slT9slkBul0BvlT9u
l0Bul0Bvlj9vlj9vlT5vkz5vkT1vkDtujjptjThrijVpiDFnhi5kgytkgidify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9Xix9ZjR5bjx9cjx9dkCFajyBbjh9cjR9bjCBbih9diB9dhh1chRxbhBtbgxxbgBpb
gBpbfRlcexhcexhcexgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
</root>

View file

@ -0,0 +1,50 @@
<html>
<head>
<style type="text/css">
body {
font-family: Segoe UI, Arial, sans-serif;
font-size: 0.8em;
margin: 0; padding: 0;
}
h1 {
font-size: 1.4em;
font-weight: bold;
margin: 0 0 1em 0;
padding: 0;
}
p {
margin: 0.5em 0 0.5em 1em;
padding: 0;
}
a {
font-weight: bold;
color: blue;
}
a:hover {
color: red;
}
</style>
</head>
<body>
<h1>License</h1>
<p><b>OnTopReplica</b> is licensed under the <a href="http://opensource.org/licenses/ms-rl.html">Microsoft Reciprocal License (Ms-RL)</a>.</p>
<p>The original source code can be found on the <a href="http://www.codeplex.com/ontopreplica">project's homepage on CodePlex</a>.</p>
<h1>Credits</h1>
<p>OnTopReplica was inspired by <a href="http://insentient.net">Switcher</a> and other DWM based applications.</p>
<p>All Vista controls are part of the <a href="http://www.codeplex.com/windowsformsaero">WindowsFormsAero library</a> for .NET.</p>
<p>Some example code taken from <a href="http://www.ookii.org">Ookii</a> on Channel9.</p>
<p>NativeToolstripRenderer class taken from <a href="http://wp.asztal.net/2007/12/vista-style-menus-in-dotnet/">asztal.net</a>.</p>
<p>Some icons from <a href="http://www.vistaico.com">VistaICO.com</a> and the Xiao icon set.</p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
OnTopReplica/Assets/ok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

View file

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace OnTopReplica {
class ClickThroughLabel : Label {
protected override void WndProc(ref Message m) {
if (m.Msg == NativeMethods.WM_NCHITTEST) {
m.Result = new IntPtr(NativeMethods.HTTRANSPARENT);
return;
}
base.WndProc(ref m);
}
}
}

View file

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace OnTopReplica {
public class CloneClickEventArgs : EventArgs {
public Point ClientClickLocation { get; set; }
public bool IsDoubleClick { get; set; }
public CloneClickEventArgs(Point location) {
ClientClickLocation = location;
IsDoubleClick = false;
}
public CloneClickEventArgs(Point location, bool doubleClick) {
ClientClickLocation = location;
IsDoubleClick = doubleClick;
}
}
}

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OnTopReplica {
public class CloseRequestEventArgs : EventArgs {
public CloseRequestEventArgs(WindowHandle lastHandle) {
CurrentWindowHandle = lastHandle;
}
public WindowHandle CurrentWindowHandle { get; set; }
}
}

View file

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Text;
using VistaControls;
using System.Windows.Forms;
namespace OnTopReplica {
class FocusedTextBox : System.Windows.Forms.TextBox {
protected override bool IsInputChar(char charCode) {
if (charCode == '\n' || charCode == '\r')
return true;
return base.IsInputChar(charCode);
}
protected override void OnKeyUp(KeyEventArgs e) {
if (e.KeyCode == Keys.Return) {
OnConfirmInput();
e.Handled = true;
}
base.OnKeyUp(e);
}
public event EventHandler ConfirmInput;
protected virtual void OnConfirmInput() {
if (ConfirmInput != null)
ConfirmInput(this, EventArgs.Empty);
}
}
}

122
OnTopReplica/FullscreenForm.Designer.cs generated Normal file
View file

@ -0,0 +1,122 @@
namespace OnTopReplica {
partial class FullscreenForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
this.menuContext = new System.Windows.Forms.ContextMenuStrip(this.components);
this.windowsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.quitFullscreenModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuWindows = new System.Windows.Forms.ContextMenuStrip(this.components);
this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._thumbnail = new OnTopReplica.ThumbnailPanel();
this.menuContext.SuspendLayout();
this.menuWindows.SuspendLayout();
this.SuspendLayout();
//
// menuContext
//
this.menuContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.windowsToolStripMenuItem,
this.quitFullscreenModeToolStripMenuItem});
this.menuContext.Name = "contextMenuStrip1";
this.menuContext.Size = new System.Drawing.Size(186, 70);
//
// windowsToolStripMenuItem
//
this.windowsToolStripMenuItem.DropDown = this.menuWindows;
this.windowsToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.window_multiple16;
this.windowsToolStripMenuItem.Name = "windowsToolStripMenuItem";
this.windowsToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.windowsToolStripMenuItem.Text = Strings.MenuWindows;
this.windowsToolStripMenuItem.ToolTipText = Strings.MenuWindowsTT;
this.windowsToolStripMenuItem.DropDownOpening += new System.EventHandler(this.Menu_Windows_opening);
//
// quitFullscreenModeToolStripMenuItem
//
this.quitFullscreenModeToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.close_new;
this.quitFullscreenModeToolStripMenuItem.Name = "quitFullscreenModeToolStripMenuItem";
this.quitFullscreenModeToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.quitFullscreenModeToolStripMenuItem.Text = Strings.MenuQuitFullscreen;
this.quitFullscreenModeToolStripMenuItem.Click += new System.EventHandler(this.Menu_Quit_click);
//
// menuWindows
//
this.menuWindows.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.noneToolStripMenuItem});
this.menuWindows.Name = "menuWindows";
this.menuWindows.OwnerItem = this.windowsToolStripMenuItem;
this.menuWindows.Size = new System.Drawing.Size(153, 48);
//
// noneToolStripMenuItem
//
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
this.noneToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.noneToolStripMenuItem.Text = Strings.MenuWindowsNone;
//
// _thumbnail
//
this._thumbnail.BackColor = System.Drawing.SystemColors.Control;
this._thumbnail.ClickThrough = true;
this._thumbnail.Cursor = System.Windows.Forms.Cursors.Default;
this._thumbnail.Dock = System.Windows.Forms.DockStyle.Fill;
this._thumbnail.DrawMouseRegions = false;
this._thumbnail.FullscreenMode = false;
this._thumbnail.GlassMode = false;
this._thumbnail.Location = new System.Drawing.Point(0, 0);
this._thumbnail.Name = "_thumbnail";
this._thumbnail.ShownRegion = new System.Drawing.Rectangle(0, 0, 0, 0);
this._thumbnail.ShowRegion = false;
this._thumbnail.Size = new System.Drawing.Size(284, 264);
this._thumbnail.TabIndex = 0;
//
// FullscreenForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(284, 264);
this.ContextMenuStrip = this.menuContext;
this.Controls.Add(this._thumbnail);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "FullscreenForm";
this.ShowInTaskbar = false;
this.Text = "OnTopReplica Fullscreen";
this.TopMost = true;
this.TransparencyKey = System.Drawing.Color.Black;
this.menuContext.ResumeLayout(false);
this.menuWindows.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ThumbnailPanel _thumbnail;
private System.Windows.Forms.ContextMenuStrip menuContext;
private System.Windows.Forms.ToolStripMenuItem windowsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem quitFullscreenModeToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip menuWindows;
private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem;
}
}

View file

@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace OnTopReplica {
public partial class FullscreenForm : Form {
public FullscreenForm() {
InitializeComponent();
_thumbnail.GlassMode = true;
//Set native renderer on context menu
Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer(new Control[] {
menuContext, menuWindows
});
}
WindowHandle _lastHandle;
WindowManager _manager = new WindowManager(WindowManager.EnumerationMode.TaskWindows);
public void DisplayFullscreen(Screen screen, WindowHandle window) {
_lastHandle = window;
//Init thumbnail
_thumbnail.SetThumbnailHandle(window);
//Form setup
this.Location = screen.WorkingArea.Location;
this.Size = screen.WorkingArea.Size;
}
public void CloseFullscreen() {
this.Visible = false;
_thumbnail.UnsetThumbnail();
}
public Rectangle ShownRegion {
get {
return _thumbnail.ShownRegion;
}
set {
_thumbnail.ShownRegion = value;
}
}
public bool ShowRegion {
get {
return _thumbnail.ShowRegion;
}
set {
_thumbnail.ShowRegion = value;
}
}
public event EventHandler<CloseRequestEventArgs> CloseRequest;
protected virtual void OnCloseRequest() {
if (CloseRequest != null)
CloseRequest(this, new CloseRequestEventArgs(_lastHandle));
}
protected override void OnDoubleClick(EventArgs e) {
OnCloseRequest();
base.OnDoubleClick(e);
}
protected override void OnKeyUp(KeyEventArgs e) {
if (e.KeyCode == Keys.Escape) {
e.Handled = true;
OnCloseRequest();
}
base.OnKeyUp(e);
}
bool _clickThrough = false;
public bool ClickThrough {
get {
return _clickThrough;
}
set {
_clickThrough = value;
this.TransparencyKey = (value) ? Color.Black : Color.White;
this.Invalidate();
}
}
const int WM_NCHITTEST = 0x0084;
const int HTTRANSPARENT = -1;
protected override void WndProc(ref Message m) {
if (_clickThrough && m.Msg == WM_NCHITTEST) {
m.Result = new IntPtr(HTTRANSPARENT);
return;
}
base.WndProc(ref m);
}
private void Menu_Quit_click(object sender, EventArgs e) {
OnCloseRequest();
}
private void Menu_Windows_opening(object sender, EventArgs e) {
_manager.Refresh(WindowManager.EnumerationMode.TaskWindows);
WindowListHelper.PopulateMenu(_manager, menuWindows, _lastHandle, new EventHandler(Menu_Window_click));
}
void Menu_Window_click(object sender, EventArgs e) {
//Get clicked item and window index from tag
ToolStripItem tsi = (ToolStripItem)sender;
//Handle -none- selection
if (tsi.Tag == null) {
OnCloseRequest();
return;
}
int index = (int)tsi.Tag;
if (index >= _manager.Windows.Count)
return;
var handle = _manager.Windows[index];
_thumbnail.SetThumbnailHandle(handle);
_lastHandle = handle;
}
}
}

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuWindows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>142, 17</value>
</metadata>
</root>

562
OnTopReplica/MainForm.Designer.cs generated Normal file
View file

@ -0,0 +1,562 @@
namespace OnTopReplica
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.menuContext = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuContextWindows = new System.Windows.Forms.ToolStripMenuItem();
this.menuWindows = new System.Windows.Forms.ContextMenuStrip(this.components);
this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.switchToWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectRegionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.forwardClicksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuContextOpacity = new System.Windows.Forms.ToolStripMenuItem();
this.menuOpacity = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuResize = new System.Windows.Forms.ContextMenuStrip(this.components);
this.doubleToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.fitToWindowToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.halfToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.quarterToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.fullscreenToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.clickThroughToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.autofitOnResizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.topLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.topRightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bottomLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bottomRightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.recallLastPositionAndSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chromeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.reduceToIconToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuLanguages = new System.Windows.Forms.ContextMenuStrip(this.components);
this.englishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.italianoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuContextClose = new System.Windows.Forms.ToolStripMenuItem();
this.menuIconContext = new System.Windows.Forms.ContextMenuStrip(this.components);
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resetWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuContext.SuspendLayout();
this.menuWindows.SuspendLayout();
this.menuOpacity.SuspendLayout();
this.menuResize.SuspendLayout();
this.menuLanguages.SuspendLayout();
this.menuIconContext.SuspendLayout();
this.SuspendLayout();
//
// menuContext
//
this.menuContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuContextWindows,
this.switchToWindowToolStripMenuItem,
this.selectRegionToolStripMenuItem,
this.forwardClicksToolStripMenuItem,
this.menuContextOpacity,
this.resizeToolStripMenuItem,
this.dockToolStripMenuItem,
this.chromeToolStripMenuItem,
this.reduceToIconToolStripMenuItem,
this.toolStripSeparator1,
this.languageToolStripMenuItem,
this.aboutToolStripMenuItem,
this.menuContextClose});
this.menuContext.Name = "menuContext";
this.menuContext.Size = new System.Drawing.Size(196, 298);
this.menuContext.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_opening);
//
// menuContextWindows
//
this.menuContextWindows.DropDown = this.menuWindows;
this.menuContextWindows.Image = global::OnTopReplica.Properties.Resources.window_multiple16;
this.menuContextWindows.Name = "menuContextWindows";
this.menuContextWindows.Size = new System.Drawing.Size(195, 24);
this.menuContextWindows.Text = global::OnTopReplica.Strings.MenuWindows;
this.menuContextWindows.ToolTipText = global::OnTopReplica.Strings.MenuWindowsTT;
this.menuContextWindows.DropDownOpening += new System.EventHandler(this.Menu_Windows_opening);
//
// menuWindows
//
this.menuWindows.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.noneToolStripMenuItem});
this.menuWindows.Name = "menuWindows";
this.menuWindows.OwnerItem = this.menuContextWindows;
this.menuWindows.Size = new System.Drawing.Size(132, 28);
//
// noneToolStripMenuItem
//
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
this.noneToolStripMenuItem.Size = new System.Drawing.Size(131, 24);
this.noneToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuWindowsNone;
//
// switchToWindowToolStripMenuItem
//
this.switchToWindowToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.window_switch;
this.switchToWindowToolStripMenuItem.Name = "switchToWindowToolStripMenuItem";
this.switchToWindowToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.switchToWindowToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuSwitch;
this.switchToWindowToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuSwitchTT;
this.switchToWindowToolStripMenuItem.Click += new System.EventHandler(this.Menu_Switch_click);
//
// selectRegionToolStripMenuItem
//
this.selectRegionToolStripMenuItem.Enabled = false;
this.selectRegionToolStripMenuItem.Name = "selectRegionToolStripMenuItem";
this.selectRegionToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.selectRegionToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuRegion;
this.selectRegionToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuRegionTT;
this.selectRegionToolStripMenuItem.Click += new System.EventHandler(this.Menu_Region_click);
//
// forwardClicksToolStripMenuItem
//
this.forwardClicksToolStripMenuItem.Name = "forwardClicksToolStripMenuItem";
this.forwardClicksToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.forwardClicksToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuClickForwarding;
this.forwardClicksToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuClickForwardingTT;
this.forwardClicksToolStripMenuItem.Click += new System.EventHandler(this.Menu_Forward_click);
//
// menuContextOpacity
//
this.menuContextOpacity.DropDown = this.menuOpacity;
this.menuContextOpacity.Image = global::OnTopReplica.Properties.Resources.window_opacity16;
this.menuContextOpacity.Name = "menuContextOpacity";
this.menuContextOpacity.Size = new System.Drawing.Size(195, 24);
this.menuContextOpacity.Text = global::OnTopReplica.Strings.MenuOpacity;
//
// menuOpacity
//
this.menuOpacity.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1,
this.toolStripMenuItem2,
this.toolStripMenuItem3,
this.toolStripMenuItem4,
this.toolStripSeparator2,
this.toolStripMenuItem5});
this.menuOpacity.Name = "menuOpacity";
this.menuOpacity.OwnerItem = this.menuContextOpacity;
this.menuOpacity.ShowCheckMargin = true;
this.menuOpacity.ShowImageMargin = false;
this.menuOpacity.Size = new System.Drawing.Size(180, 130);
this.menuOpacity.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_Opacity_opening);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Checked = true;
this.toolStripMenuItem1.CheckState = System.Windows.Forms.CheckState.Checked;
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(179, 24);
this.toolStripMenuItem1.Tag = 255;
this.toolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuOp100;
this.toolStripMenuItem1.ToolTipText = global::OnTopReplica.Strings.MenuOp100TT;
this.toolStripMenuItem1.Click += new System.EventHandler(this.Menu_Opacity_click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(179, 24);
this.toolStripMenuItem2.Tag = 190;
this.toolStripMenuItem2.Text = global::OnTopReplica.Strings.MenuOp75;
this.toolStripMenuItem2.ToolTipText = global::OnTopReplica.Strings.MenuOp75TT;
this.toolStripMenuItem2.Click += new System.EventHandler(this.Menu_Opacity_click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(179, 24);
this.toolStripMenuItem3.Tag = 128;
this.toolStripMenuItem3.Text = global::OnTopReplica.Strings.MenuOp50;
this.toolStripMenuItem3.ToolTipText = global::OnTopReplica.Strings.MenuOp50TT;
this.toolStripMenuItem3.Click += new System.EventHandler(this.Menu_Opacity_click);
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(179, 24);
this.toolStripMenuItem4.Tag = 64;
this.toolStripMenuItem4.Text = global::OnTopReplica.Strings.MenuOp25;
this.toolStripMenuItem4.ToolTipText = global::OnTopReplica.Strings.MenuOp25TT;
this.toolStripMenuItem4.Click += new System.EventHandler(this.Menu_Opacity_click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(176, 6);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Checked = true;
this.toolStripMenuItem5.CheckState = System.Windows.Forms.CheckState.Checked;
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(179, 24);
this.toolStripMenuItem5.Text = global::OnTopReplica.Strings.MenuGlass;
this.toolStripMenuItem5.ToolTipText = global::OnTopReplica.Strings.MenuGlassTT;
this.toolStripMenuItem5.Click += new System.EventHandler(this.Menu_Opacity_Glass_click);
//
// resizeToolStripMenuItem
//
this.resizeToolStripMenuItem.DropDown = this.menuResize;
this.resizeToolStripMenuItem.Enabled = false;
this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem";
this.resizeToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.resizeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuResize;
//
// menuResize
//
this.menuResize.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.doubleToolStripMenuItem1,
this.fitToWindowToolStripMenuItem1,
this.halfToolStripMenuItem1,
this.quarterToolStripMenuItem1,
this.toolStripSeparator3,
this.fullscreenToolStripMenuItem1,
this.clickThroughToolStripMenuItem,
this.toolStripSeparator5,
this.autofitOnResizeToolStripMenuItem});
this.menuResize.Name = "menuResize";
this.menuResize.OwnerItem = this.resizeToolStripMenuItem;
this.menuResize.Size = new System.Drawing.Size(192, 184);
this.menuResize.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_Resize_opening);
//
// doubleToolStripMenuItem1
//
this.doubleToolStripMenuItem1.Name = "doubleToolStripMenuItem1";
this.doubleToolStripMenuItem1.Size = new System.Drawing.Size(191, 24);
this.doubleToolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuFitDouble;
this.doubleToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Resize_Double);
//
// fitToWindowToolStripMenuItem1
//
this.fitToWindowToolStripMenuItem1.Name = "fitToWindowToolStripMenuItem1";
this.fitToWindowToolStripMenuItem1.Size = new System.Drawing.Size(191, 24);
this.fitToWindowToolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuFitOriginal;
this.fitToWindowToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Resize_FitToWindow);
//
// halfToolStripMenuItem1
//
this.halfToolStripMenuItem1.Name = "halfToolStripMenuItem1";
this.halfToolStripMenuItem1.Size = new System.Drawing.Size(191, 24);
this.halfToolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuFitHalf;
this.halfToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Resize_Half);
//
// quarterToolStripMenuItem1
//
this.quarterToolStripMenuItem1.Name = "quarterToolStripMenuItem1";
this.quarterToolStripMenuItem1.Size = new System.Drawing.Size(191, 24);
this.quarterToolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuFitQuarter;
this.quarterToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Resize_Quarter);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(188, 6);
//
// fullscreenToolStripMenuItem1
//
this.fullscreenToolStripMenuItem1.Name = "fullscreenToolStripMenuItem1";
this.fullscreenToolStripMenuItem1.Size = new System.Drawing.Size(191, 24);
this.fullscreenToolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuFitFullscreen;
this.fullscreenToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Resize_Fullscreen);
//
// clickThroughToolStripMenuItem
//
this.clickThroughToolStripMenuItem.Checked = true;
this.clickThroughToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.clickThroughToolStripMenuItem.Name = "clickThroughToolStripMenuItem";
this.clickThroughToolStripMenuItem.Size = new System.Drawing.Size(191, 24);
this.clickThroughToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuResizeClickThrough;
this.clickThroughToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuResizeClickThroughTT;
this.clickThroughToolStripMenuItem.Click += new System.EventHandler(this.Menu_Resize_ClickThrough);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(188, 6);
//
// autofitOnResizeToolStripMenuItem
//
this.autofitOnResizeToolStripMenuItem.Name = "autofitOnResizeToolStripMenuItem";
this.autofitOnResizeToolStripMenuItem.Size = new System.Drawing.Size(191, 24);
this.autofitOnResizeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuAutofit;
this.autofitOnResizeToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuAutofitTT;
this.autofitOnResizeToolStripMenuItem.Click += new System.EventHandler(this.Menu_Resize_Autofit_click);
//
// dockToolStripMenuItem
//
this.dockToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.topLeftToolStripMenuItem,
this.topRightToolStripMenuItem,
this.bottomLeftToolStripMenuItem,
this.bottomRightToolStripMenuItem,
this.toolStripSeparator4,
this.recallLastPositionAndSizeToolStripMenuItem});
this.dockToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_null;
this.dockToolStripMenuItem.Name = "dockToolStripMenuItem";
this.dockToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.dockToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosition;
this.dockToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuPositionTT;
//
// topLeftToolStripMenuItem
//
this.topLeftToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_topleft;
this.topLeftToolStripMenuItem.Name = "topLeftToolStripMenuItem";
this.topLeftToolStripMenuItem.Size = new System.Drawing.Size(261, 24);
this.topLeftToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosTopLeft;
this.topLeftToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_TopLeft);
//
// topRightToolStripMenuItem
//
this.topRightToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_topright;
this.topRightToolStripMenuItem.Name = "topRightToolStripMenuItem";
this.topRightToolStripMenuItem.Size = new System.Drawing.Size(261, 24);
this.topRightToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosTopRight;
this.topRightToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_TopRight);
//
// bottomLeftToolStripMenuItem
//
this.bottomLeftToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_bottomleft;
this.bottomLeftToolStripMenuItem.Name = "bottomLeftToolStripMenuItem";
this.bottomLeftToolStripMenuItem.Size = new System.Drawing.Size(261, 24);
this.bottomLeftToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosBottomLeft;
this.bottomLeftToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_BottomLeft);
//
// bottomRightToolStripMenuItem
//
this.bottomRightToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_bottomright;
this.bottomRightToolStripMenuItem.Name = "bottomRightToolStripMenuItem";
this.bottomRightToolStripMenuItem.Size = new System.Drawing.Size(261, 24);
this.bottomRightToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosBottomRight;
this.bottomRightToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_BottomRight);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(258, 6);
//
// recallLastPositionAndSizeToolStripMenuItem
//
this.recallLastPositionAndSizeToolStripMenuItem.Name = "recallLastPositionAndSizeToolStripMenuItem";
this.recallLastPositionAndSizeToolStripMenuItem.Size = new System.Drawing.Size(261, 24);
this.recallLastPositionAndSizeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuRecall;
this.recallLastPositionAndSizeToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuRecallTT;
this.recallLastPositionAndSizeToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_Recall_click);
//
// chromeToolStripMenuItem
//
this.chromeToolStripMenuItem.Name = "chromeToolStripMenuItem";
this.chromeToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.chromeToolStripMenuItem.Text = "Chrome";
this.chromeToolStripMenuItem.Click += new System.EventHandler(this.Menu_Chrome_click);
//
// reduceToIconToolStripMenuItem
//
this.reduceToIconToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.reduce;
this.reduceToIconToolStripMenuItem.Name = "reduceToIconToolStripMenuItem";
this.reduceToIconToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.reduceToIconToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuReduce;
this.reduceToIconToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuReduceTT;
this.reduceToIconToolStripMenuItem.Click += new System.EventHandler(this.Menu_Reduce_click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(192, 6);
//
// languageToolStripMenuItem
//
this.languageToolStripMenuItem.DropDown = this.menuLanguages;
this.languageToolStripMenuItem.Name = "languageToolStripMenuItem";
this.languageToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.languageToolStripMenuItem.Text = global::OnTopReplica.Strings.Language;
//
// menuLanguages
//
this.menuLanguages.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.englishToolStripMenuItem,
this.italianoToolStripMenuItem});
this.menuLanguages.Name = "menuLanguages";
this.menuLanguages.OwnerItem = this.languageToolStripMenuItem;
this.menuLanguages.Size = new System.Drawing.Size(129, 52);
//
// englishToolStripMenuItem
//
this.englishToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.flag_usa;
this.englishToolStripMenuItem.Name = "englishToolStripMenuItem";
this.englishToolStripMenuItem.Size = new System.Drawing.Size(128, 24);
this.englishToolStripMenuItem.Tag = "en-US";
this.englishToolStripMenuItem.Text = "English";
this.englishToolStripMenuItem.Click += new System.EventHandler(this.Menu_Language_click);
//
// italianoToolStripMenuItem
//
this.italianoToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.flag_ita;
this.italianoToolStripMenuItem.Name = "italianoToolStripMenuItem";
this.italianoToolStripMenuItem.Size = new System.Drawing.Size(128, 24);
this.italianoToolStripMenuItem.Tag = "it-IT";
this.italianoToolStripMenuItem.Text = "Italiano";
this.italianoToolStripMenuItem.Click += new System.EventHandler(this.Menu_Language_click);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
this.aboutToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuAbout;
this.aboutToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuAboutTT;
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.Menu_About_click);
//
// menuContextClose
//
this.menuContextClose.Image = global::OnTopReplica.Properties.Resources.close_new;
this.menuContextClose.Name = "menuContextClose";
this.menuContextClose.Size = new System.Drawing.Size(195, 24);
this.menuContextClose.Text = global::OnTopReplica.Strings.MenuClose;
this.menuContextClose.Click += new System.EventHandler(this.Menu_Close_click);
//
// menuIconContext
//
this.menuIconContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem,
this.resetWindowToolStripMenuItem,
this.exitToolStripMenuItem});
this.menuIconContext.Name = "menuIconContext";
this.menuIconContext.Size = new System.Drawing.Size(171, 76);
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.openToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.icon;
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(170, 24);
this.openToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuOpen;
this.openToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuOpenTT;
this.openToolStripMenuItem.Click += new System.EventHandler(this.IconContextOpen_click);
//
// resetWindowToolStripMenuItem
//
this.resetWindowToolStripMenuItem.Name = "resetWindowToolStripMenuItem";
this.resetWindowToolStripMenuItem.Size = new System.Drawing.Size(170, 24);
this.resetWindowToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuReset;
this.resetWindowToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuResetTT;
this.resetWindowToolStripMenuItem.Click += new System.EventHandler(this.IconContextReset_click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.close_new;
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(170, 24);
this.exitToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuClose;
this.exitToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuCloseTT;
this.exitToolStripMenuItem.Click += new System.EventHandler(this.IconContextExit_click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(352, 251);
this.ContextMenuStrip = this.menuContext;
this.ControlBox = false;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4);
this.MinimumSize = new System.Drawing.Size(47, 45);
this.Name = "MainForm";
this.ShowInTaskbar = false;
this.TopMost = true;
this.DoubleClick += new System.EventHandler(this.Form_doubleclick);
this.menuContext.ResumeLayout(false);
this.menuWindows.ResumeLayout(false);
this.menuOpacity.ResumeLayout(false);
this.menuResize.ResumeLayout(false);
this.menuLanguages.ResumeLayout(false);
this.menuIconContext.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ContextMenuStrip menuContext;
private System.Windows.Forms.ToolStripMenuItem menuContextWindows;
private System.Windows.Forms.ToolStripMenuItem menuContextClose;
private System.Windows.Forms.ContextMenuStrip menuWindows;
private System.Windows.Forms.ToolStripMenuItem menuContextOpacity;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ContextMenuStrip menuOpacity;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem reduceToIconToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem selectRegionToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem resizeToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
private System.Windows.Forms.ContextMenuStrip menuIconContext;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem resetWindowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem switchToWindowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dockToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem topLeftToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem topRightToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem bottomLeftToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem bottomRightToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem recallLastPositionAndSizeToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip menuResize;
private System.Windows.Forms.ToolStripMenuItem doubleToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem fitToWindowToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem halfToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem quarterToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem fullscreenToolStripMenuItem1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem autofitOnResizeToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem clickThroughToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem forwardClicksToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem languageToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip menuLanguages;
private System.Windows.Forms.ToolStripMenuItem englishToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem italianoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem chromeToolStripMenuItem;
}
}

783
OnTopReplica/MainForm.cs Normal file
View file

@ -0,0 +1,783 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using OnTopReplica.Properties;
using VistaControls.Dwm;
using VistaControls.TaskDialog;
namespace OnTopReplica
{
public partial class MainForm : VistaControls.Dwm.Helpers.GlassForm
{
//Visualization status
byte _lastOpacity = 255;
bool _clickForwarding = false;
//GUI
ThumbnailPanel _thumbnailPanel = null;
RegionBox _regionBox = null;
FullscreenForm _fullscreenForm;
//Icon
NotifyIcon taskIcon = null;
//Window manager
WindowManager _windowManager;
WindowHandle _lastWindowHandle = null;
public MainForm() {
//Wheel handler
//this.MouseWheel += new MouseEventHandler(Thumbnail_MouseWheel);
InitializeComponent();
//Thumbnail panel
_thumbnailPanel = new ThumbnailPanel(Settings.Default.UseGlass);
_thumbnailPanel.RegionDrawn += new ThumbnailPanel.RegionDrawnHandler(Thumbnail_RegionDrawn);
_thumbnailPanel.CloneClick += new EventHandler<CloneClickEventArgs>(Thumbnail_CloneClick);
_thumbnailPanel.ClickThrough = !_clickForwarding;
_thumbnailPanel.Location = Point.Empty;
_thumbnailPanel.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
_thumbnailPanel.Size = ClientSize;
Controls.Add(_thumbnailPanel);
//Region box
_regionBox = new RegionBox();
_regionBox.RequestClosing += new EventHandler(RegionBox_RequestClosing);
_regionBox.RequestRegionReset += new EventHandler(RegionBox_RequestRegionReset);
_regionBox.RegionSet += new RegionBox.RegionSetHandler(RegionBox_RegionChanged);
_regionBox.Location = new Point(ClientSize.Width, 0);
_regionBox.Size = new Size(_regionBox.Width, ClientSize.Height);
_regionBox.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
_regionBox.Enabled = _regionBox.Visible = false;
Controls.Add(_regionBox);
//Full screen form
_fullscreenForm = new FullscreenForm();
_fullscreenForm.CloseRequest += new EventHandler<CloseRequestEventArgs>(FullscreenForm_CloseRequest);
//Set native renderer on context menues
Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer(new Control[] {
menuContext, menuWindows, menuOpacity, menuIconContext, menuResize, menuLanguages
});
}
void FullscreenForm_CloseRequest(object sender, CloseRequestEventArgs e) {
if (_isFullscreen) {
//Update handle to match the one selected in fullscreen mode
if (_lastWindowHandle != e.CurrentWindowHandle) {
_lastWindowHandle = e.CurrentWindowHandle;
_thumbnailPanel.SetThumbnailHandle(e.CurrentWindowHandle);
}
ToggleFullscreen();
}
}
void Thumbnail_MouseWheel(object sender, MouseEventArgs e) {
/*int delta = (int)((double)e.Delta / (double)SystemInformation.MouseWheelScrollDelta) * SystemInformation.MouseWheelScrollLines;
byte nuValue = (byte)Math.Max(0, Math.Min(255, _lastOpacity + delta));
_lastOpacity = nuValue;
this.Opacity = (double)_lastOpacity / 255.0;*/
/*
* ALTERNATIVE "Zoom" MouseWheel
*
Rectangle original;
if (_thumbnailPanel.ShowRegion)
original = _thumbnailPanel.ShownRegion;
else
original = new Rectangle(Point.Empty, _thumbnailPanel.ThumbnailOriginalSize);
Rectangle nuRegion = new Rectangle(original.Left + delta, original.Top + delta, original.Width - (delta * 2), original.Height - (delta * 2));
_thumbnailPanel.ShownRegion = nuRegion;
*/
}
void RegionBox_RegionChanged(object sender, Rectangle region) {
_thumbnailPanel.ShownRegion = region;
}
void RegionBox_RequestRegionReset(object sender, EventArgs e) {
_thumbnailPanel.ResetShownRegion();
}
void Thumbnail_RegionDrawn(object sender, Rectangle region) {
_regionBox.SetRegion(region);
}
void Thumbnail_CloneClick(object sender, CloneClickEventArgs e) {
if (_clickForwarding) {
Win32Helper.InjectFakeMouseClick(_lastWindowHandle.Handle, e.ClientClickLocation, e.IsDoubleClick);
}
}
void RegionBox_RequestClosing(object sender, EventArgs e) {
RegionBoxShowing = false;
}
void Thumbnail_IdealSizeChange(object sender, Size e) {
ClientSize = e;
}
#region Side Panels
/*const int cRegionBoxWidth = 190;
const int cRegionWithPadding = cRegionBoxWidth + 5;*/
const int cWindowBoundary = 10;
bool _regionBoxShowing = false;
bool _regionBoxDidMoveForm = false;
Point _regionBoxPrevFormLocation;
public bool RegionBoxShowing {
get {
return _regionBoxShowing;
}
set {
if (_regionBoxShowing != value) {
_regionBoxShowing = value;
//Show box
_regionBox.Visible = value;
_regionBox.Enabled = value;
//Disable dragging
HandleMouseMove = !value;
//Enable region drawing on thumbnail
_thumbnailPanel.DrawMouseRegions = value;
//Resize and move
ClientSize = new Size {
Width = ClientSize.Width + ((value) ? _regionBox.Width : -_regionBox.Width),
Height = Math.Max(ClientSize.Height, _regionBox.Height)
};
_thumbnailPanel.Size = new Size {
Width = (value) ? (ClientSize.Width - _regionBox.Width) : ClientSize.Width,
Height = ClientSize.Height
};
_regionBox.Location = new Point {
X = (value) ? (ClientSize.Width - _regionBox.Width) : ClientSize.Width,
Y = 0
};
//Set new glass margins
this.GlassMargins = (value) ?
new Margins(ClientSize.Width - _regionBox.Width, 0, 0, 0) :
new Margins(-1);
//Check form boundaries and move form if necessary
if (value) {
var screenCurr = Screen.FromControl(this);
int pRight = Location.X + Size.Width + cWindowBoundary;
if (pRight >= screenCurr.Bounds.Width) {
_regionBoxPrevFormLocation = Location;
_regionBoxDidMoveForm = true;
Location = new Point(screenCurr.WorkingArea.Width - Size.Width - cWindowBoundary, Location.Y);
}
else
_regionBoxDidMoveForm = false;
}
else {
if (_regionBoxDidMoveForm) {
Location = _regionBoxPrevFormLocation;
_regionBoxDidMoveForm = false;
}
//Resize automatically on region box closing
if (Settings.Default.AutoFitOnResize)
FitToThumbnail();
}
}
}
}
#endregion
#region Event override
protected override void OnClosing(CancelEventArgs e) {
//Destroy NotifyIcon
if (taskIcon != null) {
taskIcon.Visible = false;
taskIcon.Dispose();
}
//Store settings
if (Settings.Default.StoreWindowPosition) {
Settings.Default.WindowPositionStored = true;
Settings.Default.LastLocation = Location;
Settings.Default.LastSize = ClientSize;
}
else
Settings.Default.WindowPositionStored = false;
base.OnClosing(e);
}
protected override void OnResize(EventArgs e) {
if (RegionBoxShowing) {
this.GlassMargins = new Margins(ClientSize.Width - _regionBox.Width, 0, 0, 0);
}
/*if (RegionBoxShowing) {
_thumbnailPanel.Size = new Size(ClientSize.Width - cRegionWithPadding, ClientSize.Height);
_regionBox.Size = new Size(cRegionBoxWidth, ClientSize.Height);
_regionBox.Location = new Point(ClientSize.Width - cRegionBoxWidth, 0);
this.GlassMargins = new Margins(ClientSize.Width - cRegionBoxWidth + _regionBox.Padding.Left, _regionBox.Padding.Right, _regionBox.Padding.Top, _regionBox.Padding.Bottom);
}
else {
//Fill client with thumbnail
_thumbnailPanel.Size = ClientSize;
_regionBox.Location = new Point(ClientSize.Width, 0);
this.GlassMargins = new Margins(-1);
}*/
base.OnResize(e);
}
protected override void OnResizeEnd(EventArgs e) {
base.OnResizeEnd(e);
if (Settings.Default.AutoFitOnResize && !RegionBoxShowing)
FitToThumbnail();
}
protected override void OnShown(EventArgs e) {
//Do some checks in order to verify the presence of desktop composition
if (!VistaControls.OsSupport.IsVistaOrBetter) {
MessageBox.Show(Strings.ErrorNoDwm, Strings.ErrorNoDwmTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
base.OnShown(e);
this.Close();
return;
}
if (!VistaControls.OsSupport.IsCompositionEnabled) {
VistaControls.TaskDialog.TaskDialog dlg = new VistaControls.TaskDialog.TaskDialog(Strings.ErrorDwmOff, Strings.ErrorGenericTitle, Strings.ErrorDwmOffContent);
dlg.ExpandedControlText = Strings.ErrorDetailsAero;
dlg.ExpandedInformation = Strings.ErrorDetailsAeroInfo;
dlg.CommonButtons = TaskDialogButton.Close;
dlg.CommonIcon = VistaControls.TaskDialog.TaskDialogIcon.Stop;
dlg.Show();
base.OnShown(e);
this.Close();
return;
}
//Get a window manager
_windowManager = new WindowManager();
//Install NotifyIcon
taskIcon = new NotifyIcon();
taskIcon.Text = Strings.ApplicationName;
taskIcon.Icon = Properties.Resources.window_multiple161;
taskIcon.Visible = true;
taskIcon.ContextMenuStrip = menuIconContext;
taskIcon.DoubleClick += new EventHandler(Icon_doubleclick);
//Reload settings
if (Settings.Default.WindowPositionStored) {
Location = Settings.Default.LastLocation;
ClientSize = Settings.Default.LastSize;
}
//Glassify window
this.GlassMargins = new VistaControls.Dwm.Margins(-1);
SetGlass(Settings.Default.UseGlass);
base.OnShown(e);
}
/*protected override void OnMouseDown(MouseEventArgs e) {
base.OnMouseDown(e);
}*/
#endregion
#region Task Icon events
void Icon_doubleclick(object sender, EventArgs e) {
if (_isFullscreen)
ToggleFullscreen();
//Ensure main form is shown
this.Show();
this.Activate();
this.TopMost = true;
}
private void IconContextOpen_click(object sender, EventArgs e) {
Icon_doubleclick(sender, e);
}
private void IconContextReset_click(object sender, EventArgs e) {
var dlg = new TaskDialog(Strings.AskReset, Strings.AskResetTitle, Strings.AskResetContent);
dlg.UseCommandLinks = true;
dlg.CustomButtons = new CustomButton[] {
new CustomButton(Result.OK, Strings.AskResetButtonOk),
new CustomButton(Result.Cancel, Strings.ButtonCancel)
};
dlg.CommonIcon = TaskDialogIcon.Information;
if (dlg.Show().CommonButton == Result.OK) {
//Reset display status
Icon_doubleclick(sender, e);
//Reset form settings
ThumbnailUnset();
RegionBoxShowing = false;
Point nuLoc = Screen.PrimaryScreen.WorkingArea.Location;
nuLoc.Offset(40, 40);
Location = nuLoc;
Size = MinimumSize;
Show();
}
}
private void IconContextExit_click(object sender, EventArgs e) {
this.Close();
}
#endregion
#region Menu Event Handling
private void Menu_opening(object sender, CancelEventArgs e) {
//Cancel if currently "fullscreen" mode
if (_isFullscreen) {
e.Cancel = true;
return;
}
//Close region box if opened
if (RegionBoxShowing) {
RegionBoxShowing = false;
e.Cancel = true;
return;
}
selectRegionToolStripMenuItem.Enabled = _thumbnailPanel.IsShowingThumbnail;
switchToWindowToolStripMenuItem.Enabled = _thumbnailPanel.IsShowingThumbnail;
resizeToolStripMenuItem.Enabled = _thumbnailPanel.IsShowingThumbnail;
chromeToolStripMenuItem.Checked = (FormBorderStyle == FormBorderStyle.SizableToolWindow);
forwardClicksToolStripMenuItem.Checked = _clickForwarding;
}
private void Menu_Close_click(object sender, EventArgs e) {
this.Close();
}
private void Menu_About_click(object sender, EventArgs e) {
this.Hide();
var box = new AboutForm();
box.Location = RecenterLocation(this, box);
box.ShowDialog();
Location = RecenterLocation(box, this);
this.Show();
box.Dispose();
}
private void Menu_Language_click(object sender, EventArgs e) {
ToolStripItem tsi = (ToolStripItem)sender;
string langCode = tsi.Tag as string;
if (Program.ForceGlobalLanguageChange(langCode))
this.Close();
else
MessageBox.Show("Error");
}
private Point RecenterLocation(Control original, Control final) {
int origX = original.Location.X + original.Size.Width / 2;
int origY = original.Location.Y + original.Size.Height / 2;
int finX = origX - final.Size.Width / 2;
int finY = origY - final.Size.Height / 2;
//Check boundaries
var screen = Screen.FromControl(final);
if (finX < screen.WorkingArea.X)
finX = screen.WorkingArea.X;
if (finX + final.Size.Width > screen.WorkingArea.Width)
finX = screen.WorkingArea.Width - final.Size.Width;
if (finY < screen.WorkingArea.Y)
finY = screen.WorkingArea.Y;
if (finY + final.Size.Height > screen.WorkingArea.Height)
finY = screen.WorkingArea.Height - final.Size.Height;
return new Point(finX, finY);
}
void Menu_Windows_itemclick(object sender, EventArgs e) {
//Get clicked item and window index from tag
ToolStripItem tsi = (ToolStripItem)sender;
//Handle special "none" window
if (tsi.Tag == null) {
ThumbnailUnset();
return;
}
int index = (int)tsi.Tag;
if (_windowManager != null) {
ThumbnailSet(index);
}
}
private void Menu_Switch_click(object sender, EventArgs e) {
if (_lastWindowHandle == null)
return;
NativeMethods.SetForegroundWindow(_lastWindowHandle.Handle);
this.Hide();
}
private void Menu_Forward_click(object sender, EventArgs e) {
if (Settings.Default.FirstTimeClickForwarding && !_clickForwarding) {
TaskDialog dlg = new TaskDialog(Strings.InfoClickForwarding,
Strings.InfoClickForwardingTitle, Strings.InfoClickForwardingContent);
dlg.CommonButtons = TaskDialogButton.Yes | TaskDialogButton.No;
Results result = dlg.Show(this);
if (result.CommonButton == Result.No)
return;
Settings.Default.FirstTimeClickForwarding = false;
}
_clickForwarding = !_clickForwarding;
_thumbnailPanel.ClickThrough = !_clickForwarding;
}
private void Menu_Opacity_opening(object sender, CancelEventArgs e) {
ToolStripMenuItem[] items = {
toolStripMenuItem1,
toolStripMenuItem2,
toolStripMenuItem3,
toolStripMenuItem4
};
foreach (ToolStripMenuItem i in items) {
if ((int)i.Tag == _lastOpacity)
i.Checked = true;
else
i.Checked = false;
}
//Glass state
toolStripMenuItem5.Checked = Settings.Default.UseGlass;
}
private void Menu_Opacity_click(object sender, EventArgs e) {
//Get clicked menu item
ToolStripMenuItem tsi = sender as ToolStripMenuItem;
if (tsi != null) {
//Get opacity from the tag
int op = (int)tsi.Tag;
//Store new opacity
_lastOpacity = (byte)op;
//Set the window's opacity
this.Opacity = (double)op / 255.0;
}
}
private void Menu_Opacity_Glass_click(object sender, EventArgs e) {
SetGlass(!Settings.Default.UseGlass);
}
private void Menu_Region_click(object sender, EventArgs e) {
RegionBoxShowing = true;
}
private void Menu_Resize_opening(object sender, CancelEventArgs e) {
if (!_thumbnailPanel.IsShowingThumbnail)
e.Cancel = true;
autofitOnResizeToolStripMenuItem.Checked = Settings.Default.AutoFitOnResize;
recallLastPositionAndSizeToolStripMenuItem.Checked = Settings.Default.StoreWindowPosition;
clickThroughToolStripMenuItem.Checked = Settings.Default.ClickThrough;
}
private void Menu_Resize_Double(object sender, EventArgs e) {
FitToThumbnail(2.0);
}
private void Menu_Resize_FitToWindow(object sender, EventArgs e) {
FitToThumbnail(1.0);
}
private void Menu_Resize_Half(object sender, EventArgs e) {
FitToThumbnail(0.5);
}
private void Menu_Resize_Quarter(object sender, EventArgs e) {
FitToThumbnail(0.25);
}
private void Menu_Resize_Fullscreen(object sender, EventArgs e) {
ToggleFullscreen();
}
private void Menu_Resize_ClickThrough(object sender, EventArgs e) {
Settings.Default.ClickThrough = !Settings.Default.ClickThrough;
}
private void Menu_Resize_Autofit_click(object sender, EventArgs e) {
Settings.Default.AutoFitOnResize = !Settings.Default.AutoFitOnResize;
}
private void Menu_Position_Recall_click(object sender, EventArgs e) {
Settings.Default.StoreWindowPosition = !Settings.Default.StoreWindowPosition;
}
private void Menu_Position_TopLeft(object sender, EventArgs e) {
var screen = Screen.FromControl(this);
Location = new Point(
screen.WorkingArea.Left - SystemInformation.FrameBorderSize.Width,
screen.WorkingArea.Top - SystemInformation.FrameBorderSize.Height
);
}
private void Menu_Position_TopRight(object sender, EventArgs e) {
var screen = Screen.FromControl(this);
Location = new Point(
screen.WorkingArea.Width - Size.Width + SystemInformation.FrameBorderSize.Width,
screen.WorkingArea.Top - SystemInformation.FrameBorderSize.Height
);
}
private void Menu_Position_BottomLeft(object sender, EventArgs e) {
var screen = Screen.FromControl(this);
Location = new Point(
screen.WorkingArea.Left - SystemInformation.FrameBorderSize.Width,
screen.WorkingArea.Height - Size.Height + SystemInformation.FrameBorderSize.Height
);
}
private void Menu_Position_BottomRight(object sender, EventArgs e) {
var screen = Screen.FromControl(this);
Location = new Point(
screen.WorkingArea.Width - Size.Width + SystemInformation.FrameBorderSize.Width,
screen.WorkingArea.Height - Size.Height + SystemInformation.FrameBorderSize.Height
);
}
private void Menu_Reduce_click(object sender, EventArgs e) {
//Hide form
this.Hide();
}
private void Menu_Windows_opening(object sender, EventArgs e) {
//Refresh window list
_windowManager.Refresh(WindowManager.EnumerationMode.TaskWindows);
WindowListHelper.PopulateMenu(_windowManager, menuWindows, _lastWindowHandle, new EventHandler(Menu_Windows_itemclick));
}
private void Menu_Chrome_click(object sender, EventArgs e) {
if (FormBorderStyle == FormBorderStyle.SizableToolWindow)
FormBorderStyle = FormBorderStyle.None;
else
FormBorderStyle = FormBorderStyle.SizableToolWindow;
Invalidate();
}
#endregion
#region Event handling
private void Form_doubleclick(object sender, EventArgs e) {
if(_thumbnailPanel.IsShowingThumbnail)
ToggleFullscreen();
}
#endregion
#region Fullscreen
bool _isFullscreen = false;
private void ToggleFullscreen() {
if (_isFullscreen) {
_fullscreenForm.Visible = false;
this.Visible = true;
}
else {
if (_lastWindowHandle == null) {
//Should not happen... if it does, do nothing
return;
}
CheckFirstTimeClickThrough();
_fullscreenForm.DisplayFullscreen(Screen.FromControl(this), _lastWindowHandle);
_fullscreenForm.ShownRegion = _thumbnailPanel.ShownRegion;
_fullscreenForm.ShowRegion = _thumbnailPanel.ShowRegion;
_fullscreenForm.Opacity = this.Opacity;
//Enable click through if it is enabled and opacity is less than 255 (opaque)
_fullscreenForm.ClickThrough = (Settings.Default.ClickThrough && _lastOpacity < 255);
_fullscreenForm.Visible = true;
this.Visible = false;
}
_isFullscreen = !_isFullscreen;
}
/// <summary>Check if the user uses click-through for the first time and asks confirmation.</summary>
private void CheckFirstTimeClickThrough() {
if (Settings.Default.FirstTimeClickThrough && _lastOpacity < 255) {
//Alert the user about click through
TaskDialog dlg = new TaskDialog(Strings.InfoClickThrough, Strings.InfoClickThroughTitle, Strings.InfoClickThroughInformation);
dlg.CommonIcon = TaskDialogIcon.Information;
dlg.ExpandedControlText = Strings.ErrorDetailButton;
dlg.ExpandedInformation = Strings.InfoClickThroughDetails;
dlg.UseCommandLinks = true;
dlg.CustomButtons = new CustomButton[] {
new CustomButton(Result.Yes, Strings.InfoClickThroughOk),
new CustomButton(Result.No, Strings.InfoClickThroughNo)
};
Settings.Default.ClickThrough = (dlg.Show(this).CommonButton == Result.Yes);
}
Settings.Default.FirstTimeClickThrough = false;
}
#endregion
#region Thumbnail operation
private void ThumbnailSet(int index) {
try {
_lastWindowHandle = _windowManager.Windows[index];
_thumbnailPanel.SetThumbnailHandle(_lastWindowHandle);
}
catch (Exception ex) {
ThumbnailError(ex, false, Strings.ErrorUnableToCreateThumbnail);
}
if(Settings.Default.AutoFitOnResize)
FitToThumbnail();
_regionBox.Reset();
//GUI
selectRegionToolStripMenuItem.Enabled = true;
resizeToolStripMenuItem.Enabled = true;
}
private void ThumbnailUnset(){
_lastWindowHandle = null;
_thumbnailPanel.UnsetThumbnail();
_regionBox.Reset();
}
private void ThumbnailError(Exception ex, bool suppress, string title){
if (!suppress) {
ShowErrorDialog(title, Strings.ErrorGenericThumbnailHandleError, ex.Message);
}
ThumbnailUnset();
}
/// <summary>Automatically sizes the window in order to accomodate the thumbnail p times.</summary>
/// <param name="p">Scale of the thumbnail to consider.</param>
private void FitToThumbnail(double p) {
try {
Size originalSize = _thumbnailPanel.ThumbnailOriginalSize;
Size fittedSize = new Size((int)(originalSize.Width * p), (int)(originalSize.Height * p));
ClientSize = fittedSize;
}
catch (Exception ex) {
ThumbnailError(ex, false, Strings.ErrorUnableToFit);
}
}
/// <summary>Automatically fits the window to the current thumbnail.</summary>
/// <remarks>Only adjusts height and corrects the window's position.</remarks>
private void FitToThumbnail() {
if (_thumbnailPanel.IsShowingThumbnail) {
var source = _thumbnailPanel.ThumbnailOriginalSize;
double ratio = (double)source.Width / (double)source.Height;
int width = (RegionBoxShowing) ? (ClientSize.Width - _regionBox.Width) : ClientSize.Width;
//(RegionBoxShowing) ? ClientSize.Width - cRegionWithPadding : ClientSize.Width;
int newHeight = (int)(width / ratio);
int diffHeight = ClientSize.Height - newHeight;
ClientSize = new Size(ClientSize.Width, newHeight);
Location = new Point(Location.X, Location.Y + diffHeight / 2);
}
}
#endregion
#region GUI stuff
/// <summary>Do whatever needed to set the "glass" effect to the desired state.</summary>
protected void SetGlass(bool b) {
this.GlassEnabled = b;
_thumbnailPanel.GlassMode = b;
_regionBox.GlassMode = b;
this.Invalidate();
//Store
Settings.Default.UseGlass = b;
}
private void ShowErrorDialog(string mainInstruction, string explanation, string errorMessage) {
TaskDialog dlg = new TaskDialog(mainInstruction, Strings.ErrorGenericTitle, explanation);
dlg.CommonIcon = TaskDialogIcon.Stop;
dlg.IsExpanded = false;
if (!string.IsNullOrEmpty(errorMessage)) {
dlg.ExpandedInformation = Strings.ErrorGenericInfoText + errorMessage;
dlg.ExpandedControlText = Strings.ErrorGenericInfoButton;
}
dlg.Show(this.Handle);
}
#endregion
}
}

266
OnTopReplica/MainForm.resx Normal file
View file

@ -0,0 +1,266 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuWindows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>142, 17</value>
</metadata>
<metadata name="menuOpacity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>275, 17</value>
</metadata>
<metadata name="menuResize.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>547, 17</value>
</metadata>
<metadata name="menuLanguages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>664, 17</value>
</metadata>
<metadata name="menuIconContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>399, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAMDAAAAEAGACoHAAAFgAAACgAAAAwAAAAYAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AABBdztCdjhDeDpCdzlCdjpDdzpFfD5EeTpGfDtFfDtFfjpJgjtHfjlHgTpIgjtNiDxKgzlKhDlKiDhO
iztNijpMjDpPjTtSkz1Vlz1YnD1bpD5dpz1hqT9lrEFkrT5oskJnsD1prT1orD1mqTlmpjlkpDdmozpj
nDVhmDRekzJekTJekDNjkjNeijFbiC1ahSxDeDlDdztDdztEdzpFejpEeDhEdzlEeDpGezhGfThGfDhH
fThHfjlIgjhIgzpKgzhJhDhKhjhLhzlNiTlLiDlPjTlVlz1VmDxYnTxdoT5gqD1iqj9jrkBlr0BnsEBp
rz1nrT1orTtmqzhlpzhopjpjoDVgmzNgmDNflTJejy9cjy5gkS9bii5ciC1chyxbhytCdjpDdzlDeDlG
eztDdjhDdzhDdzdEeDhHfDdFejZFezdGfTdJgzlIgDdIgTlKgzdLhDhKhjlLhjhMiTlQkDpSlDtXmDtY
nTtcozxepz1hqz1jrT1oskBorztpsDxnrjxorTtmqzplqTppqjxioDVfnDRfmDNflTJdkjBekjFcji9c
iy9biS1ciCxciCtgjS1DdjhEezpDeDhCdTdEdTZEdjVFeDVFeDVHdzREezZGfjdIfTZHfTdIgDdJgjdK
hDZKhDZKhDZMhzdTkztSlDpWmjtanjtcozxepz1gqD1kqzxorz1nsD5psDxorztlrTtmqzpmqDxkpTli
oDZgnTVelzNclTJdkjFilTNaji5biy5bii1bii1ciSxfjSxdiypGejpCdTZDdThFdTdGeDdFeDZEdzdG
eDZIejhLgTpIeztLfjdKgDlLgjlMhDpMhTlOhTpPjDtTkTtWlTxZmj5coT5gpT9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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
</root>

View file

@ -0,0 +1,303 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace OnTopReplica
{
static class NativeMethods
{
/// <summary>A native Rectangle Structure.</summary>
[StructLayout(LayoutKind.Sequential)]
public struct Rectangle
{
public Rectangle(int left, int top, int right, int bottom) {
Left = left;
Top = top;
Right = right;
Bottom = bottom;
}
public Rectangle(System.Drawing.Rectangle rect) {
Left = rect.X;
Top = rect.Y;
Right = rect.Right;
Bottom = rect.Bottom;
}
public int Left;
public int Top;
public int Right;
public int Bottom;
public int Width {
get {
return Right - Left;
}
}
public int Height {
get {
return Bottom - Top;
}
}
public System.Drawing.Rectangle ToRectangle() {
return new System.Drawing.Rectangle(Left, Top, Right - Left, Bottom - Top);
}
}
[StructLayout(LayoutKind.Sequential)]
public struct Point {
public int X, Y;
public Point(int x, int y) {
X = x;
Y = y;
}
public Point(Point copy) {
X = copy.X;
Y = copy.Y;
}
public static Point FromPoint(System.Drawing.Point point) {
return new Point(point.X, point.Y);
}
public System.Drawing.Point ToPoint() {
return new System.Drawing.Point(X, Y);
}
public override string ToString() {
return "{" + X + "," + Y + "}";
}
}
[DllImport("user32.dll")]
public static extern IntPtr RealChildWindowFromPoint(IntPtr parent, Point point);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
static extern bool GetClientRect(IntPtr hWnd, out Rectangle lpRect);
public static System.Drawing.Rectangle GetClient(IntPtr hWnd) {
Rectangle ret;
if (GetClientRect(hWnd, out ret))
return ret.ToRectangle();
else
throw new Exception("Failed to get Client Rectangle.");
}
[DllImport("user32.dll")]
static extern bool GetWindowRect(IntPtr hWnd, out Rectangle lpRect);
public static System.Drawing.Rectangle GetWindowBounds(IntPtr hWnd) {
Rectangle ret = new Rectangle();
if (GetWindowRect(hWnd, out ret))
return ret.ToRectangle();
else
throw new Exception("Failed to get Window Bounds.");
}
[return: MarshalAs(UnmanagedType.Bool)]
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsWindowVisible(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern IntPtr GetDesktopWindow();
[DllImport("user32.dll")]
static extern bool ClientToScreen(IntPtr hwnd, ref Point point);
public static Point ClientToScreen(IntPtr hwnd, Point clientPoint) {
Point localCopy = new Point(clientPoint);
if (ClientToScreen(hwnd, ref localCopy))
return localCopy;
else
return new Point();
}
[DllImport("user32.dll")]
static extern bool ScreenToClient(IntPtr hwnd, ref Point point);
public static Point ScreenToClient(IntPtr hwnd, Point screenPoint) {
Point localCopy = new Point(screenPoint);
if (ScreenToClient(hwnd, ref localCopy))
return localCopy;
else
return new Point();
}
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr GetParent(IntPtr hWnd);
public enum GetAncestorMode : uint {
Parent = 1,
Root = 2,
RootOwner = 3
}
public enum GetWindowMode : uint {
GW_HWNDFIRST = 0,
GW_HWNDLAST = 1,
GW_HWNDNEXT = 2,
GW_HWNDPREV = 3,
GW_OWNER = 4,
GW_CHILD = 5,
GW_ENABLEDPOPUP = 6
}
[DllImport("user32.dll")]
public static extern IntPtr GetWindow(IntPtr hwnd, GetWindowMode mode);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int GetWindowTextLength(IntPtr hWnd);
public enum WindowLong {
WndProc = (-4),
HInstance = (-6),
HwndParent = (-8),
Style = (-16),
ExStyle = (-20),
UserData = (-21),
Id = (-12)
}
public enum ClassLong {
Icon = -14,
IconSmall = -34
}
[Flags]
public enum WindowStyles : long {
None = 0,
Disabled = 0x8000000L,
Minimize = 0x20000000L,
MinimizeBox = 0x20000L,
Visible = 0x10000000L
}
[Flags]
public enum WindowExStyles : long {
AppWindow = 0x40000,
Layered = 0x80000,
NoActivate = 0x8000000L,
ToolWindow = 0x80,
TopMost = 8,
Transparent = 0x20
}
public static IntPtr GetWindowLong(IntPtr hWnd, WindowLong i) {
if (IntPtr.Size == 8) {
return GetWindowLongPtr64(hWnd, (int)i);
}
else {
return new IntPtr(GetWindowLong32(hWnd, (int)i));
}
}
[DllImport("user32.dll", EntryPoint = "GetWindowLong")]
private static extern int GetWindowLong32(IntPtr hWnd, int nIndex);
[DllImport("user32.dll", EntryPoint = "GetWindowLongPtr")]
private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);
public static IntPtr GetClassLongPtr(IntPtr hWnd, ClassLong i) {
if (IntPtr.Size == 8) {
return GetClassLong64(hWnd, (int)i);
}
return new IntPtr(GetClassLong32(hWnd, (int)i));
}
[DllImport("user32.dll", EntryPoint = "GetClassLongPtrW")]
private static extern IntPtr GetClassLong64(IntPtr hWnd, int nIndex);
[DllImport("user32.dll", EntryPoint = "GetClassLongW")]
private static extern int GetClassLong32(IntPtr hWnd, int nIndex);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll")]
public static extern IntPtr SendMessageTimeout(IntPtr hwnd, uint message, IntPtr wparam, IntPtr lparam, SendMessageTimeoutFlags flags, uint timeout, out IntPtr result);
public const uint WM_GETICON = 0x7f;
[Flags]
public enum SendMessageTimeoutFlags : uint {
AbortIfHung = 2,
Block = 1,
Normal = 0
}
public const int HTTRANSPARENT = -1;
public const int WM_NCHITTEST = 0x84;
public const int WM_NCPAINT = 0x0085;
public const int WM_LBUTTONDOWN = 0x0201;
public const int WM_LBUTTONUP = 0x0202;
public const int WM_LBUTTONDBLCLK = 0x0203;
public const int MK_LBUTTON = 0x0001;
//public const int MN_GETHMENU = 0x01E1;
public static IntPtr MakeLParam(int LoWord, int HiWord) {
return new IntPtr((HiWord << 16) | (LoWord & 0xffff));
}
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", SetLastError = false)]
public static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", SetLastError = false)]
public static extern bool SetForegroundWindow(IntPtr hwnd);
[DllImport("user32.dll")]
public static extern IntPtr GetMenu(IntPtr hwnd);
public static uint WTNCA_NODRAWCAPTION = 0x00000001;
public static uint WTNCA_NODRAWICON = 0x00000002;
public static uint WTNCA_NOSYSMENU = 0x00000004;
public static uint WTNCA_NOMIRRORHELP = 0x00000008;
[StructLayout(LayoutKind.Sequential)]
public struct WTA_OPTIONS {
public uint Flags;
public uint Mask;
}
public enum WindowThemeAttributeType {
WTA_NONCLIENT = 1,
};
[DllImport("UxTheme.dll")]
public static extern int SetWindowThemeAttribute(IntPtr hWnd, WindowThemeAttributeType wtype, ref WTA_OPTIONS attributes, uint size);
}
}

View file

@ -0,0 +1,587 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Diagnostics.CodeAnalysis;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using System.Runtime.InteropServices;
namespace Asztal.Szótár {
public enum ToolbarTheme {
Toolbar,
MediaToolbar,
CommunicationsToolbar,
BrowserTabBar
}
/// <summary>
/// Renders a toolstrip using the UxTheme API via VisualStyleRenderer. Visual styles must be supported for this to work; if you need to support other operating systems use
/// </summary>
class UXThemeToolStripRenderer : ToolStripSystemRenderer {
/// <summary>
/// It shouldn't be necessary to P/Invoke like this, however a bug in VisualStyleRenderer.GetMargins forces my hand.
/// </summary>
static internal class NativeMethods {
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MARGINS {
public int cxLeftWidth;
public int cxRightWidth;
public int cyTopHeight;
public int cyBottomHeight;
}
[DllImport("uxtheme", ExactSpelling = true)]
public extern static Int32 GetThemeMargins(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, int iPropId, IntPtr rect, out MARGINS pMargins);
}
//See http://msdn2.microsoft.com/en-us/library/bb773210.aspx - "Parts and States"
#region Parts and States
enum MenuParts : int {
MENU_MENUITEM_TMSCHEMA = 1,
MENU_MENUDROPDOWN_TMSCHEMA = 2,
MENU_MENUBARITEM_TMSCHEMA = 3,
MENU_MENUBARDROPDOWN_TMSCHEMA = 4,
MENU_CHEVRON_TMSCHEMA = 5,
MENU_SEPARATOR_TMSCHEMA = 6,
MENU_BARBACKGROUND = 7,
MENU_BARITEM = 8,
MENU_POPUPBACKGROUND = 9,
MENU_POPUPBORDERS = 10,
MENU_POPUPCHECK = 11,
MENU_POPUPCHECKBACKGROUND = 12,
MENU_POPUPGUTTER = 13,
MENU_POPUPITEM = 14,
MENU_POPUPSEPARATOR = 15,
MENU_POPUPSUBMENU = 16,
MENU_SYSTEMCLOSE = 17,
MENU_SYSTEMMAXIMIZE = 18,
MENU_SYSTEMMINIMIZE = 19,
MENU_SYSTEMRESTORE = 20
}
enum MenuBarStates : int {
MB_ACTIVE = 1,
MB_INACTIVE = 2
}
enum MenuBarItemStates : int {
MBI_NORMAL = 1,
MBI_HOT = 2,
MBI_PUSHED = 3,
MBI_DISABLED = 4,
MBI_DISABLEDHOT = 5,
MBI_DISABLEDPUSHED = 6
}
enum MenuPopupItemStates : int {
MPI_NORMAL = 1,
MPI_HOT = 2,
MPI_DISABLED = 3,
MPI_DISABLEDHOT = 4
}
enum MenuPopupCheckStates : int {
MC_CHECKMARKNORMAL = 1,
MC_CHECKMARKDISABLED = 2,
MC_BULLETNORMAL = 3,
MC_BULLETDISABLED = 4
}
enum MenuPopupCheckBackgroundStates : int {
MCB_DISABLED = 1,
MCB_NORMAL = 2,
MCB_BITMAP = 3
}
enum MenuPopupSubMenuStates : int {
MSM_NORMAL = 1,
MSM_DISABLED = 2
}
enum MarginTypes : int {
TMT_SIZINGMARGINS = 3601,
TMT_CONTENTMARGINS = 3602,
TMT_CAPTIONMARGINS = 3603
}
const int RP_BACKGROUND = 6;
#endregion
#region Theme helpers
Padding GetThemeMargins(IDeviceContext dc, MarginTypes marginType) {
NativeMethods.MARGINS margins;
try {
IntPtr hDC = dc.GetHdc();
if (0 == NativeMethods.GetThemeMargins(renderer.Handle, hDC, renderer.Part, renderer.State, (int)marginType, IntPtr.Zero, out margins))
return new Padding(margins.cxLeftWidth, margins.cyTopHeight, margins.cxRightWidth, margins.cyBottomHeight);
return new Padding(-1);
} finally {
dc.ReleaseHdc();
}
}
private static int GetItemState(ToolStripItem item) {
bool pressed = item.Pressed;
bool hot = item.Selected;
if (item.Owner.IsDropDown) {
if (item.Enabled)
return hot ? (int)MenuPopupItemStates.MPI_HOT : (int)MenuPopupItemStates.MPI_NORMAL;
return hot ? (int)MenuPopupItemStates.MPI_DISABLEDHOT : (int)MenuPopupItemStates.MPI_DISABLED;
} else {
if (pressed)
return item.Enabled ? (int)MenuBarItemStates.MBI_PUSHED : (int)MenuBarItemStates.MBI_DISABLEDPUSHED;
if (item.Enabled)
return hot ? (int)MenuBarItemStates.MBI_HOT : (int)MenuBarItemStates.MBI_NORMAL;
return hot ? (int)MenuBarItemStates.MBI_DISABLEDHOT : (int)MenuBarItemStates.MBI_DISABLED;
}
}
#endregion
#region Theme subclasses
public ToolbarTheme Theme {
get; set;
}
private string RebarClass {
get {
return SubclassPrefix + "Rebar";
}
}
private string ToolbarClass {
get {
return SubclassPrefix + "ToolBar";
}
}
private string MenuClass {
get {
return SubclassPrefix + "Menu";
}
}
private string SubclassPrefix {
get {
switch (Theme) {
case ToolbarTheme.MediaToolbar: return "Media::";
case ToolbarTheme.CommunicationsToolbar: return "Communications::";
case ToolbarTheme.BrowserTabBar: return "BrowserTabBar::";
default: return string.Empty;
}
}
}
private VisualStyleElement Subclass(VisualStyleElement element) {
return VisualStyleElement.CreateElement(SubclassPrefix + element.ClassName,
element.Part, element.State);
}
#endregion
VisualStyleRenderer renderer;
public UXThemeToolStripRenderer(ToolbarTheme theme) {
Theme = theme;
renderer = new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Normal);
}
#region Borders
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) {
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPBORDERS, 0);
if (e.ToolStrip.IsDropDown) {
Region oldClip = e.Graphics.Clip;
//Tool strip borders are rendered *after* the content, for some reason.
//So we have to exclude the inside of the popup otherwise we'll draw over it.
Rectangle insideRect = e.ToolStrip.ClientRectangle;
insideRect.Inflate(-1, -1);
e.Graphics.ExcludeClip(insideRect);
renderer.DrawBackground(e.Graphics, e.ToolStrip.ClientRectangle, e.AffectedBounds);
//Restore the old clip in case the Graphics is used again (does that ever happen?)
e.Graphics.Clip = oldClip;
}
}
#endregion
#region Backgrounds
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) {
int partId = e.Item.Owner.IsDropDown ? (int)MenuParts.MENU_POPUPITEM : (int)MenuParts.MENU_BARITEM;
renderer.SetParameters(MenuClass, partId, GetItemState(e.Item));
Rectangle bgRect = e.Item.ContentRectangle;
Padding content = GetThemeMargins(e.Graphics, MarginTypes.TMT_CONTENTMARGINS),
sizing = GetThemeMargins(e.Graphics, MarginTypes.TMT_SIZINGMARGINS),
caption = GetThemeMargins(e.Graphics, MarginTypes.TMT_CAPTIONMARGINS);
if (!e.Item.Owner.IsDropDown) {
bgRect.Y = 0;
bgRect.Height = e.ToolStrip.Height;
bgRect.Inflate(-1, -1); //GetMargins here perhaps?
}
renderer.DrawBackground(e.Graphics, bgRect, bgRect);
}
protected override void OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs e) {
//Draw the background using Rebar & RP_BACKGROUND (or, if that is not available, fall back to
//Rebar.Band.Normal)
if (VisualStyleRenderer.IsElementDefined(VisualStyleElement.CreateElement(RebarClass, RP_BACKGROUND, 0))) {
renderer.SetParameters(RebarClass, RP_BACKGROUND, 0);
} else {
renderer.SetParameters(RebarClass, 0, 0);
//renderer.SetParameters(VisualStyleElement.Taskbar.BackgroundBottom.Normal);
//renderer.SetParameters(Subclass(VisualStyleElement.Rebar.Band.Normal));
}
if (renderer.IsBackgroundPartiallyTransparent())
renderer.DrawParentBackground(e.Graphics, e.ToolStripPanel.ClientRectangle, e.ToolStripPanel);
renderer.DrawBackground(e.Graphics, e.ToolStripPanel.ClientRectangle);
//Draw the etched edges of each row.
//renderer.SetParameters(Subclass(VisualStyleElement.Rebar.Band.Normal));
//foreach (ToolStripPanelRow row in e.ToolStripPanel.Rows) {
// Rectangle rowBounds = row.Bounds;
// rowBounds.Offset(0, -1);
// renderer.DrawEdge(e.Graphics, rowBounds, Edges.Top, EdgeStyle.Etched, EdgeEffects.None);
//}
e.Handled = true;
}
//Render the background of an actual menu bar, dropdown menu or toolbar.
protected override void OnRenderToolStripBackground(System.Windows.Forms.ToolStripRenderEventArgs e) {
if (e.ToolStrip.IsDropDown) {
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPBACKGROUND, 0);
} else {
//It's a MenuStrip or a ToolStrip. If it's contained inside a larger panel, it should have a
//transparent background, showing the panel's background.
if (e.ToolStrip.Parent is ToolStripPanel) {
//The background should be transparent, because the ToolStripPanel's background will be visible.
//(Of course, we assume the ToolStripPanel is drawn using the same theme, but it's not my fault
//if someone does that.)
return;
} else {
//A lone toolbar/menubar should act like it's inside a toolbox, I guess.
//Maybe I should use the MenuClass in the case of a MenuStrip, although that would break
//the other themes...
if(VisualStyleRenderer.IsElementDefined(VisualStyleElement.CreateElement(RebarClass, RP_BACKGROUND, 0)))
renderer.SetParameters(RebarClass, RP_BACKGROUND, 0);
else
renderer.SetParameters(RebarClass, 0, 0);
}
}
if (renderer.IsBackgroundPartiallyTransparent())
renderer.DrawParentBackground(e.Graphics, e.ToolStrip.ClientRectangle, e.ToolStrip);
renderer.DrawBackground(e.Graphics, e.ToolStrip.ClientRectangle, e.AffectedBounds);
}
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) {
//e.Graphics.FillRectangle(Brushes.RosyBrown, e.ToolStripContentPanel.ClientRectangle);
//base.OnRenderToolStripContentPanelBackground(e);
}
//Some sort of chevron thing?
//protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs e) {
// base.OnRenderOverflowButtonBackground(e);
//}
#endregion
#region Text
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) {
int partId = e.Item.Owner.IsDropDown ? (int)MenuParts.MENU_POPUPITEM : (int)MenuParts.MENU_BARITEM;
renderer.SetParameters(MenuClass, partId, GetItemState(e.Item));
Color color = renderer.GetColor(ColorProperty.TextColor);
if(e.Item.Owner.IsDropDown || e.Item.Owner is MenuStrip)
e.TextColor = color;
base.OnRenderItemText(e);
}
#endregion
#region Glyphs
//protected override void OnRenderGrip(ToolStripGripRenderEventArgs e) {
// if (e.GripStyle == ToolStripGripStyle.Visible) {
// renderer.SetParameters(VisualStyleElement.Rebar.Gripper.Normal);
// renderer.DrawBackground(e.Graphics, e.GripBounds, e.AffectedBounds);
// }
//}
protected override void OnRenderImageMargin(ToolStripRenderEventArgs e) {
if (e.ToolStrip.IsDropDown) {
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPGUTTER, 0);
Rectangle displayRect = e.ToolStrip.DisplayRectangle,
marginRect = new Rectangle(0, displayRect.Top, displayRect.Left, displayRect.Height);
//e.Graphics.DrawRectangle(Pens.Black, marginRect);
renderer.DrawBackground(e.Graphics, marginRect, marginRect);
}
}
protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) {
if (e.ToolStrip.IsDropDown) {
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPSEPARATOR, 0);
Rectangle rect = new Rectangle(e.ToolStrip.DisplayRectangle.Left, 0, e.ToolStrip.DisplayRectangle.Width, e.Item.Height);
renderer.DrawBackground(e.Graphics, rect, rect);
} else {
base.OnRenderSeparator(e);
}
}
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) {
ToolStripMenuItem item = e.Item as ToolStripMenuItem;
if (item != null) {
if (item.Checked) {
Rectangle rect = e.Item.ContentRectangle;
rect.Width = rect.Height;
//Center the checkmark horizontally in the gutter (looks ugly, though)
//rect.X = (e.ToolStrip.DisplayRectangle.Left - rect.Width) / 2;
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPCHECKBACKGROUND, e.Item.Enabled ? (int)MenuPopupCheckBackgroundStates.MCB_NORMAL : (int)MenuPopupCheckBackgroundStates.MCB_DISABLED);
renderer.DrawBackground(e.Graphics, rect);
Padding margins = GetThemeMargins(e.Graphics, MarginTypes.TMT_SIZINGMARGINS);
rect = new Rectangle(rect.X + margins.Left, rect.Y + margins.Top,
rect.Width - margins.Horizontal,
rect.Height - margins.Vertical);
//I don't think ToolStrip even supports radio box items. So no need to render them.
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPCHECK, e.Item.Enabled ? (int)MenuPopupCheckStates.MC_CHECKMARKNORMAL : (int)MenuPopupCheckStates.MC_CHECKMARKDISABLED);
renderer.DrawBackground(e.Graphics, rect);
}
} else {
base.OnRenderItemCheck(e);
}
}
//This is broken for RTL
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) {
int stateId = e.Item.Enabled ? (int)MenuPopupSubMenuStates.MSM_NORMAL : (int)MenuPopupSubMenuStates.MSM_DISABLED;
renderer.SetParameters(MenuClass, (int)MenuParts.MENU_POPUPSUBMENU, stateId);
renderer.DrawBackground(e.Graphics, e.ArrowRectangle);
}
protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs e) {
renderer.SetParameters(RebarClass, VisualStyleElement.Rebar.Chevron.Normal.Part, VisualStyleElement.Rebar.Chevron.Normal.State);
renderer.DrawBackground(e.Graphics, e.Item.ContentRectangle);
//base.OnRenderOverflowButtonBackground(e);
}
#endregion
public static bool IsSupported {
get {
if (!VisualStyleRenderer.IsSupported)
return false;
return VisualStyleRenderer.IsElementDefined(VisualStyleElement.CreateElement("MENU", (int)MenuParts.MENU_BARBACKGROUND, (int)MenuBarStates.MB_ACTIVE));
}
}
}
/// <summary>
/// Renders a toolstrip using UXTheme if possible, and switches back to the default
/// ToolStripRenderer when UXTheme-based rendering is not available.
/// Designed for menu bars and context menus - it is not guaranteed to work with anything else.
/// </summary>
/// <example>
/// NativeToolStripRenderer.SetToolStripRenderer(toolStrip1, toolStrip2, contextMenuStrip1);
/// </example>
/// <example>
/// toolStrip1.Renderer = new NativeToolStripRenderer();
/// </example>
public class NativeToolStripRenderer : ToolStripRenderer {
UXThemeToolStripRenderer nativeRenderer;
ToolStripRenderer defaultRenderer;
ToolStrip toolStrip;
//NativeToolStripRenderer looks best with no padding - but keep the old padding in case the
//visual styles become unsupported again (e.g. user changes to windows classic skin)
Padding defaultPadding;
#region Constructors
/// <summary>
/// Creates a NativeToolStripRenderer for a particular ToolStrip. NativeToolStripRenderer will subscribe to some events
/// of this ToolStrip.
/// </summary>
/// <param name="toolStrip">The toolstrip for this NativeToolStripRenderer. NativeToolStripRenderer will subscribe to some events
/// of this ToolStrip.</param>
public NativeToolStripRenderer(ToolStrip toolStrip, ToolbarTheme theme) {
if (toolStrip == null)
throw new ArgumentNullException("toolStrip", "ToolStrip cannot be null.");
Theme = theme;
this.toolStrip = toolStrip;
defaultRenderer = toolStrip.Renderer;
defaultPadding = toolStrip.Padding;
toolStrip.SystemColorsChanged += new EventHandler(toolStrip_SystemColorsChanged);
//Can't initialize here - constructor throws if visual styles not enabled
//nativeRenderer = new NativeToolStripRenderer();
}
public NativeToolStripRenderer(ToolStripPanel panel, ToolbarTheme theme) {
if (panel == null)
throw new ArgumentNullException("panel", "Panel cannot be null.");
Theme = theme;
this.toolStrip = null;
defaultRenderer = panel.Renderer;
}
#endregion
public ToolbarTheme Theme { get; set; }
void toolStrip_SystemColorsChanged(object sender, EventArgs e) {
if (toolStrip == null)
return;
if (UXThemeToolStripRenderer.IsSupported)
toolStrip.Padding = Padding.Empty;
else
toolStrip.Padding = defaultPadding;
}
//This is indeed called every time a menu part is rendered, but I can't
//find a way of caching it that I can be sure has no race conditions.
//The check is no longer very costly, anyway.
protected ToolStripRenderer ActualRenderer {
get {
bool nativeSupported = UXThemeToolStripRenderer.IsSupported;
if (nativeSupported) {
if (nativeRenderer == null)
nativeRenderer = new UXThemeToolStripRenderer(Theme);
return nativeRenderer;
}
return defaultRenderer;
}
}
#region InitializeXXX
protected override void Initialize(ToolStrip toolStrip) {
base.Initialize(toolStrip);
toolStrip.Padding = Padding.Empty;
if (/*!(toolStrip is MenuStrip) &&*/ toolStrip.Parent is ToolStripPanel) {
toolStrip.BackColor = Color.Transparent;
}
}
protected override void InitializePanel(ToolStripPanel toolStripPanel) {
base.InitializePanel(toolStripPanel);
}
protected override void InitializeItem(ToolStripItem item) {
base.InitializeItem(item);
}
#endregion
#region SetToolStripRenderer
/// <summary>
/// Sets the renderer of each ToolStrip to a NativeToolStripRenderer. A convenience method.
/// </summary>
/// <param name="toolStrips">A parameter list of ToolStrips.</param>
[SuppressMessage("Microsoft.Design", "CA1062")] //The parameter array is actually checked.
public static void SetToolStripRenderer(ToolbarTheme theme, params Control[] toolStrips) {
foreach (Control ts in toolStrips) {
if (ts == null)
throw new ArgumentNullException("toolStrips", "ToolStrips cannot contain a null reference.");
}
foreach (Control ts in toolStrips) {
if (ts is ToolStrip) {
ToolStrip t = (ToolStrip)ts;
t.Renderer = new NativeToolStripRenderer(t, theme);
} else if (ts is ToolStripPanel) {
ToolStripPanel t = (ToolStripPanel)ts;
t.Renderer = new NativeToolStripRenderer(t, theme);
} else
throw new ArgumentException("Can't set the renderer for a " + ts.GetType().Name);
}
}
public static void SetToolStripRenderer(params Control[] toolStrips) {
SetToolStripRenderer(ToolbarTheme.Toolbar, toolStrips);
}
#endregion
#region Overridden Methods - Deferred to actual renderer
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) {
ActualRenderer.DrawArrow(e);
}
protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) {
ActualRenderer.DrawButtonBackground(e);
}
protected override void OnRenderDropDownButtonBackground(ToolStripItemRenderEventArgs e) {
ActualRenderer.DrawDropDownButtonBackground(e);
}
protected override void OnRenderGrip(ToolStripGripRenderEventArgs e) {
ActualRenderer.DrawGrip(e);
}
protected override void OnRenderImageMargin(ToolStripRenderEventArgs e) {
ActualRenderer.DrawImageMargin(e);
}
protected override void OnRenderItemBackground(ToolStripItemRenderEventArgs e) {
ActualRenderer.DrawItemBackground(e);
}
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) {
ActualRenderer.DrawItemCheck(e);
}
protected override void OnRenderItemImage(ToolStripItemImageRenderEventArgs e) {
ActualRenderer.DrawItemImage(e);
}
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) {
ActualRenderer.DrawItemText(e);
}
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) {
ActualRenderer.DrawMenuItemBackground(e);
}
protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) {
ActualRenderer.DrawSeparator(e);
}
protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) {
ActualRenderer.DrawToolStripBackground(e);
}
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) {
ActualRenderer.DrawToolStripBorder(e);
}
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) {
ActualRenderer.DrawToolStripContentPanelBackground(e);
}
protected override void OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs e) {
ActualRenderer.DrawToolStripPanelBackground(e);
}
#endregion
}
}

View file

@ -0,0 +1,276 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E626BD6E-BF38-4EB7-A128-5CA6F40EF557}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnTopReplica</RootNamespace>
<AssemblyName>OnTopReplica</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<IsWebBootstrapper>true</IsWebBootstrapper>
<GenerateManifests>true</GenerateManifests>
<TargetZone>Internet</TargetZone>
<StartupObject>OnTopReplica.Program</StartupObject>
<ExcludedPermissions>
</ExcludedPermissions>
<ApplicationManifest>Properties\OnTopReplica.exe.manifest</ApplicationManifest>
<SignAssembly>false</SignAssembly>
<ManifestCertificateThumbprint>EF37CC602CF25CE1023AEAAF8B200801D77452D5</ManifestCertificateThumbprint>
<ManifestKeyFile>OnTopReplica_TemporaryKey.pfx</ManifestKeyFile>
<SignManifests>true</SignManifests>
<TargetFrameworkSubset>
</TargetFrameworkSubset>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Background</UpdateMode>
<UpdateInterval>1</UpdateInterval>
<UpdateIntervalUnits>Weeks</UpdateIntervalUnits>
<UpdatePeriodically>true</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>http://www.klopfenstein.net/public/Uploads/ontopreplica/</InstallUrl>
<UpdateUrl>http://www.klopfenstein.net/public/Uploads/ontopreplica/</UpdateUrl>
<SupportUrl>http://www.klopfenstein.net/lorenz.aspx/ontopreplica</SupportUrl>
<TargetCulture>en</TargetCulture>
<ProductName>OnTopReplica</ProductName>
<PublisherName>Lorenz Cuno Klopfenstein</PublisherName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>2.6.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="VistaControls, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Libraries\VistaControls\VistaControls\bin\Release\VistaControls.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AboutForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutForm.Designer.cs">
<DependentUpon>AboutForm.cs</DependentUpon>
</Compile>
<Compile Include="ClickThroughLabel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CloneClickEventArgs.cs" />
<Compile Include="CloseRequestEventArgs.cs" />
<Compile Include="Strings.it.Designer.cs">
<DependentUpon>Strings.it.resx</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="FocusedTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="FullscreenForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FullscreenForm.Designer.cs">
<DependentUpon>FullscreenForm.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="NativeMethods.cs" />
<Compile Include="NativeToolStripRenderer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="AboutForm.resx">
<DependentUpon>AboutForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings.it.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.it.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FullscreenForm.resx">
<DependentUpon>FullscreenForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="RegionBox.resx">
<DependentUpon>RegionBox.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="RegionBox.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="RegionBox.Designer.cs">
<DependentUpon>RegionBox.cs</DependentUpon>
</Compile>
<Compile Include="StoredRegion.cs" />
<Compile Include="StoredRegionArray.cs" />
<Compile Include="Strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Include="ThumbnailPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Win32Helper.cs" />
<Compile Include="WindowHandle.cs" />
<Compile Include="WindowListHelper.cs" />
<Compile Include="WindowManager.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\windows.png" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\window16.png" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\window_border16.png" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\window_opacity16.png" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\window_multiple16.png" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\close16.png" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\reduce.png" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\OnTopReplica.exe.manifest" />
<None Include="Assets\window_multiple16.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Assets\back.png" />
<None Include="Assets\arrow_down.png" />
<None Include="Assets\arrow_up.png" />
<None Include="Assets\component.png" />
<None Include="Assets\about.html" />
<None Include="Assets\flag_usa.png" />
<None Include="Assets\flag_ita.png" />
<Content Include="Assets\icon.ico" />
<None Include="Assets\x-oblique.png" />
<None Include="Assets\xiao_up.png" />
<None Include="Assets\xiao_down.png" />
<None Include="Assets\thumbs_up.png" />
<None Include="Assets\ok.png" />
<None Include="Assets\pos_null.png" />
<None Include="Assets\pos_topright.png" />
<None Include="Assets\pos_topleft.png" />
<None Include="Assets\pos_bottomright.png" />
<None Include="Assets\pos_bottomleft.png" />
<None Include="Assets\window_switch.png" />
<None Include="Assets\icon.png" />
<None Include="OnTopReplica_TemporaryKey.pfx" />
<None Include="OnTopReplica_TemporaryKey_old.pfx" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,14 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory>http://www.klopfenstein.net/download.aspx%3ffile=ontopreplica%252fsetup.exe/|http://www.klopfenstein.net/public/Uploads/ontopreplica/|http://www.klopfenstein.net/lorenz/programming/ontopreplica/|http://www.klopfenstein.net/lorenz/programming/|http://lorenz.klopfenstein.net/</InstallUrlHistory>
<SupportUrlHistory>http://www.klopfenstein.net/lorenz.aspx/ontopreplica|http://www.klopfenstein.net/loader.php%3fsection=lorenz&amp;page=on_top_replica|http://www.klopfenstein.net/loader.php%3fsection=lorenz&amp;page=programming_on_top_replica</SupportUrlHistory>
<UpdateUrlHistory>http://www.klopfenstein.net/lorenz/programming/ontopreplica/</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ErrorReportUrlHistory>
</ErrorReportUrlHistory>
</PropertyGroup>
</Project>

Binary file not shown.

Binary file not shown.

59
OnTopReplica/Program.cs Normal file
View file

@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using OnTopReplica.Properties;
using System.Threading;
using System.Globalization;
namespace OnTopReplica
{
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
//Update settings if needed
if (Settings.Default.MustUpdate) {
Settings.Default.Upgrade();
Settings.Default.MustUpdate = false;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
do {
//Update language settings
Thread.CurrentThread.CurrentUICulture = _languageChangeCode;
Settings.Default.Language = _languageChangeCode;
_languageChangeCode = null;
Application.Run(new MainForm());
}
while(_languageChangeCode != null);
//Persist settings
Settings.Default.Save();
}
static CultureInfo _languageChangeCode = Settings.Default.Language;
/// <summary>
/// Forces a global language change. As soon as the main form is closed, the change is performed
/// and the form is reopened using the new language.
/// </summary>
public static bool ForceGlobalLanguageChange(string languageCode){
if (string.IsNullOrEmpty(languageCode))
return false;
try {
_languageChangeCode = new CultureInfo(languageCode);
}
catch {
return false;
}
return true;
}
}
}

View file

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OnTopReplica")]
[assembly: AssemblyDescription("Real-time, always on top thumbnail of a window of your choice.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Lorenz Cuno Klopfenstein")]
[assembly: AssemblyProduct("OnTopReplica")]
[assembly: AssemblyCopyright("Copyright © Lorenz Cuno Klopfenstein 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("015090d1-7559-4c59-b9d1-e7e066c4a948")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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.6.0.1")]
[assembly: AssemblyFileVersion("2.6.0.1")]

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
</applicationRequestMinimum>
</security>
</trustInfo>
</asmv1:assembly>

View file

@ -0,0 +1,259 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OnTopReplica.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OnTopReplica.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to &lt;html&gt;
/// &lt;head&gt;
/// &lt;style type=&quot;text/css&quot;&gt;
///body {
/// font-family: Segoe UI, Arial, sans-serif;
/// font-size: 0.8em;
/// margin: 0; padding: 0;
///}
///h1 {
/// font-size: 1.4em;
/// font-weight: bold;
///
/// margin: 0 0 1em 0;
/// padding: 0;
///}
///p {
/// margin: 0.5em 0 0.5em 1em;
/// padding: 0;
///}
///a {
/// font-weight: bold;
/// color: blue;
///}
///a:hover {
/// color: red;
///}
/// &lt;/style&gt;
/// &lt;/head&gt;
///
/// &lt;body&gt;
///
/// &lt;h1&gt;License&lt;/h1&gt;
///
/// &lt;p&gt;&lt;b&gt;OnTopReplica&lt;/b&gt; is licensed under the &lt;a href=&quot;http://opensource.org/licenses/ms-rl.htm [rest of string was truncated]&quot;;.
/// </summary>
internal static string about {
get {
return ResourceManager.GetString("about", resourceCulture);
}
}
internal static System.Drawing.Bitmap back {
get {
object obj = ResourceManager.GetObject("back", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap close_new {
get {
object obj = ResourceManager.GetObject("close_new", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap component {
get {
object obj = ResourceManager.GetObject("component", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap flag_ita {
get {
object obj = ResourceManager.GetObject("flag_ita", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap flag_usa {
get {
object obj = ResourceManager.GetObject("flag_usa", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap icon {
get {
object obj = ResourceManager.GetObject("icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap ok {
get {
object obj = ResourceManager.GetObject("ok", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap pos_bottomleft {
get {
object obj = ResourceManager.GetObject("pos_bottomleft", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap pos_bottomright {
get {
object obj = ResourceManager.GetObject("pos_bottomright", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap pos_null {
get {
object obj = ResourceManager.GetObject("pos_null", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap pos_topleft {
get {
object obj = ResourceManager.GetObject("pos_topleft", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap pos_topright {
get {
object obj = ResourceManager.GetObject("pos_topright", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap reduce {
get {
object obj = ResourceManager.GetObject("reduce", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap thumbs_up {
get {
object obj = ResourceManager.GetObject("thumbs_up", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap window_border16 {
get {
object obj = ResourceManager.GetObject("window_border16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap window_multiple16 {
get {
object obj = ResourceManager.GetObject("window_multiple16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon window_multiple161 {
get {
object obj = ResourceManager.GetObject("window_multiple161", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap window_opacity16 {
get {
object obj = ResourceManager.GetObject("window_opacity16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap window_switch {
get {
object obj = ResourceManager.GetObject("window_switch", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap window16 {
get {
object obj = ResourceManager.GetObject("window16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap xiao_down {
get {
object obj = ResourceManager.GetObject("xiao_down", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap xiao_up {
get {
object obj = ResourceManager.GetObject("xiao_up", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="component" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\component.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pos_bottomleft" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\pos_bottomleft.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="thumbs_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\thumbs_up.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_multiple161" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window_multiple16.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="back" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\back.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="reduce" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\reduce.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_opacity16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window_opacity16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pos_topleft" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\pos_topleft.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_switch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window_switch.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="xiao_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_up.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="close_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\x-oblique.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flag_usa" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_usa.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_border16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window_border16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pos_topright" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\pos_topright.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\about.html;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="ok" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\ok.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pos_null" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\pos_null.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="xiao_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_down.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_multiple16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window_multiple16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pos_bottomright" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\pos_bottomright.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flag_ita" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_ita.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -0,0 +1,181 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OnTopReplica.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::OnTopReplica.StoredRegionArray SavedRegions {
get {
return ((global::OnTopReplica.StoredRegionArray)(this["SavedRegions"]));
}
set {
this["SavedRegions"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool UseGlass {
get {
return ((bool)(this["UseGlass"]));
}
set {
this["UseGlass"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AutoFitOnResize {
get {
return ((bool)(this["AutoFitOnResize"]));
}
set {
this["AutoFitOnResize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("255")]
public byte Opacity {
get {
return ((byte)(this["Opacity"]));
}
set {
this["Opacity"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Point LastLocation {
get {
return ((global::System.Drawing.Point)(this["LastLocation"]));
}
set {
this["LastLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Size LastSize {
get {
return ((global::System.Drawing.Size)(this["LastSize"]));
}
set {
this["LastSize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool WindowPositionStored {
get {
return ((bool)(this["WindowPositionStored"]));
}
set {
this["WindowPositionStored"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool StoreWindowPosition {
get {
return ((bool)(this["StoreWindowPosition"]));
}
set {
this["StoreWindowPosition"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("(Default)")]
public global::System.Globalization.CultureInfo Language {
get {
return ((global::System.Globalization.CultureInfo)(this["Language"]));
}
set {
this["Language"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool MustUpdate {
get {
return ((bool)(this["MustUpdate"]));
}
set {
this["MustUpdate"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ClickThrough {
get {
return ((bool)(this["ClickThrough"]));
}
set {
this["ClickThrough"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool FirstTimeClickThrough {
get {
return ((bool)(this["FirstTimeClickThrough"]));
}
set {
this["FirstTimeClickThrough"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool FirstTimeClickForwarding {
get {
return ((bool)(this["FirstTimeClickForwarding"]));
}
set {
this["FirstTimeClickForwarding"] = value;
}
}
}
}

View file

@ -0,0 +1,45 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="OnTopReplica.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="SavedRegions" Type="OnTopReplica.StoredRegionArray" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="UseGlass" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AutoFitOnResize" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Opacity" Type="System.Byte" Scope="User">
<Value Profile="(Default)">255</Value>
</Setting>
<Setting Name="LastLocation" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="LastSize" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="WindowPositionStored" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="StoreWindowPosition" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Language" Type="System.Globalization.CultureInfo" Scope="User">
<Value Profile="(Default)">(Default)</Value>
</Setting>
<Setting Name="MustUpdate" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ClickThrough" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="FirstTimeClickThrough" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="FirstTimeClickForwarding" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" />
<requestedExecutionLevel level="requireAdministrator" />
<requestedExecutionLevel level="highestAvailable" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
</applicationRequestMinimum>
</security>
</trustInfo>
</asmv1:assembly>

345
OnTopReplica/RegionBox.Designer.cs generated Normal file
View file

@ -0,0 +1,345 @@
namespace OnTopReplica {
partial class RegionBox {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.numH = new System.Windows.Forms.NumericUpDown();
this.numW = new System.Windows.Forms.NumericUpDown();
this.numY = new System.Windows.Forms.NumericUpDown();
this.numX = new System.Windows.Forms.NumericUpDown();
this.buttonDone = new System.Windows.Forms.Button();
this.buttonReset = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.buttonDelete = new System.Windows.Forms.Button();
this.buttonSave = new System.Windows.Forms.Button();
this.comboBox1 = new VistaControls.ComboBox();
this.textRegionName = new OnTopReplica.FocusedTextBox();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numH)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numW)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numY)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numX)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.Controls.Add(this.groupBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Name = "panel1";
this.panel1.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.panel1.Size = new System.Drawing.Size(233, 292);
this.panel1.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textRegionName);
this.groupBox1.Controls.Add(this.numH);
this.groupBox1.Controls.Add(this.numW);
this.groupBox1.Controls.Add(this.numY);
this.groupBox1.Controls.Add(this.numX);
this.groupBox1.Controls.Add(this.buttonDone);
this.groupBox1.Controls.Add(this.buttonReset);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.buttonDelete);
this.groupBox1.Controls.Add(this.buttonSave);
this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(5, 5);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Size = new System.Drawing.Size(223, 282);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Regions";
//
// numH
//
this.numH.Enabled = false;
this.numH.Location = new System.Drawing.Point(145, 150);
this.numH.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.numH.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numH.Minimum = new decimal(new int[] {
100000,
0,
0,
-2147483648});
this.numH.Name = "numH";
this.numH.Size = new System.Drawing.Size(57, 22);
this.numH.TabIndex = 7;
this.numH.ValueChanged += new System.EventHandler(this.RegionValueChanged);
//
// numW
//
this.numW.Enabled = false;
this.numW.Location = new System.Drawing.Point(145, 118);
this.numW.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.numW.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numW.Minimum = new decimal(new int[] {
100000,
0,
0,
-2147483648});
this.numW.Name = "numW";
this.numW.Size = new System.Drawing.Size(57, 22);
this.numW.TabIndex = 6;
this.numW.ValueChanged += new System.EventHandler(this.RegionValueChanged);
//
// numY
//
this.numY.Enabled = false;
this.numY.Location = new System.Drawing.Point(31, 150);
this.numY.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.numY.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numY.Minimum = new decimal(new int[] {
100000,
0,
0,
-2147483648});
this.numY.Name = "numY";
this.numY.Size = new System.Drawing.Size(57, 22);
this.numY.TabIndex = 5;
this.numY.ValueChanged += new System.EventHandler(this.RegionValueChanged);
//
// numX
//
this.numX.Enabled = false;
this.numX.Location = new System.Drawing.Point(31, 118);
this.numX.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.numX.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.numX.Minimum = new decimal(new int[] {
100000,
0,
0,
-2147483648});
this.numX.Name = "numX";
this.numX.Size = new System.Drawing.Size(57, 22);
this.numX.TabIndex = 4;
this.numX.ValueChanged += new System.EventHandler(this.RegionValueChanged);
//
// buttonDone
//
this.buttonDone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonDone.Location = new System.Drawing.Point(135, 246);
this.buttonDone.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonDone.Name = "buttonDone";
this.buttonDone.Size = new System.Drawing.Size(80, 28);
this.buttonDone.TabIndex = 9;
this.buttonDone.Text = global::OnTopReplica.Strings.RegionsDoneButton;
this.buttonDone.UseVisualStyleBackColor = true;
this.buttonDone.Click += new System.EventHandler(this.CloseClick);
//
// buttonReset
//
this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonReset.Location = new System.Drawing.Point(8, 246);
this.buttonReset.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonReset.Name = "buttonReset";
this.buttonReset.Size = new System.Drawing.Size(80, 28);
this.buttonReset.TabIndex = 8;
this.buttonReset.Text = global::OnTopReplica.Strings.RegionsResetButton;
this.buttonReset.UseVisualStyleBackColor = true;
this.buttonReset.Click += new System.EventHandler(this.ResetClick);
//
// label6
//
this.label6.AutoSize = true;
this.label6.ForeColor = System.Drawing.SystemColors.ControlDark;
this.label6.Location = new System.Drawing.Point(95, 153);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(49, 17);
this.label6.TabIndex = 9;
this.label6.Text = "Height";
//
// label7
//
this.label7.AutoSize = true;
this.label7.ForeColor = System.Drawing.SystemColors.ControlDark;
this.label7.Location = new System.Drawing.Point(95, 121);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 17);
this.label7.TabIndex = 8;
this.label7.Text = "Width";
//
// label3
//
this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.SystemColors.ControlDark;
this.label3.Location = new System.Drawing.Point(8, 153);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(17, 17);
this.label3.TabIndex = 5;
this.label3.Text = "Y";
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.SystemColors.ControlDark;
this.label2.Location = new System.Drawing.Point(8, 121);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(17, 17);
this.label2.TabIndex = 4;
this.label2.Text = "X";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(8, 94);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(103, 17);
this.label1.TabIndex = 3;
this.label1.Text = "Current region:";
//
// buttonDelete
//
this.buttonDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonDelete.Enabled = false;
this.buttonDelete.Location = new System.Drawing.Point(135, 57);
this.buttonDelete.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonDelete.Name = "buttonDelete";
this.buttonDelete.Size = new System.Drawing.Size(80, 28);
this.buttonDelete.TabIndex = 3;
this.buttonDelete.Text = global::OnTopReplica.Strings.RegionsDeleteButton;
this.buttonDelete.UseVisualStyleBackColor = true;
this.buttonDelete.Click += new System.EventHandler(this.DeleteClick);
//
// buttonSave
//
this.buttonSave.Enabled = false;
this.buttonSave.Location = new System.Drawing.Point(8, 57);
this.buttonSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonSave.Name = "buttonSave";
this.buttonSave.Size = new System.Drawing.Size(80, 28);
this.buttonSave.TabIndex = 1;
this.buttonSave.Text = global::OnTopReplica.Strings.RegionsSaveButton;
this.buttonSave.UseVisualStyleBackColor = true;
this.buttonSave.Click += new System.EventHandler(this.SaveClick);
//
// comboBox1
//
this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBox1.CueBannerText = global::OnTopReplica.Strings.RegionsStoredRegions;
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(8, 23);
this.comboBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(206, 24);
this.comboBox1.TabIndex = 0;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.RegionCombo_index);
//
// textRegionName
//
this.textRegionName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textRegionName.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.textRegionName.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.textRegionName.Location = new System.Drawing.Point(8, 59);
this.textRegionName.Margin = new System.Windows.Forms.Padding(4);
this.textRegionName.Name = "textRegionName";
this.textRegionName.Size = new System.Drawing.Size(118, 22);
this.textRegionName.TabIndex = 2;
this.textRegionName.Visible = false;
this.textRegionName.Leave += new System.EventHandler(this.Save_lost);
this.textRegionName.ConfirmInput += new System.EventHandler(this.Save_confirm);
//
// RegionBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MinimumSize = new System.Drawing.Size(213, 222);
this.Name = "RegionBox";
this.Size = new System.Drawing.Size(233, 292);
this.panel1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numH)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numW)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numY)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numX)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button buttonDelete;
private System.Windows.Forms.Button buttonSave;
private VistaControls.ComboBox comboBox1;
private System.Windows.Forms.Button buttonDone;
private System.Windows.Forms.Button buttonReset;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown numH;
private System.Windows.Forms.NumericUpDown numW;
private System.Windows.Forms.NumericUpDown numY;
private System.Windows.Forms.NumericUpDown numX;
private FocusedTextBox textRegionName;
}
}

178
OnTopReplica/RegionBox.cs Normal file
View file

@ -0,0 +1,178 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using OnTopReplica.Properties;
namespace OnTopReplica {
public partial class RegionBox : UserControl {
public RegionBox() {
InitializeComponent();
//Copy settings into combo box
if (Settings.Default.SavedRegions != null) {
foreach (object o in Settings.Default.SavedRegions) {
comboBox1.Items.Add(o);
}
}
}
void Default_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) {
}
bool _glassMode = true;
public bool GlassMode {
get {
return _glassMode;
}
set {
BackColor = (value) ? Color.Black : SystemColors.Control;
_glassMode = value;
}
}
public void SetRegion(Rectangle region) {
try {
_ignoreValueChanges = true;
numX.Enabled = numY.Enabled = numW.Enabled = numH.Enabled = true;
numX.Value = region.Left;
numY.Value = region.Top;
numW.Value = region.Width;
numH.Value = region.Height;
}
finally {
_ignoreValueChanges = false;
}
OnRegionSet(region);
}
public void Reset() {
try {
_ignoreValueChanges = true;
numX.Value = numY.Value = numW.Value = numH.Value = 0;
numX.Enabled = numY.Enabled = numW.Enabled = numH.Enabled = false;
buttonSave.Enabled = false;
comboBox1.SelectedIndex = -1;
}
finally {
_ignoreValueChanges = false;
}
}
public event EventHandler RequestClosing;
protected virtual void OnRequestClosing() {
if (RequestClosing != null)
RequestClosing(this, EventArgs.Empty);
}
private void CloseClick(object sender, EventArgs e) {
OnRequestClosing();
}
public event EventHandler RequestRegionReset;
protected virtual void OnRequestRegionReset() {
if (RequestRegionReset != null)
RequestRegionReset(this, EventArgs.Empty);
}
private void ResetClick(object sender, EventArgs e) {
Reset();
OnRequestRegionReset();
}
private void DeleteClick(object sender, EventArgs e) {
Settings.Default.SavedRegions.RemoveAt(comboBox1.SelectedIndex);
comboBox1.Items.RemoveAt(comboBox1.SelectedIndex);
}
private void SaveClick(object sender, EventArgs e) {
//Display textbox instead of button
buttonSave.Visible = false;
textRegionName.Visible = true;
textRegionName.Focus();
}
private void Save_confirm(object sender, EventArgs e) {
if (!string.IsNullOrEmpty(textRegionName.Text)) {
AddRegion(new Rectangle((int)numX.Value, (int)numY.Value, (int)numW.Value, (int)numH.Value), textRegionName.Text);
}
//Hide textbox and show button again
textRegionName.Visible = false;
textRegionName.Text = string.Empty;
buttonSave.Visible = true;
buttonSave.Enabled = false;
}
private void Save_lost(object sender, EventArgs e) {
//Reset textbox
textRegionName.Visible = false;
buttonSave.Visible = true;
buttonSave.Focus();
}
private void AddRegion(Rectangle rectangle, string p) {
var region = new StoredRegion(rectangle, p);
int index = comboBox1.Items.Add(region);
comboBox1.SelectedIndex = index;
if (Settings.Default.SavedRegions == null)
Settings.Default.SavedRegions = new StoredRegionArray();
Settings.Default.SavedRegions.Add(region);
}
public delegate void RegionSetHandler(object sender, Rectangle region);
public event RegionSetHandler RegionSet;
protected virtual void OnRegionSet(Rectangle region){
if (RegionSet != null)
RegionSet(this, region);
buttonSave.Enabled = true;
}
/// <summary>Used to signal to the value change handler that all events should be temporarily ignored.</summary>
/// <remarks>Must be used if the RegionBox is updating the values of the NumericUpDown controls internally and the handler
/// should not raise any event.</remarks>
bool _ignoreValueChanges = false;
private void RegionValueChanged(object sender, EventArgs e) {
if (_ignoreValueChanges)
return;
OnRegionSet(new Rectangle((int)numX.Value, (int)numY.Value, (int)numW.Value, (int)numH.Value));
}
private void RegionCombo_index(object sender, EventArgs e) {
buttonDelete.Enabled = (comboBox1.SelectedIndex >= 0);
if (comboBox1.SelectedIndex >= 0) {
//Load region
var region = comboBox1.SelectedItem as StoredRegion;
if (region == null)
return;
SetRegion(region.Rect);
}
}
}
}

120
OnTopReplica/RegionBox.resx Normal file
View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.Drawing;
namespace OnTopReplica {
[Serializable]
public class StoredRegion : IXmlSerializable {
public StoredRegion() {
}
public StoredRegion(Rectangle r, string n) {
Rect = r;
Name = n;
}
public Rectangle Rect {
get;
set;
}
public string Name {
get;
set;
}
public override string ToString() {
return Name;
}
#region IXmlSerializable Members
public System.Xml.Schema.XmlSchema GetSchema() {
return null;
}
public void ReadXml(System.Xml.XmlReader reader) {
if (reader.MoveToAttribute("name"))
Name = reader.Value;
else
throw new Exception();
reader.Read();
XmlSerializer x = new XmlSerializer(typeof(Rectangle));
Rect = (Rectangle)x.Deserialize(reader);
}
public void WriteXml(System.Xml.XmlWriter writer) {
writer.WriteAttributeString("name", Name);
XmlSerializer x = new XmlSerializer(typeof(Rectangle));
x.Serialize(writer, Rect);
}
#endregion
}
}

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Xml.Serialization;
namespace OnTopReplica {
public class StoredRegionArray : ArrayList, IXmlSerializable {
#region IXmlSerializable Members
public System.Xml.Schema.XmlSchema GetSchema() {
return null;
}
public void ReadXml(System.Xml.XmlReader reader) {
this.Clear();
XmlSerializer x = new XmlSerializer(typeof(StoredRegion));
while (reader.ReadToFollowing("StoredRegion")) {
object o = x.Deserialize(reader);
if (o is StoredRegion)
this.Add(o);
}
}
public void WriteXml(System.Xml.XmlWriter writer) {
XmlSerializer x = new XmlSerializer(typeof(StoredRegion));
foreach (StoredRegion sr in this) {
x.Serialize(writer, sr);
}
}
#endregion
}
}

1048
OnTopReplica/Strings.Designer.cs generated Normal file

File diff suppressed because it is too large Load diff

0
OnTopReplica/Strings.it.Designer.cs generated Normal file
View file

View file

@ -0,0 +1,352 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>OnTopReplica</value>
</data>
<data name="AskReset" xml:space="preserve">
<value>Ripristinare completamente la finestra?</value>
</data>
<data name="AskResetButtonOk" xml:space="preserve">
<value>&amp;Ripristina
Tutte le impostazioni saranno perse.</value>
</data>
<data name="AskResetContent" xml:space="preserve">
<value>Può essere usato se si è perso il controllo della finestra o si è spostata oltre ai bordi dello schermo.</value>
</data>
<data name="AskResetTitle" xml:space="preserve">
<value>Ripristino</value>
</data>
<data name="ButtonCancel" xml:space="preserve">
<value>&amp;Annulla</value>
</data>
<data name="CreatedBy" xml:space="preserve">
<value>Creato da: Lorenz Cuno Klopfenstein.</value>
</data>
<data name="DrawRegions" xml:space="preserve">
<value>Disegna una regione usando il mouse.</value>
</data>
<data name="ErrorDetailsAero" xml:space="preserve">
<value>Dettagli su Windows Aero</value>
</data>
<data name="ErrorDetailsAeroInfo" xml:space="preserve">
<value>Windows Aero è disponibile soltanto su Windows Vista Home Premium o superiore.</value>
</data>
<data name="ErrorDwmOff" xml:space="preserve">
<value>Il servizio DWM non è attivo.</value>
</data>
<data name="ErrorDwmOffContent" xml:space="preserve">
<value>È necessario attivare la "composizione del desktop" (DWM) selezionando "Windows Aero" come tema utilizzato da Windows.
Per farlo, clicca col tasto destro del mouse sul desktop e poi su Personalizza.</value>
</data>
<data name="ErrorGenericInfoButton" xml:space="preserve">
<value>Dettagli errore</value>
</data>
<data name="ErrorGenericInfoText" xml:space="preserve">
<value>Errore: </value>
</data>
<data name="ErrorGenericThumbnailHandleError" xml:space="preserve">
<value>Sembra che la finestra selezionata sia stata chiusa o che non sia più valida.</value>
</data>
<data name="ErrorGenericTitle" xml:space="preserve">
<value>Errore</value>
</data>
<data name="ErrorNoDwm" xml:space="preserve">
<value>La "composzione del desktop" non è supportata dal tuo sistema operativo.
È necessario utilizzare Windows Vista o superiore per avviare OnTopReplica.</value>
</data>
<data name="ErrorNoDwmTitle" xml:space="preserve">
<value>DWM non supportato</value>
</data>
<data name="ErrorUnableToCreateThumbnail" xml:space="preserve">
<value>Impossibile clonare la finestra.</value>
</data>
<data name="ErrorUnableToFit" xml:space="preserve">
<value>Impossibile adattare la finestra.</value>
</data>
<data name="Homepage" xml:space="preserve">
<value>Homepage: www.codeplex.com/ontopreplica.</value>
</data>
<data name="MenuAbout" xml:space="preserve">
<value>A proposito di...</value>
</data>
<data name="MenuAboutTT" xml:space="preserve">
<value>Nasconde la finestra principale e mostra una schermata di informazioni.</value>
</data>
<data name="MenuAutofit" xml:space="preserve">
<value>Adatta automaticamente</value>
</data>
<data name="MenuAutofitTT" xml:space="preserve">
<value>Adatta automaticamente la finestra al clone quando viene ridimensionata.</value>
</data>
<data name="MenuClose" xml:space="preserve">
<value>Chiudi</value>
</data>
<data name="MenuCloseTT" xml:space="preserve">
<value>Chiude OnTopReplica.</value>
</data>
<data name="MenuFitDouble" xml:space="preserve">
<value>2:1 Doppio</value>
</data>
<data name="MenuFitFullscreen" xml:space="preserve">
<value>Tutto schermo</value>
</data>
<data name="MenuFitHalf" xml:space="preserve">
<value>1:2 Metà</value>
</data>
<data name="MenuFitOriginal" xml:space="preserve">
<value>1:1 Clone esatto</value>
</data>
<data name="MenuFitQuarter" xml:space="preserve">
<value>1:4 Quarto</value>
</data>
<data name="MenuGlass" xml:space="preserve">
<value>Effetto vetro</value>
</data>
<data name="MenuGlassTT" xml:space="preserve">
<value>Abilita o disabilita l'effetto vetro.</value>
</data>
<data name="MenuOp100" xml:space="preserve">
<value>100% (opaco)</value>
</data>
<data name="MenuOp100TT" xml:space="preserve">
<value>Imposta OnTopReplica come finestra completamente opaca.</value>
</data>
<data name="MenuOp25" xml:space="preserve">
<value>25%</value>
</data>
<data name="MenuOp25TT" xml:space="preserve">
<value>Imposta l'opacità di OnTopReplica al 25%.</value>
</data>
<data name="MenuOp50" xml:space="preserve">
<value>50%</value>
</data>
<data name="MenuOp50TT" xml:space="preserve">
<value>Imposta l'opacità di OnTopReplica al 50%.</value>
</data>
<data name="MenuOp75" xml:space="preserve">
<value>75%</value>
</data>
<data name="MenuOp75TT" xml:space="preserve">
<value>Imposta l'opacità di OnTopReplica al 75%.</value>
</data>
<data name="MenuOpacity" xml:space="preserve">
<value>Opacità</value>
</data>
<data name="MenuOpen" xml:space="preserve">
<value>Apri</value>
</data>
<data name="MenuOpenTT" xml:space="preserve">
<value>Mostra OnTopReplica.</value>
</data>
<data name="MenuPosBottomLeft" xml:space="preserve">
<value>In basso a sinistra</value>
</data>
<data name="MenuPosBottomRight" xml:space="preserve">
<value>In basso a destra</value>
</data>
<data name="MenuPosition" xml:space="preserve">
<value>Posizione</value>
</data>
<data name="MenuPositionTT" xml:space="preserve">
<value>Posiziona automaticamente OnTopReplica sul monitor corrente.</value>
</data>
<data name="MenuPosTopLeft" xml:space="preserve">
<value>In alto a sinistra</value>
</data>
<data name="MenuPosTopRight" xml:space="preserve">
<value>In alto a destra</value>
</data>
<data name="MenuRecall" xml:space="preserve">
<value>Ripristina posizione e grandezza</value>
</data>
<data name="MenuRecallTT" xml:space="preserve">
<value>Imposta se OnTopReplica debba ripristinare posizione e grandezza in cui si trovava durante l'ultimo uso.</value>
</data>
<data name="MenuReduce" xml:space="preserve">
<value>Riduci ad icona</value>
</data>
<data name="MenuReduceTT" xml:space="preserve">
<value>Riduce OnTopReplica ad un'icona nella barra delle applicazioni.</value>
</data>
<data name="MenuRegion" xml:space="preserve">
<value>Seleziona regione...</value>
</data>
<data name="MenuRegionTT" xml:space="preserve">
<value>Passa alla modalità di "selezione di regione", che permette di limitare la porzione di finestra che viene clonata.</value>
</data>
<data name="MenuReset" xml:space="preserve">
<value>Reimposta finestra</value>
</data>
<data name="MenuResetTT" xml:space="preserve">
<value>Reimposta OnTopReplica e la sua finestra principale.</value>
</data>
<data name="MenuResize" xml:space="preserve">
<value>Ridimensionamento</value>
</data>
<data name="MenuSwitch" xml:space="preserve">
<value>Alla finestra originale</value>
</data>
<data name="MenuSwitchTT" xml:space="preserve">
<value>Mostra la finestra originale e nasconde OnTopReplica.</value>
</data>
<data name="MenuWindows" xml:space="preserve">
<value>Seleziona finestra</value>
</data>
<data name="MenuWindowsNone" xml:space="preserve">
<value>- nessuna -</value>
</data>
<data name="MenuWindowsTT" xml:space="preserve">
<value>Mostra una lista di finestre che è possibile clonare.</value>
</data>
<data name="RightClick" xml:space="preserve">
<value>Clic destro qui per iniziare...</value>
</data>
<data name="Slogan" xml:space="preserve">
<value>Una copia leggera, in tempo reale e sempre in primo piano di una finestra a tua scelta.</value>
</data>
<data name="UpdateDisclaimer" xml:space="preserve">
<value>OnTopReplica controlla automaticamente se sono presenti aggiornamenti.</value>
</data>
<data name="UpdateNow" xml:space="preserve">
<value>Aggiorna!</value>
</data>
<data name="AskUpdate" xml:space="preserve">
<value>Installare OnTopReplica {0}?</value>
</data>
<data name="AskUpdateButtonCancel" xml:space="preserve">
<value>Annulla aggiornamento
OnTopReplica si aggiornerà in un secondo momento.</value>
</data>
<data name="AskUpdateButtonOk" xml:space="preserve">
<value>Continua
Installa OnTopReplica {0}.</value>
</data>
<data name="AskUpdateContent" xml:space="preserve">
<value>La nuova versione sarà scaricata ed installata automaticamente.</value>
</data>
<data name="AskUpdateExpanded" xml:space="preserve">
<value>Versione installata: {0}
Versione disponibile: {1}
Grandezza: {2} bytes</value>
</data>
<data name="AskUpdateTitle" xml:space="preserve">
<value>Aggiornamento disponibile</value>
</data>
<data name="ErrorDetailButton" xml:space="preserve">
<value>Dettagli</value>
</data>
<data name="ErrorNoThumbnail" xml:space="preserve">
<value>Nessuna finestra clonata al momento.</value>
</data>
<data name="ErrorUpdate" xml:space="preserve">
<value>Impossibile controllare gli aggiornamenti.</value>
</data>
<data name="ErrorUpdateContent" xml:space="preserve">
<value>Sembra che OnTopReplica non sia stato installato usando 'ClickOnce'. Sarà necessario aggiornare manualmente il programma visitando &lt;a href="http://www.codeplex.com/ontopreplica"&gt;la homepage del progetto&lt;/a&gt;.</value>
</data>
<data name="InfoUpdated" xml:space="preserve">
<value>OnTopReplica è stato aggiornato.</value>
</data>
<data name="InfoUpdatedContent" xml:space="preserve">
<value>Per utilizzare la nuova versione di OnTopReplica è necessario riavviare l'applicazione.</value>
</data>
<data name="InfoUpdatedTitle" xml:space="preserve">
<value>Aggiornamento completato</value>
</data>
<data name="InfoUpToDate" xml:space="preserve">
<value>OnTopReplica è aggiornato.</value>
</data>
<data name="InfoUpToDateTitle" xml:space="preserve">
<value>Nessun aggiornamento disponibile</value>
</data>
<data name="InfoClickThrough" xml:space="preserve">
<value>Attivare la modalità Click-Through?</value>
</data>
<data name="InfoClickThroughDetails" xml:space="preserve">
<value>La modalità "Click-Through" funziona solo se l'opzione è stata attivata e se la finestra è semitrasparente.</value>
</data>
<data name="InfoClickThroughInformation" xml:space="preserve">
<value>In questa modalità la finestra a tutto schermo si comporterà come una maschera semitrasparente che ti permette di cliccarle attraverso, sulle finestre sullo sfondo.
Per tornare alla modalità normale in qualsiasi momento, fai doppio clic sull'icona nella barra delle applicazioni.</value>
</data>
<data name="InfoClickThroughTitle" xml:space="preserve">
<value>Modalità Click-Through</value>
</data>
<data name="MenuResizeClickThrough" xml:space="preserve">
<value>Click-Through</value>
</data>
<data name="MenuResizeClickThroughTT" xml:space="preserve">
<value>Se la finestra non è completamente opaca quando passa a tutto schermo, farà in modo che tutti i clic le passano attraverso (come una maschera semitrasparente).</value>
</data>
<data name="InfoClickThroughNo" xml:space="preserve">
<value>No, tutto schermo normale
Puoi abilitare il Click-Through in futuro</value>
</data>
<data name="InfoClickThroughOk" xml:space="preserve">
<value>Usa Click-Through</value>
</data>
<data name="MenuClickForwarding" xml:space="preserve">
<value>Inoltro dei clic</value>
</data>
<data name="MenuClickForwardingTT" xml:space="preserve">
<value>Attiva la modalità di "inoltro dei clic" alla finestra clonata.</value>
</data>
<data name="MenuQuitFullscreen" xml:space="preserve">
<value>Esci da tutto schermo</value>
</data>
<data name="Language" xml:space="preserve">
<value>Lingua</value>
</data>
<data name="RegionsTitle" xml:space="preserve">
<value>Regioni</value>
</data>
<data name="RegionsSaveButton" xml:space="preserve">
<value>Salva</value>
</data>
<data name="RegionsDeleteButton" xml:space="preserve">
<value>Cancella</value>
</data>
<data name="RegionsCurrentRegion" xml:space="preserve">
<value>Regione corrente:</value>
</data>
<data name="RegionsWidth" xml:space="preserve">
<value>Largh.</value>
</data>
<data name="RegionsHeight" xml:space="preserve">
<value>Altezz.</value>
</data>
<data name="RegionsResetButton" xml:space="preserve">
<value>Reset</value>
</data>
<data name="RegionsDoneButton" xml:space="preserve">
<value>Chiudi</value>
</data>
<data name="RegionsStoredRegions" xml:space="preserve">
<value>Regioni memorizzate</value>
</data>
<data name="InfoClickForwarding" xml:space="preserve">
<value>Attivare l'inoltro dei clic?</value>
</data>
<data name="InfoClickForwardingTitle" xml:space="preserve">
<value>Inoltro dei clic</value>
</data>
<data name="InfoClickForwardingContent" xml:space="preserve">
<value>In questa modalità, OnTopReplica inoltrerà tutti i clic del pulsante sinistro sul clone della finestra alla finestra originale (questo permetterà di interagire in maniera basilare con la finestra clonata, senza averla in primo piano).
Per uscire da questa modalità, fai clic col destro su OnTopReplica e disabilita "Inoltro dei clic" dal menu.</value>
</data>
</root>

457
OnTopReplica/Strings.resx Normal file
View file

@ -0,0 +1,457 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ApplicationName" xml:space="preserve">
<value>OnTopReplica</value>
</data>
<data name="AskReset" xml:space="preserve">
<value>Reset window completely?</value>
</data>
<data name="AskResetButtonOk" xml:space="preserve">
<value>&amp;Reset
All settings will be lost.</value>
</data>
<data name="AskResetContent" xml:space="preserve">
<value>Can be used to reset all settings if you lost control over the window or moved it beyond the screen boundary.</value>
</data>
<data name="AskResetTitle" xml:space="preserve">
<value>Reset</value>
</data>
<data name="ButtonCancel" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="CreatedBy" xml:space="preserve">
<value>Created by: Lorenz Cuno Klopfenstein.</value>
</data>
<data name="DrawRegions" xml:space="preserve">
<value>Draw regions using mouse.</value>
</data>
<data name="ErrorDetailsAero" xml:space="preserve">
<value>Details on Windows Aero</value>
</data>
<data name="ErrorDetailsAeroInfo" xml:space="preserve">
<value>Windows Aero is only available on Windows Vista Home Premium or higher.</value>
</data>
<data name="ErrorDwmOff" xml:space="preserve">
<value>'Desktop Composition' is not enabled.</value>
</data>
<data name="ErrorDwmOffContent" xml:space="preserve">
<value>You must enable desktop composition, by selecting 'Windows Aero' as the theme used by Windows.
To do so, right-click on the desktop and click on Personalize.</value>
</data>
<data name="ErrorGenericInfoButton" xml:space="preserve">
<value>Error details</value>
</data>
<data name="ErrorGenericInfoText" xml:space="preserve">
<value>Error: </value>
</data>
<data name="ErrorGenericThumbnailHandleError" xml:space="preserve">
<value>It appears that the selected window has been closed or is not valid anymore.</value>
</data>
<data name="ErrorGenericTitle" xml:space="preserve">
<value>Error</value>
</data>
<data name="ErrorNoDwm" xml:space="preserve">
<value>'Desktop Composition' is not supported on your Operating System.
You must run this application on Windows Vista Home Premium or better.</value>
</data>
<data name="ErrorNoDwmTitle" xml:space="preserve">
<value>Desktop Composition unsupported</value>
</data>
<data name="ErrorUnableToCreateThumbnail" xml:space="preserve">
<value>Unable to create thumbnail.</value>
</data>
<data name="ErrorUnableToFit" xml:space="preserve">
<value>Unable to fit window.</value>
</data>
<data name="Homepage" xml:space="preserve">
<value>Homepage: www.codeplex.com/ontopreplica.</value>
</data>
<data name="MenuAbout" xml:space="preserve">
<value>About...</value>
</data>
<data name="MenuAboutTT" xml:space="preserve">
<value>Hides the main window and displays the "about" box.</value>
</data>
<data name="MenuAutofit" xml:space="preserve">
<value>Autofit on resize</value>
</data>
<data name="MenuAutofitTT" xml:space="preserve">
<value>Automatically fits the window to the thumbnail when you resize it.</value>
</data>
<data name="MenuClose" xml:space="preserve">
<value>Close</value>
</data>
<data name="MenuCloseTT" xml:space="preserve">
<value>Closes OnTopReplica.</value>
</data>
<data name="MenuFitDouble" xml:space="preserve">
<value>2:1 Double</value>
</data>
<data name="MenuFitFullscreen" xml:space="preserve">
<value>Fullscreen</value>
</data>
<data name="MenuFitHalf" xml:space="preserve">
<value>1:2 Half</value>
</data>
<data name="MenuFitOriginal" xml:space="preserve">
<value>1:1 Fit to window</value>
</data>
<data name="MenuFitQuarter" xml:space="preserve">
<value>1:4 Quarter</value>
</data>
<data name="MenuGlass" xml:space="preserve">
<value>Glass</value>
</data>
<data name="MenuGlassTT" xml:space="preserve">
<value>Toggles "glass mode" on and off.</value>
</data>
<data name="MenuOp100" xml:space="preserve">
<value>100% (opaque)</value>
</data>
<data name="MenuOp100TT" xml:space="preserve">
<value>Sets OnTopReplica to be completely opaque.</value>
</data>
<data name="MenuOp25" xml:space="preserve">
<value>25%</value>
</data>
<data name="MenuOp25TT" xml:space="preserve">
<value>Sets OnTopReplica to 25% opacity.</value>
</data>
<data name="MenuOp50" xml:space="preserve">
<value>50%</value>
</data>
<data name="MenuOp50TT" xml:space="preserve">
<value>Sets OnTopReplica to 50% opacity.</value>
</data>
<data name="MenuOp75" xml:space="preserve">
<value>75%</value>
</data>
<data name="MenuOp75TT" xml:space="preserve">
<value>Sets OnTopReplica to 75% opacity.</value>
</data>
<data name="MenuOpacity" xml:space="preserve">
<value>Opacity</value>
</data>
<data name="MenuOpen" xml:space="preserve">
<value>Open</value>
</data>
<data name="MenuOpenTT" xml:space="preserve">
<value>Displays OnTopReplica.</value>
</data>
<data name="MenuPosBottomLeft" xml:space="preserve">
<value>Bottom Left</value>
</data>
<data name="MenuPosBottomRight" xml:space="preserve">
<value>Bottom Right</value>
</data>
<data name="MenuPosition" xml:space="preserve">
<value>Position</value>
</data>
<data name="MenuPositionTT" xml:space="preserve">
<value>Automatically position OnTopReplica on the current screen.</value>
</data>
<data name="MenuPosTopLeft" xml:space="preserve">
<value>Top Left</value>
</data>
<data name="MenuPosTopRight" xml:space="preserve">
<value>Top Right</value>
</data>
<data name="MenuRecall" xml:space="preserve">
<value>Recall last position and size</value>
</data>
<data name="MenuRecallTT" xml:space="preserve">
<value>Toggles whether OnTopReplica should store its last position and size and use them when it is restarted.</value>
</data>
<data name="MenuReduce" xml:space="preserve">
<value>Reduce to icon</value>
</data>
<data name="MenuReduceTT" xml:space="preserve">
<value>Reduces OnTopReplica to the icon in the tray.</value>
</data>
<data name="MenuRegion" xml:space="preserve">
<value>Select region...</value>
</data>
<data name="MenuRegionTT" xml:space="preserve">
<value>Switches to "region mode", that allows you to select a limited region of the source's window as thumbnail.</value>
</data>
<data name="MenuReset" xml:space="preserve">
<value>Reset window</value>
</data>
<data name="MenuResetTT" xml:space="preserve">
<value>Resets OnTopReplica settings and its main window.</value>
</data>
<data name="MenuResize" xml:space="preserve">
<value>Resize</value>
</data>
<data name="MenuSwitch" xml:space="preserve">
<value>Switch to window</value>
</data>
<data name="MenuSwitchTT" xml:space="preserve">
<value>Switches to the source window and hides OnTopReplica.</value>
</data>
<data name="MenuWindows" xml:space="preserve">
<value>Select window</value>
</data>
<data name="MenuWindowsNone" xml:space="preserve">
<value>- none -</value>
</data>
<data name="MenuWindowsTT" xml:space="preserve">
<value>Displays a list of window you can select as thumbnail source.</value>
</data>
<data name="RightClick" xml:space="preserve">
<value>Right-click here to start...</value>
</data>
<data name="Slogan" xml:space="preserve">
<value>A lightweight, real-time, always on top thumbnail of a window of your choice.</value>
</data>
<data name="UpdateDisclaimer" xml:space="preserve">
<value>OnTopReplica automatically checks for updates. No information is logged at any point.</value>
</data>
<data name="UpdateNow" xml:space="preserve">
<value>Update now!</value>
</data>
<data name="AskUpdate" xml:space="preserve">
<value>Install OnTopReplica {0}?</value>
</data>
<data name="AskUpdateButtonCancel" xml:space="preserve">
<value>Cancel update
OnTopReplica will prompt you the next time it is started.</value>
</data>
<data name="AskUpdateButtonOk" xml:space="preserve">
<value>Proceed
Install OnTopReplica {0}.</value>
</data>
<data name="AskUpdateContent" xml:space="preserve">
<value>The new version will be automatically downloaded and installed.</value>
</data>
<data name="AskUpdateExpanded" xml:space="preserve">
<value>Installed version: {0}
Available version: {1}
Download size: {2} bytes</value>
</data>
<data name="AskUpdateTitle" xml:space="preserve">
<value>Update available</value>
</data>
<data name="ErrorDetailButton" xml:space="preserve">
<value>Details</value>
</data>
<data name="ErrorNoThumbnail" xml:space="preserve">
<value>No thumbnail loaded.</value>
</data>
<data name="ErrorUpdate" xml:space="preserve">
<value>Unable to check for updates.</value>
</data>
<data name="ErrorUpdateContent" xml:space="preserve">
<value>It appears that OnTopReplica wasn't installed using 'ClickOnce'. You'll have to update manually (visit &lt;a href="http://www.codeplex.com/ontopreplica"&gt;OnTopReplica's homepage&lt;/a&gt;).</value>
</data>
<data name="InfoUpdated" xml:space="preserve">
<value>OnTopReplica has been updated.</value>
</data>
<data name="InfoUpdatedContent" xml:space="preserve">
<value>In order to use the updated version of OnTopReplica you'll have to restart the application.</value>
</data>
<data name="InfoUpdatedTitle" xml:space="preserve">
<value>Update successful</value>
</data>
<data name="InfoUpToDate" xml:space="preserve">
<value>OnTopReplica is up to date.</value>
</data>
<data name="InfoUpToDateTitle" xml:space="preserve">
<value>No update available</value>
</data>
<data name="InfoClickThrough" xml:space="preserve">
<value>Enable Click-Through fullscreen mode?</value>
</data>
<data name="InfoClickThroughDetails" xml:space="preserve">
<value>Click-through only works if it has been enabled in the Resize submenu and if the window is semi-transparent.</value>
</data>
<data name="InfoClickThroughInformation" xml:space="preserve">
<value>In this mode the fullscreen window will behave as a partially transparent overlay, allowing you to click on the other windows behind it.
To return to normal mode anytime, double click on the OnTopReplica icon in the tray area.</value>
</data>
<data name="InfoClickThroughTitle" xml:space="preserve">
<value>Click-Through mode</value>
</data>
<data name="MenuResizeClickThrough" xml:space="preserve">
<value>Click-Through</value>
</data>
<data name="MenuResizeClickThroughTT" xml:space="preserve">
<value>If the window is not completely opaque when turned to fullscreen mode, it will let all clicks "fall through" (like a transparent overlay).</value>
</data>
<data name="InfoClickThroughNo" xml:space="preserve">
<value>No, use standard fullscreen
You can enable click-through later</value>
</data>
<data name="InfoClickThroughOk" xml:space="preserve">
<value>Use Click-Through</value>
</data>
<data name="MenuClickForwarding" xml:space="preserve">
<value>Click forwarding</value>
</data>
<data name="MenuClickForwardingTT" xml:space="preserve">
<value>Enable "click forwarding" to the cloned window.</value>
</data>
<data name="MenuQuitFullscreen" xml:space="preserve">
<value>Quit fullscreen mode</value>
</data>
<data name="Language" xml:space="preserve">
<value>Language</value>
</data>
<data name="RegionsTitle" xml:space="preserve">
<value>Regions</value>
</data>
<data name="RegionsSaveButton" xml:space="preserve">
<value>Save</value>
</data>
<data name="RegionsDeleteButton" xml:space="preserve">
<value>Delete</value>
</data>
<data name="RegionsCurrentRegion" xml:space="preserve">
<value>Current region:</value>
</data>
<data name="RegionsWidth" xml:space="preserve">
<value>Width</value>
</data>
<data name="RegionsHeight" xml:space="preserve">
<value>Height</value>
</data>
<data name="RegionsResetButton" xml:space="preserve">
<value>Reset</value>
</data>
<data name="RegionsDoneButton" xml:space="preserve">
<value>Done</value>
</data>
<data name="RegionsStoredRegions" xml:space="preserve">
<value>Stored regions</value>
</data>
<data name="InfoClickForwarding" xml:space="preserve">
<value>Do you want to enable "click forwarding"?</value>
</data>
<data name="InfoClickForwardingTitle" xml:space="preserve">
<value>Click forwarding</value>
</data>
<data name="InfoClickForwardingContent" xml:space="preserve">
<value>In this mode OnTopReplica will forward all left mouse clicks on it to the window that is being clones (this will allow you to do basic operations on the window without having to activate it).
To exit this mode, right-click on OnTopReplica and disable "Click forwarding" from the menu.</value>
</data>
</root>

View file

@ -0,0 +1,437 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VistaControls.Dwm;
using VistaControls.ThemeText;
using System.Drawing;
using System.Windows.Forms.VisualStyles;
namespace OnTopReplica {
class ThumbnailPanel : Panel {
//DWM Thumbnail stuff
Thumbnail _thumbnail = null;
bool _regionEnabled = false;
Rectangle _regionCurrent;
//Labels
ClickThroughLabel _labelNoGlass;
ThemedLabel _labelGlass;
public ThumbnailPanel()
: this(false) {
}
/// <summary>Constructs a new ThumbnailPanel with a given glass mode value.</summary>
/// <param name="enableGlass">True if glass should be enabled.</param>
public ThumbnailPanel(bool enableGlass) {
InitFormComponents();
GlassMode = enableGlass;
UpdateRightClickLabels();
}
private void InitFormComponents() {
//Themed Label
_labelGlass = new ThemedLabel();
_labelGlass.Dock = DockStyle.Fill;
_labelGlass.ForeColor = SystemColors.ControlText;
_labelGlass.Location = Point.Empty;
_labelGlass.Size = ClientSize;
_labelGlass.Name = "labelGlass";
_labelGlass.Text = Strings.RightClick;
_labelGlass.TextAlign = HorizontalAlignment.Center;
_labelGlass.TextAlignVertical = VerticalAlignment.Center;
this.Controls.Add(_labelGlass);
//Standard label
_labelNoGlass = new ClickThroughLabel();
_labelNoGlass.Dock = DockStyle.Fill;
_labelNoGlass.BackColor = Color.Transparent;
_labelNoGlass.Location = Point.Empty;
_labelNoGlass.Size = ClientSize;
_labelNoGlass.Name = "labelNoGlass";
_labelNoGlass.Text = Strings.RightClick;
_labelNoGlass.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.Controls.Add(_labelNoGlass);
}
#region Settings
bool _glassMode = true;
public bool GlassMode {
get {
return _glassMode;
}
set {
_glassMode = value;
//Set correct backcolor: black if glass is on
BackColor = (value || _fullscreenMode) ? Color.Black : SystemColors.Control;
UpdateRightClickLabels();
}
}
bool _fullscreenMode = false;
public bool FullscreenMode {
get {
return _fullscreenMode;
}
set {
_fullscreenMode = value;
//Set correct backcolor: black if fullscreen is on
BackColor = (value || _glassMode) ? Color.Black : SystemColors.Control;
UpdateRightClickLabels();
}
}
public Rectangle ShownRegion {
get {
return _regionCurrent;
}
set {
_regionEnabled = true;
_regionCurrent = value;
UpdateThubmnail();
}
}
public bool ShowRegion {
get {
return _regionEnabled;
}
set {
_regionEnabled = value;
UpdateThubmnail();
}
}
bool _drawMouseRegions = false;
public bool DrawMouseRegions {
get {
return _drawMouseRegions;
}
set {
//Set mode and reset region
_drawMouseRegions = value;
_drawingRegion = false;
//Cursor change
Cursor = (value) ? Cursors.Cross : Cursors.Default;
UpdateThubmnail();
}
}
private byte ThumbnailOpacity {
get {
return (_drawMouseRegions) ? (byte)130 : (byte)255;
}
}
bool _clickThrough = true;
public bool ClickThrough {
get {
return _clickThrough;
}
set {
_clickThrough = value;
}
}
#endregion
public void ResetShownRegion() {
_regionEnabled = false;
UpdateThubmnail();
}
public void SetThumbnailHandle(WindowHandle handle) {
if (_thumbnail != null && !_thumbnail.IsInvalid)
_thumbnail.Close();
//Get form and register thumbnail on it
Form owner = this.TopLevelControl as Form;
if(owner == null)
throw new Exception();
//Reset region
_regionEnabled = false;
_thumbnail = DwmManager.Register(owner, handle.Handle);
//Do empty thumbnail update to init DWM info (source size)
_thumbnail.Update(ClientRectangle, (byte)255, true, true);
//Correct update
UpdateThubmnail();
}
public void UnsetThumbnail() {
if (_thumbnail != null && !_thumbnail.IsInvalid)
_thumbnail.Close();
_thumbnail = null;
UpdateRightClickLabels();
}
public bool IsShowingThumbnail {
get {
return (_thumbnail != null && !_thumbnail.IsInvalid);
}
}
int padWidth = 0;
int padHeight = 0;
Size thumbnailSize;
/// <summary>Updates the thumbnail options and the right-click labels.</summary>
private void UpdateThubmnail() {
if (_thumbnail != null && !_thumbnail.IsInvalid){
Size sourceSize = (_regionEnabled) ? _regionCurrent.Size : _thumbnail.SourceSize;
thumbnailSize = ComputeIdealSize(sourceSize, Size);
padWidth = (Size.Width - thumbnailSize.Width) / 2;
padHeight = (Size.Height - thumbnailSize.Height) / 2;
Rectangle target = new Rectangle(padWidth, padHeight, thumbnailSize.Width, thumbnailSize.Height);
Rectangle source = (_regionEnabled) ? _regionCurrent : new Rectangle(Point.Empty, _thumbnail.SourceSize);
_thumbnail.Update(target, source, ThumbnailOpacity, true, true);
}
UpdateRightClickLabels();
}
/// <summary>Computes ideal size given an original size and a target to fit.</summary>
/// <param name="sourceSize">Size of the original thumbnail.</param>
/// <param name="clientSize">Size of the client area to fit.</param>
private Size ComputeIdealSize(Size sourceSize, Size clientSize) {
double sourceRatio = (double)sourceSize.Width / (double)sourceSize.Height;
double clientRatio = (double)clientSize.Width / (double)clientSize.Height;
Size ret;
if(sourceRatio >= clientRatio)
ret = new Size(clientSize.Width, (int)((double)clientSize.Width / sourceRatio));
else
ret = new Size((int)((double)clientSize.Height * sourceRatio), clientSize.Height);
return ret;
}
/// <summary>Updates the right-click labels.</summary>
/// <remarks>If a thumbnail is shown no label will be visible. If no thumbnail is active, the correct label will be visible.</remarks>
private void UpdateRightClickLabels(){
if (_thumbnail != null && !_thumbnail.IsInvalid /*&& !_drawMouseRegions*/) {
//Thumbnail active and no region drawing
_labelGlass.Visible = false;
_labelNoGlass.Visible = false;
}
else {
//Update text (removed, can't draw regions behind non-transparent ThemedLabel control)
//_labelGlass.Text = _labelNoGlass.Text = (_drawMouseRegions) ? Strings.DrawRegions : Strings.RightClick;
//Update visibility
_labelGlass.Visible = _glassMode;
_labelNoGlass.Visible = !_glassMode;
}
}
#region Event handling
protected override void OnResize(EventArgs eventargs) {
UpdateThubmnail();
base.OnResize(eventargs);
}
protected override void WndProc(ref Message m) {
//Make transparent to hit-testing
if (m.Msg == NativeMethods.WM_NCHITTEST && !DrawMouseRegions && ClickThrough) {
m.Result = new IntPtr(NativeMethods.HTTRANSPARENT);
return;
}
base.WndProc(ref m);
}
protected override void OnMouseClick(MouseEventArgs e) {
if (!_clickThrough && e.Button == MouseButtons.Left) {
if(_thumbnail != null)
OnCloneClick(ScreenToThumbnail(e.Location), false);
}
base.OnMouseClick(e);
}
protected override void OnMouseDoubleClick(MouseEventArgs e) {
if (!_clickThrough && e.Button == MouseButtons.Left) {
if (_thumbnail != null)
OnCloneClick(ScreenToThumbnail(e.Location), true);
}
base.OnMouseDoubleClick(e);
}
protected override void OnMouseDown(MouseEventArgs e) {
if (_drawMouseRegions && e.Button == MouseButtons.Left) {
_drawingRegion = true;
_regionStartPoint = _regionLastPoint = e.Location;
this.Invalidate();
}
base.OnMouseDown(e);
}
protected override void OnMouseUp(MouseEventArgs e) {
if (_drawMouseRegions && e.Button == MouseButtons.Left) {
_drawingRegion = false;
HandleRegionDrawn(_regionStartPoint, _regionLastPoint);
this.Invalidate();
}
base.OnMouseUp(e);
}
protected override void OnMouseLeave(EventArgs e) {
_drawingRegion = false;
this.Invalidate();
base.OnMouseLeave(e);
}
protected override void OnMouseMove(MouseEventArgs e) {
if (_drawingRegion && e.Button == MouseButtons.Left) {
_regionLastPoint = e.Location;
this.Invalidate();
}
base.OnMouseMove(e);
}
Pen penRed = new Pen(Color.FromArgb(255, Color.Red), 1.0f);
protected override void OnPaint(PaintEventArgs e) {
if (_drawingRegion) {
int left = Math.Min(_regionStartPoint.X, _regionLastPoint.X);
int right = Math.Max(_regionStartPoint.X, _regionLastPoint.X);
int top = Math.Min(_regionStartPoint.Y, _regionLastPoint.Y);
int bottom = Math.Max(_regionStartPoint.Y, _regionLastPoint.Y);
e.Graphics.DrawRectangle(penRed, left, top, right - left, bottom - top);
}
base.OnPaint(e);
}
#endregion
bool _drawingRegion = false;
Point _regionStartPoint;
Point _regionLastPoint;
public delegate void RegionDrawnHandler(object sender, Rectangle region);
public event RegionDrawnHandler RegionDrawn;
protected virtual void OnRegionDrawn(Rectangle region) {
if (RegionDrawn != null)
RegionDrawn(this, region);
}
protected Point ScreenToThumbnail(Point position) {
//Compensate padding
position.X -= padWidth;
position.Y -= padHeight;
PointF proportionalPosition = new PointF(
(float)position.X / thumbnailSize.Width,
(float)position.Y / thumbnailSize.Height
);
//Get real pixel region info
Size source = (_regionEnabled) ? _regionCurrent.Size : _thumbnail.SourceSize;
Point offset = (_regionEnabled) ? _regionCurrent.Location : Point.Empty;
return new Point(
(int)((proportionalPosition.X * source.Width) + offset.X),
(int)((proportionalPosition.Y * source.Height) + offset.Y)
);
}
protected void HandleRegionDrawn(Point start, Point end) {
int left = Math.Min(start.X, end.X);
int right = Math.Max(start.X, end.X);
int top = Math.Min(start.Y, end.Y);
int bottom = Math.Max(start.Y, end.Y);
//Offset points of padding space around thumbnail
left -= padWidth;
right -= padWidth;
top -= padHeight;
bottom -= padHeight;
//Get proportional region on thumbnail size
RectangleF region = new RectangleF(
(float)left / thumbnailSize.Width,
(float)top / thumbnailSize.Height,
(float)(right - left) / thumbnailSize.Width,
(float)(bottom - top) / thumbnailSize.Height
);
//Compute real pixel-region
Size source = (_regionEnabled) ? _regionCurrent.Size : _thumbnail.SourceSize;
Point offset = (_regionEnabled) ? _regionCurrent.Location : Point.Empty;
Rectangle regionPixel = new Rectangle(
(int)(region.Left * source.Width) + offset.X,
(int)(region.Top * source.Height) + offset.Y,
(int)(region.Width * source.Width),
(int)(region.Height * source.Height)
);
//Update region
ShownRegion = regionPixel;
//Report to hooked event handlers that the current region has changed
OnRegionDrawn(regionPixel);
}
public Size ThumbnailOriginalSize {
get {
if (_thumbnail != null && !_thumbnail.IsInvalid)
return (_regionEnabled) ? _regionCurrent.Size : _thumbnail.SourceSize;
else
throw new Exception(Strings.ErrorNoThumbnail);
}
}
public event EventHandler<CloneClickEventArgs> CloneClick;
protected virtual void OnCloneClick(Point location, bool doubleClick){
if(CloneClick != null)
CloneClick(this, new CloneClickEventArgs(location, doubleClick));
}
}
}

View file

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace OnTopReplica {
public static class Win32Helper {
/// <summary>Inject a fake left mouse click on a target window, on a location expressed in client coordinates.</summary>
/// <param name="window">Target window to click on.</param>
/// <param name="clickLocation">Location of the mouse click expressed in client coordiantes of the target window.</param>
/// <param name="doubleClick">True if a double click should be injected.</param>
public static void InjectFakeMouseClick(IntPtr window, Point clickLocation, bool doubleClick) {
NativeMethods.Point scrClickLocation = NativeMethods.ClientToScreen(window,
NativeMethods.Point.FromPoint(clickLocation));
//HACK (?)
//If target window has a Menu (which appears on the thumbnail) move the clicked location down
//in order to adjust (the menu isn't part of the window's client rect).
IntPtr hMenu = NativeMethods.GetMenu(window);
if (hMenu != IntPtr.Zero)
scrClickLocation.Y -= SystemInformation.MenuHeight;
IntPtr hChild = GetRealChildControlFromPoint(window, scrClickLocation);
NativeMethods.Point clntClickLocation = NativeMethods.ScreenToClient(hChild, scrClickLocation);
if (doubleClick)
InjectDoubleLeftMouseClick(hChild, clntClickLocation);
else
InjectLeftMouseClick(hChild, clntClickLocation);
}
private static void InjectLeftMouseClick(IntPtr child, NativeMethods.Point clientLocation) {
IntPtr lParamClickLocation = NativeMethods.MakeLParam(clientLocation.X, clientLocation.Y);
NativeMethods.PostMessage(child, NativeMethods.WM_LBUTTONDOWN,
new IntPtr(NativeMethods.MK_LBUTTON), lParamClickLocation);
NativeMethods.PostMessage(child, NativeMethods.WM_LBUTTONUP,
new IntPtr(NativeMethods.MK_LBUTTON), lParamClickLocation);
#if DEBUG
Console.WriteLine("Left click on window #" + child.ToString() + " at " + clientLocation.ToString());
#endif
}
private static void InjectDoubleLeftMouseClick(IntPtr child, NativeMethods.Point clientLocation) {
IntPtr lParamClickLocation = NativeMethods.MakeLParam(clientLocation.X, clientLocation.Y);
NativeMethods.PostMessage(child, NativeMethods.WM_LBUTTONDBLCLK,
new IntPtr(NativeMethods.MK_LBUTTON), lParamClickLocation);
#if DEBUG
Console.WriteLine("Double left click on window #" + child.ToString() + " at " + clientLocation.ToString());
#endif
}
/// <summary>Returns the child control of a window corresponding to a screen location.</summary>
/// <param name="parent">Parent window to explore.</param>
/// <param name="scrClickLocation">Child control location in screen coordinates.</param>
private static IntPtr GetRealChildControlFromPoint(IntPtr parent, NativeMethods.Point scrClickLocation) {
IntPtr curr = parent, child = IntPtr.Zero;
do {
child = NativeMethods.RealChildWindowFromPoint(curr, NativeMethods.ScreenToClient(curr, scrClickLocation));
if (child == IntPtr.Zero || child == curr)
break;
//Update for next loop
curr = child;
}
while (true);
//Safety check, shouldn't happen
if (curr == IntPtr.Zero)
curr = parent;
return curr;
}
}
}

View file

@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace OnTopReplica {
/// <summary>Helper class that keeps a window handle (HWND), the title of the window and can load its icon.</summary>
public class WindowHandle : System.Windows.Forms.IWin32Window {
IntPtr _handle;
string _title;
public WindowHandle(IntPtr p, string title) {
_handle = p;
_title = title;
}
public string Title {
get {
return _title;
}
}
Icon _icon = null;
bool _iconFetched = false;
public Icon Icon {
get {
if (!_iconFetched) {
//Fetch icon from window
IntPtr hIcon;
if (NativeMethods.SendMessageTimeout(_handle, NativeMethods.WM_GETICON, new IntPtr(2), new IntPtr(0), NativeMethods.SendMessageTimeoutFlags.AbortIfHung | NativeMethods.SendMessageTimeoutFlags.Block, 500, out hIcon) == IntPtr.Zero)
hIcon = IntPtr.Zero;
if (hIcon.ToInt64() != 0) {
_icon = Icon.FromHandle(hIcon);
}
else {
//Fetch icon from window class
hIcon = (IntPtr)NativeMethods.GetClassLongPtr(_handle, NativeMethods.ClassLong.IconSmall);
if (hIcon.ToInt64() != 0) {
_icon = Icon.FromHandle(hIcon);
}
}
}
_iconFetched = true;
return _icon;
}
}
public override string ToString() {
return _title;
}
public override bool Equals(object obj) {
if (ReferenceEquals(obj, this))
return true;
System.Windows.Forms.IWin32Window win = obj as System.Windows.Forms.IWin32Window;
if (win == null)
return false;
return (win.Handle == _handle);
}
public override int GetHashCode() {
return _handle.GetHashCode();
}
#region IWin32Window Members
public IntPtr Handle {
get { return _handle; }
}
#endregion
}
}

View file

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace OnTopReplica {
static class WindowListHelper {
const int cMaxWindowTitleLength = 60;
public static void PopulateMenu(WindowManager windowManager, ToolStrip menu, WindowHandle currentHandle, EventHandler clickHandler){
//Clear
menu.Items.Clear();
//"None" selection
var nullTsi = new ToolStripMenuItem(Strings.MenuWindowsNone);
nullTsi.Tag = null;
nullTsi.Click += clickHandler;
nullTsi.Checked = (currentHandle == null);
menu.Items.Add(nullTsi);
//Add an item for each window, the tag stores the window index
int i = 0;
foreach (WindowHandle h in windowManager.Windows) {
var tsi = new ToolStripMenuItem();
if (h.Title.Length > cMaxWindowTitleLength) {
tsi.Text = h.Title.Substring(0, cMaxWindowTitleLength) + "...";
tsi.ToolTipText = h.Title;
}
else
tsi.Text = h.Title;
tsi.Click += clickHandler;
tsi.Tag = i++;
if (h.Icon != null) {
tsi.Image = h.Icon.ToBitmap();
}
tsi.Checked = h.Equals(currentHandle);
menu.Items.Add(tsi);
}
}
}
}

View file

@ -0,0 +1,126 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OnTopReplica {
/// <summary>A helper class that allows you to easily build and keep a list of Windows (in the form of WindowHandle objects).</summary>
public class WindowManager {
IList<WindowHandle> _windows = null;
public enum EnumerationMode {
/// <summary>All windows with 'Visible' flag.</summary>
AllVisible,
/// <summary>All top level windows.</summary>
AllTopLevel,
/// <summary>Windows of a task (like Alt+Tab).</summary>
TaskWindows
}
public WindowManager() {
Refresh(EnumerationMode.AllTopLevel);
}
public WindowManager(EnumerationMode mode) {
Refresh(mode);
}
/// <summary>Refreshes the window list.</summary>
public void Refresh(EnumerationMode mode) {
_windows = new List<WindowHandle>();
NativeMethods.EnumWindowsProc proc = null;
switch (mode) {
case EnumerationMode.AllVisible:
proc = new NativeMethods.EnumWindowsProc(EnumWindowProcAll);
break;
case EnumerationMode.AllTopLevel:
proc = new NativeMethods.EnumWindowsProc(EnumWindowProcTopLevel);
break;
case EnumerationMode.TaskWindows:
proc = new NativeMethods.EnumWindowsProc(EnumWindowProcTask);
break;
}
NativeMethods.EnumWindows(proc, IntPtr.Zero);
}
public IList<WindowHandle> Windows {
get {
return _windows;
}
}
private bool EnumWindowProcAll(IntPtr hwnd, IntPtr lParam) {
if (NativeMethods.IsWindowVisible(hwnd)) {
_windows.Add(new WindowHandle(hwnd, GetWindowTitle(hwnd)));
}
return true;
}
private bool EnumWindowProcTopLevel(IntPtr hwnd, IntPtr lParam) {
if (NativeMethods.IsWindowVisible(hwnd)) {
//Check if window has no parent
if ((long)NativeMethods.GetParent(hwnd) == 0 && NativeMethods.GetDesktopWindow() != hwnd) {
_windows.Add(new WindowHandle(hwnd, GetWindowTitle(hwnd)));
}
}
return true;
}
private bool EnumWindowProcTask(IntPtr hwnd, IntPtr lParam) {
//Code taken from: http://www.thescarms.com/VBasic/alttab.aspx
//Accept windows that
// - are visible
// - do not have a parent
// - have no owner and are not Tool windows OR
// - have an owner and are App windows
//Reject empty titles
string title = GetWindowTitle(hwnd);
if (string.IsNullOrEmpty(title))
return true;
if (NativeMethods.IsWindowVisible(hwnd)) {
if ((long)NativeMethods.GetParent(hwnd) == 0) {
bool hasOwner = (long)NativeMethods.GetWindow(hwnd, NativeMethods.GetWindowMode.GW_OWNER) != 0;
NativeMethods.WindowExStyles exStyle = (NativeMethods.WindowExStyles)NativeMethods.GetWindowLong(hwnd, NativeMethods.WindowLong.ExStyle);
if (((exStyle & NativeMethods.WindowExStyles.ToolWindow) == 0 && !hasOwner) ||
((exStyle & NativeMethods.WindowExStyles.AppWindow) == NativeMethods.WindowExStyles.AppWindow && hasOwner)) {
//Accept
_windows.Add(new WindowHandle(hwnd, title));
}
}
}
return true;
}
#region Auxiliary methods
private string GetWindowTitle(IntPtr hwnd) {
int length = NativeMethods.GetWindowTextLength(hwnd);
if (length > 0) {
StringBuilder sb = new StringBuilder(length + 1);
if (NativeMethods.GetWindowText(hwnd, sb, sb.Capacity) > 0)
return sb.ToString();
else
return String.Empty;
}
else
return String.Empty;
}
#endregion
}
}

48
OnTopReplica/app.config Normal file
View file

@ -0,0 +1,48 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="OnTopReplica.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<userSettings>
<OnTopReplica.Properties.Settings>
<setting name="UseGlass" serializeAs="String">
<value>True</value>
</setting>
<setting name="AutoFitOnResize" serializeAs="String">
<value>False</value>
</setting>
<setting name="Opacity" serializeAs="String">
<value>255</value>
</setting>
<setting name="LastLocation" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="LastSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="WindowPositionStored" serializeAs="String">
<value>False</value>
</setting>
<setting name="StoreWindowPosition" serializeAs="String">
<value>False</value>
</setting>
<setting name="Language" serializeAs="String">
<value>(Default)</value>
</setting>
<setting name="MustUpdate" serializeAs="String">
<value>True</value>
</setting>
<setting name="ClickThrough" serializeAs="String">
<value>True</value>
</setting>
<setting name="FirstTimeClickThrough" serializeAs="String">
<value>True</value>
</setting>
<setting name="FirstTimeClickForwarding" serializeAs="String">
<value>True</value>
</setting>
</OnTopReplica.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>