This commit is contained in:
Lorenz Cuno Klopfenstein 2013-10-15 14:47:59 +02:00
commit 20565c2777
22 changed files with 0 additions and 2810 deletions

0
Graphics/Raster/help.png Normal file
View file

View file

0
Graphics/Vector/help.psd Normal file
View file

View file

View file

View file

View file

@ -1,560 +0,0 @@
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.fullSelectWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.switchToWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectRegionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.advancedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clickForwardingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clickThroughToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupSwitchModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreLastClonedWindowToolStripMenuItem = 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.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.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.restorePositionAndSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.disabledToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.topLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.topRightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.centerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bottomLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bottomRightToolStripMenuItem = 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.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuContextClose = new System.Windows.Forms.ToolStripMenuItem();
this.fullOpacityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuFullscreenContext = new System.Windows.Forms.ContextMenuStrip(this.components);
this.enableClickthroughToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fullExitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuContext.SuspendLayout();
this.menuWindows.SuspendLayout();
this.menuOpacity.SuspendLayout();
this.menuResize.SuspendLayout();
this.menuFullscreenContext.SuspendLayout();
this.SuspendLayout();
//
// menuContext
//
this.menuContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuContextWindows,
this.switchToWindowToolStripMenuItem,
this.selectRegionToolStripMenuItem,
this.advancedToolStripMenuItem,
this.menuContextOpacity,
this.resizeToolStripMenuItem,
this.dockToolStripMenuItem,
this.chromeToolStripMenuItem,
this.reduceToIconToolStripMenuItem,
this.toolStripSeparator1,
this.settingsToolStripMenuItem,
this.aboutToolStripMenuItem,
this.menuContextClose});
this.menuContext.Name = "menuContext";
this.menuContext.Size = new System.Drawing.Size(187, 296);
this.menuContext.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_opening);
//
// menuContextWindows
//
this.menuContextWindows.DropDown = this.menuWindows;
this.menuContextWindows.Image = global::OnTopReplica.Properties.Resources.list;
this.menuContextWindows.Name = "menuContextWindows";
this.menuContextWindows.Size = new System.Drawing.Size(186, 22);
this.menuContextWindows.Text = global::OnTopReplica.Strings.MenuWindows;
this.menuContextWindows.ToolTipText = global::OnTopReplica.Strings.MenuWindowsTT;
//
// 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(118, 26);
//
// noneToolStripMenuItem
//
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
this.noneToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.noneToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuWindowsNone;
//
// fullSelectWindowToolStripMenuItem
//
this.fullSelectWindowToolStripMenuItem.DropDown = this.menuWindows;
this.fullSelectWindowToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.list;
this.fullSelectWindowToolStripMenuItem.Name = "fullSelectWindowToolStripMenuItem";
this.fullSelectWindowToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
this.fullSelectWindowToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuWindows;
this.fullSelectWindowToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuWindowsTT;
//
// switchToWindowToolStripMenuItem
//
this.switchToWindowToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.xiao_arrow;
this.switchToWindowToolStripMenuItem.Name = "switchToWindowToolStripMenuItem";
this.switchToWindowToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
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.Image = global::OnTopReplica.Properties.Resources.regions;
this.selectRegionToolStripMenuItem.Name = "selectRegionToolStripMenuItem";
this.selectRegionToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.selectRegionToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuRegion;
this.selectRegionToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuRegionTT;
this.selectRegionToolStripMenuItem.Click += new System.EventHandler(this.Menu_Region_click);
//
// advancedToolStripMenuItem
//
this.advancedToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clickForwardingToolStripMenuItem,
this.clickThroughToolStripMenuItem,
this.groupSwitchModeToolStripMenuItem,
this.restoreLastClonedWindowToolStripMenuItem});
this.advancedToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.xiao_wrench;
this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem";
this.advancedToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.advancedToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuAdvanced;
this.advancedToolStripMenuItem.DropDownOpening += new System.EventHandler(this.Menu_Advanced_opening);
//
// clickForwardingToolStripMenuItem
//
this.clickForwardingToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.clickforwarding;
this.clickForwardingToolStripMenuItem.Name = "clickForwardingToolStripMenuItem";
this.clickForwardingToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.clickForwardingToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuClickForwarding;
this.clickForwardingToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuClickForwardingTT;
this.clickForwardingToolStripMenuItem.Click += new System.EventHandler(this.Menu_ClickForwarding_click);
//
// clickThroughToolStripMenuItem
//
this.clickThroughToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.window_opacity;
this.clickThroughToolStripMenuItem.Name = "clickThroughToolStripMenuItem";
this.clickThroughToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.clickThroughToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuClickThrough;
this.clickThroughToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuClickThroughTT;
this.clickThroughToolStripMenuItem.Click += new System.EventHandler(this.Menu_ClickThrough_click);
//
// groupSwitchModeToolStripMenuItem
//
this.groupSwitchModeToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.groupmode;
this.groupSwitchModeToolStripMenuItem.Name = "groupSwitchModeToolStripMenuItem";
this.groupSwitchModeToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.groupSwitchModeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuGroupSwitch;
this.groupSwitchModeToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuGroupSwitchTT;
this.groupSwitchModeToolStripMenuItem.Click += new System.EventHandler(this.Menu_GroupSwitchMode_click);
//
// restoreLastClonedWindowToolStripMenuItem
//
this.restoreLastClonedWindowToolStripMenuItem.Name = "restoreLastClonedWindowToolStripMenuItem";
this.restoreLastClonedWindowToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.restoreLastClonedWindowToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuRestoreLast;
this.restoreLastClonedWindowToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuRestoreLastTT;
this.restoreLastClonedWindowToolStripMenuItem.Click += new System.EventHandler(this.Menu_RestoreLastWindow_click);
//
// menuContextOpacity
//
this.menuContextOpacity.DropDown = this.menuOpacity;
this.menuContextOpacity.Image = global::OnTopReplica.Properties.Resources.window_opacity;
this.menuContextOpacity.Name = "menuContextOpacity";
this.menuContextOpacity.Size = new System.Drawing.Size(186, 22);
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.menuOpacity.Name = "menuOpacity";
this.menuOpacity.OwnerItem = this.fullOpacityToolStripMenuItem;
this.menuOpacity.ShowCheckMargin = true;
this.menuOpacity.ShowImageMargin = false;
this.menuOpacity.Size = new System.Drawing.Size(154, 92);
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(153, 22);
this.toolStripMenuItem1.Tag = 1D;
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(153, 22);
this.toolStripMenuItem2.Tag = 0.75D;
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(153, 22);
this.toolStripMenuItem3.Tag = 0.5D;
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(153, 22);
this.toolStripMenuItem4.Tag = 0.25D;
this.toolStripMenuItem4.Text = global::OnTopReplica.Strings.MenuOp25;
this.toolStripMenuItem4.ToolTipText = global::OnTopReplica.Strings.MenuOp25TT;
this.toolStripMenuItem4.Click += new System.EventHandler(this.Menu_Opacity_click);
//
// resizeToolStripMenuItem
//
this.resizeToolStripMenuItem.DropDown = this.menuResize;
this.resizeToolStripMenuItem.Enabled = false;
this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem";
this.resizeToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
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.toolStripSeparator2,
this.restorePositionAndSizeToolStripMenuItem});
this.menuResize.Name = "menuResize";
this.menuResize.OwnerItem = this.resizeToolStripMenuItem;
this.menuResize.Size = new System.Drawing.Size(218, 170);
this.menuResize.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_Resize_opening);
//
// doubleToolStripMenuItem1
//
this.doubleToolStripMenuItem1.Name = "doubleToolStripMenuItem1";
this.doubleToolStripMenuItem1.Size = new System.Drawing.Size(217, 22);
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(217, 22);
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(217, 22);
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(217, 22);
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(214, 6);
//
// fullscreenToolStripMenuItem1
//
this.fullscreenToolStripMenuItem1.Image = global::OnTopReplica.Properties.Resources.fullscreen;
this.fullscreenToolStripMenuItem1.Name = "fullscreenToolStripMenuItem1";
this.fullscreenToolStripMenuItem1.Size = new System.Drawing.Size(217, 22);
this.fullscreenToolStripMenuItem1.Text = global::OnTopReplica.Strings.MenuFitFullscreen;
this.fullscreenToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Resize_Fullscreen);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(214, 6);
//
// restorePositionAndSizeToolStripMenuItem
//
this.restorePositionAndSizeToolStripMenuItem.Name = "restorePositionAndSizeToolStripMenuItem";
this.restorePositionAndSizeToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
this.restorePositionAndSizeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuRecall;
this.restorePositionAndSizeToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuRecallTT;
this.restorePositionAndSizeToolStripMenuItem.Click += new System.EventHandler(this.Menu_Resize_RecallPosition_click);
//
// dockToolStripMenuItem
//
this.dockToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.disabledToolStripMenuItem,
this.topLeftToolStripMenuItem,
this.topRightToolStripMenuItem,
this.centerToolStripMenuItem,
this.bottomLeftToolStripMenuItem,
this.bottomRightToolStripMenuItem});
this.dockToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_null;
this.dockToolStripMenuItem.Name = "dockToolStripMenuItem";
this.dockToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.dockToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosition;
this.dockToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuPositionTT;
this.dockToolStripMenuItem.DropDownOpening += new System.EventHandler(this.Menu_Position_Opening);
//
// disabledToolStripMenuItem
//
this.disabledToolStripMenuItem.Checked = true;
this.disabledToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.disabledToolStripMenuItem.Name = "disabledToolStripMenuItem";
this.disabledToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.disabledToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosDisabled;
this.disabledToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_Disable);
//
// topLeftToolStripMenuItem
//
this.topLeftToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_topleft;
this.topLeftToolStripMenuItem.Name = "topLeftToolStripMenuItem";
this.topLeftToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
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(145, 22);
this.topRightToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosTopRight;
this.topRightToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_TopRight);
//
// centerToolStripMenuItem
//
this.centerToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_center;
this.centerToolStripMenuItem.Name = "centerToolStripMenuItem";
this.centerToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.centerToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosCenter;
this.centerToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_Center);
//
// bottomLeftToolStripMenuItem
//
this.bottomLeftToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_bottomleft;
this.bottomLeftToolStripMenuItem.Name = "bottomLeftToolStripMenuItem";
this.bottomLeftToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
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(145, 22);
this.bottomRightToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuPosBottomRight;
this.bottomRightToolStripMenuItem.Click += new System.EventHandler(this.Menu_Position_BottomRight);
//
// chromeToolStripMenuItem
//
this.chromeToolStripMenuItem.Name = "chromeToolStripMenuItem";
this.chromeToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.chromeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuChrome;
this.chromeToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuChromeTT;
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(186, 22);
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(183, 6);
//
// settingsToolStripMenuItem
//
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.settingsToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuSettings;
this.settingsToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuSettingsTT;
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.Menu_Settings_click);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.xiao_help;
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
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(186, 22);
this.menuContextClose.Text = global::OnTopReplica.Strings.MenuClose;
this.menuContextClose.Click += new System.EventHandler(this.Menu_Close_click);
//
// fullOpacityToolStripMenuItem
//
this.fullOpacityToolStripMenuItem.DropDown = this.menuOpacity;
this.fullOpacityToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.window_opacity;
this.fullOpacityToolStripMenuItem.Name = "fullOpacityToolStripMenuItem";
this.fullOpacityToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
this.fullOpacityToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuOpacity;
//
// menuFullscreenContext
//
this.menuFullscreenContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fullSelectWindowToolStripMenuItem,
this.fullOpacityToolStripMenuItem,
this.enableClickthroughToolStripMenuItem,
this.fullExitToolStripMenuItem});
this.menuFullscreenContext.Name = "menuFullscreenContext";
this.menuFullscreenContext.Size = new System.Drawing.Size(190, 92);
//
// enableClickthroughToolStripMenuItem
//
this.enableClickthroughToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.clickforwarding;
this.enableClickthroughToolStripMenuItem.Name = "enableClickthroughToolStripMenuItem";
this.enableClickthroughToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
this.enableClickthroughToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuClickThrough;
this.enableClickthroughToolStripMenuItem.ToolTipText = global::OnTopReplica.Strings.MenuClickThroughTT;
this.enableClickthroughToolStripMenuItem.Click += new System.EventHandler(this.Menu_ClickThrough_click);
//
// fullExitToolStripMenuItem
//
this.fullExitToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.close_new;
this.fullExitToolStripMenuItem.Name = "fullExitToolStripMenuItem";
this.fullExitToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
this.fullExitToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuQuitFullscreen;
this.fullExitToolStripMenuItem.Click += new System.EventHandler(this.Menu_Fullscreen_ExitFullscreen_click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(318, 226);
this.ControlBox = false;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.HideCaption = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(44, 44);
this.Name = "MainForm";
this.Text = "OnTopReplica";
this.TopMost = true;
this.menuContext.ResumeLayout(false);
this.menuWindows.ResumeLayout(false);
this.menuOpacity.ResumeLayout(false);
this.menuResize.ResumeLayout(false);
this.menuFullscreenContext.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.ToolStripMenuItem noneToolStripMenuItem;
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.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 toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem chromeToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip menuFullscreenContext;
private System.Windows.Forms.ToolStripMenuItem fullSelectWindowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fullOpacityToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fullExitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem advancedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clickForwardingToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clickThroughToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem groupSwitchModeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem enableClickthroughToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem centerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem disabledToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem restorePositionAndSizeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreLastClonedWindowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
}
}

View file

@ -1,474 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using OnTopReplica.Native;
using OnTopReplica.Properties;
using OnTopReplica.StartupOptions;
using OnTopReplica.Update;
using OnTopReplica.WindowSeekers;
using WindowsFormsAero.Dwm;
using WindowsFormsAero.TaskDialog;
namespace OnTopReplica {
partial class MainForm : AspectRatioForm {
//GUI elements
ThumbnailPanel _thumbnailPanel;
//Managers
MessagePumpManager _msgPumpManager = new MessagePumpManager();
WindowListMenuManager _windowListManager;
Options _startupOptions;
public MainForm(Options startupOptions) {
_startupOptions = startupOptions;
//WinForms init pass
InitializeComponent();
//Store default values
DefaultNonClickTransparencyKey = this.TransparencyKey;
DefaultBorderStyle = this.FormBorderStyle;
//Thumbnail panel
_thumbnailPanel = new ThumbnailPanel {
Location = Point.Empty,
Dock = DockStyle.Fill
};
_thumbnailPanel.CloneClick += new EventHandler<CloneClickEventArgs>(Thumbnail_CloneClick);
Controls.Add(_thumbnailPanel);
//Set native renderer on context menus
Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer(
menuContext, menuWindows, menuOpacity, menuResize, menuFullscreenContext
);
//Set to Key event preview
this.KeyPreview = true;
}
#region Event override
protected override void OnHandleCreated(EventArgs e){
base.OnHandleCreated(e);
//Window init
KeepAspectRatio = false;
GlassEnabled = true;
GlassMargins = new Margins(-1);
//Managers
_msgPumpManager.Initialize(this);
_windowListManager = new WindowListMenuManager(this, menuWindows);
_windowListManager.ParentMenus = new System.Windows.Forms.ContextMenuStrip[] {
menuContext, menuFullscreenContext
};
//Platform specific form initialization
Program.Platform.PostHandleFormInit(this);
}
protected override void OnShown(EventArgs e) {
base.OnShown(e);
//Apply startup options
_startupOptions.Apply(this);
}
protected override void OnClosing(CancelEventArgs e) {
//Store last thumbnail, if any
if (_thumbnailPanel.IsShowingThumbnail && CurrentThumbnailWindowHandle != null) {
Settings.Default.RestoreLastWindowTitle = CurrentThumbnailWindowHandle.Title;
Settings.Default.RestoreLastWindowHwnd = CurrentThumbnailWindowHandle.Handle.ToInt64();
Settings.Default.RestoreLastWindowClass = CurrentThumbnailWindowHandle.Class;
}
else {
Settings.Default.RestoreLastWindowTitle = string.Empty;
Settings.Default.RestoreLastWindowHwnd = 0;
Settings.Default.RestoreLastWindowClass = string.Empty;
}
_msgPumpManager.Dispose();
Program.Platform.CloseForm(this);
base.OnClosing(e);
}
protected override void OnMove(EventArgs e) {
base.OnMove(e);
AdjustSidePanelLocation();
}
protected override void OnResizeEnd(EventArgs e) {
base.OnResizeEnd(e);
RefreshScreenLock();
}
protected override void OnActivated(EventArgs e) {
base.OnActivated(e);
//Deactivate click-through if form is reactivated
if (ClickThroughEnabled) {
ClickThroughEnabled = false;
}
Program.Platform.RestoreForm(this);
}
protected override void OnDeactivate(EventArgs e) {
base.OnDeactivate(e);
//HACK: sometimes, even if TopMost is true, the window loses its "always on top" status.
// This is a fix attempt that probably won't work...
if (!IsFullscreen) { //fullscreen mode doesn't use TopMost
TopMost = false;
TopMost = true;
}
}
protected override void OnMouseWheel(MouseEventArgs e) {
base.OnMouseWheel(e);
if (!IsFullscreen) {
int change = (int)(e.Delta / 6.0); //assumes a mouse wheel "tick" is in the 80-120 range
AdjustSize(change);
RefreshScreenLock();
}
}
protected override void OnMouseDoubleClick(MouseEventArgs e) {
base.OnMouseDoubleClick(e);
//This is handled by the WM_NCLBUTTONDBLCLK msg handler usually (because the GlassForm translates
//clicks on client to clicks on caption). But if fullscreen mode disables GlassForm dragging, we need
//this auxiliary handler to switch mode.
IsFullscreen = !IsFullscreen;
}
protected override void OnMouseClick(MouseEventArgs e) {
base.OnMouseClick(e);
//Same story as above (OnMouseDoubleClick)
if (e.Button == System.Windows.Forms.MouseButtons.Right) {
OpenContextMenu(null);
}
}
protected override void WndProc(ref Message m) {
if (_msgPumpManager != null) {
if (_msgPumpManager.PumpMessage(ref m)) {
return;
}
}
switch (m.Msg) {
case WM.NCRBUTTONUP:
//Open context menu if right button clicked on caption (i.e. all of the window area because of glass)
if (m.WParam.ToInt32() == HT.CAPTION) {
OpenContextMenu(null);
m.Result = IntPtr.Zero;
return;
}
break;
case WM.NCLBUTTONDBLCLK:
//Toggle fullscreen mode if double click on caption (whole glass area)
if (m.WParam.ToInt32() == HT.CAPTION) {
IsFullscreen = !IsFullscreen;
m.Result = IntPtr.Zero;
return;
}
break;
case WM.NCHITTEST:
//Make transparent to hit-testing if in click through mode
if (ClickThroughEnabled && (ModifierKeys & Keys.Alt) != Keys.Alt) {
m.Result = (IntPtr)HT.TRANSPARENT;
return;
}
break;
}
base.WndProc(ref m);
}
#endregion
#region Keyboard event handling
protected override void OnKeyUp(KeyEventArgs e) {
base.OnKeyUp(e);
//ALT
if (e.Modifiers == Keys.Alt) {
if (e.KeyCode == Keys.Enter) {
e.Handled = true;
IsFullscreen = !IsFullscreen;
}
else if (e.KeyCode == Keys.D1 || e.KeyCode == Keys.NumPad1) {
FitToThumbnail(0.25);
}
else if (e.KeyCode == Keys.D2 || e.KeyCode == Keys.NumPad2) {
FitToThumbnail(0.5);
}
else if (e.KeyCode == Keys.D3 || e.KeyCode == Keys.NumPad3 ||
e.KeyCode == Keys.D0 || e.KeyCode == Keys.NumPad0) {
FitToThumbnail(1.0);
}
else if (e.KeyCode == Keys.D4 || e.KeyCode == Keys.NumPad4) {
FitToThumbnail(2.0);
}
}
//F11 Fullscreen switch
else if (e.KeyCode == Keys.F11) {
e.Handled = true;
IsFullscreen = !IsFullscreen;
}
//ESCAPE
else if (e.KeyCode == Keys.Escape) {
//Disable click-through
if (ClickThroughEnabled) {
ClickThroughEnabled = false;
}
//Toggle fullscreen
else if (IsFullscreen) {
IsFullscreen = false;
}
//Disable click forwarding
else if (ClickForwardingEnabled) {
ClickForwardingEnabled = false;
}
}
}
#endregion
#region Fullscreen
bool _isFullscreen = false;
Point _preFullscreenLocation;
Size _preFullscreenSize;
FormBorderStyle _preFullscreenBorderStyle;
public bool IsFullscreen {
get {
return _isFullscreen;
}
set {
if (IsFullscreen == value)
return;
if (value && !_thumbnailPanel.IsShowingThumbnail)
return;
CloseSidePanel(); //on switch, always hide side panels
//Location and size
if (value) {
_preFullscreenLocation = Location;
_preFullscreenSize = ClientSize;
_preFullscreenBorderStyle = FormBorderStyle;
FormBorderStyle = FormBorderStyle.None;
var currentScreen = Screen.FromControl(this);
Size = currentScreen.WorkingArea.Size;
Location = currentScreen.WorkingArea.Location;
}
else {
FormBorderStyle = _preFullscreenBorderStyle;
Location = _preFullscreenLocation;
ClientSize = _preFullscreenSize;
RefreshAspectRatio();
}
//Common
GlassEnabled = !value;
TopMost = !value;
HandleMouseMove = !value;
_isFullscreen = value;
Program.Platform.OnFormStateChange(this);
}
}
#endregion
#region Thumbnail operation
/// <summary>
/// Sets a new thumbnail.
/// </summary>
/// <param name="handle">Handle to the window to clone.</param>
/// <param name="region">Region of the window to clone or null.</param>
public void SetThumbnail(WindowHandle handle, ThumbnailRegion region) {
try {
System.Diagnostics.Trace.WriteLine(string.Format("Cloning window HWND {0} of class {1}.", handle.Handle, handle.Class));
CurrentThumbnailWindowHandle = handle;
_thumbnailPanel.SetThumbnailHandle(handle, region);
//Set aspect ratio (this will resize the form), do not refresh if in fullscreen
SetAspectRatio(_thumbnailPanel.ThumbnailPixelSize, !IsFullscreen);
}
catch (Exception ex) {
System.Diagnostics.Trace.Fail("Unable to set thumbnail.", ex.ToString());
ThumbnailError(ex, false, Strings.ErrorUnableToCreateThumbnail);
_thumbnailPanel.UnsetThumbnail();
}
}
/// <summary>
/// Enables group mode on a list of window handles.
/// </summary>
/// <param name="handles">List of window handles.</param>
public void SetThumbnailGroup(IList<WindowHandle> handles) {
if (handles.Count == 0)
return;
//At last one thumbnail
SetThumbnail(handles[0], null);
//Handle if no real group
if (handles.Count == 1)
return;
CurrentThumbnailWindowHandle = null;
_msgPumpManager.Get<MessagePumpProcessors.GroupSwitchManager>().EnableGroupMode(handles);
}
/// <summary>
/// Disables the cloned thumbnail.
/// </summary>
public void UnsetThumbnail() {
//Unset handle
CurrentThumbnailWindowHandle = null;
_thumbnailPanel.UnsetThumbnail();
//Disable aspect ratio
KeepAspectRatio = false;
}
/// <summary>
/// Gets or sets the region displayed of the current thumbnail.
/// </summary>
public ThumbnailRegion SelectedThumbnailRegion {
get {
if (!_thumbnailPanel.IsShowingThumbnail || !_thumbnailPanel.ConstrainToRegion)
return null;
return _thumbnailPanel.SelectedRegion;
}
set {
if (!_thumbnailPanel.IsShowingThumbnail)
return;
_thumbnailPanel.SelectedRegion = value;
SetAspectRatio(_thumbnailPanel.ThumbnailPixelSize, true);
FixPositionAndSize();
}
}
const int FixMargin = 10;
/// <summary>
/// Fixes the form's position and size, ensuring it is fully displayed in the current screen.
/// </summary>
private void FixPositionAndSize() {
var screen = Screen.FromControl(this);
if (Width > screen.WorkingArea.Width) {
Width = screen.WorkingArea.Width - FixMargin;
}
if (Height > screen.WorkingArea.Height) {
Height = screen.WorkingArea.Height - FixMargin;
}
if (Location.X + Width > screen.WorkingArea.Right) {
Location = new Point(screen.WorkingArea.Right - Width - FixMargin, Location.Y);
}
if (Location.Y + Height > screen.WorkingArea.Bottom) {
Location = new Point(Location.X, screen.WorkingArea.Bottom - Height - FixMargin);
}
}
private void ThumbnailError(Exception ex, bool suppress, string title) {
if (!suppress) {
ShowErrorDialog(title, Strings.ErrorGenericThumbnailHandleError, ex.Message);
}
UnsetThumbnail();
}
/// <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.ThumbnailPixelSize;
Size fittedSize = new Size((int)(originalSize.Width * p), (int)(originalSize.Height * p));
ClientSize = fittedSize;
RefreshScreenLock();
}
catch (Exception ex) {
ThumbnailError(ex, false, Strings.ErrorUnableToFit);
}
}
#endregion
#region Accessors
/// <summary>
/// Gets the form's thumbnail panel.
/// </summary>
public ThumbnailPanel ThumbnailPanel {
get {
return _thumbnailPanel;
}
}
/// <summary>
/// Gets the form's message pump manager.
/// </summary>
public MessagePumpManager MessagePumpManager {
get {
return _msgPumpManager;
}
}
/// <summary>
/// Gets the form's window list drop down menu.
/// </summary>
public ContextMenuStrip MenuWindows {
get {
return menuWindows;
}
}
/// <summary>
/// Retrieves the window handle of the currently cloned thumbnail.
/// </summary>
public WindowHandle CurrentThumbnailWindowHandle {
get;
private set;
}
#endregion
}
}

View file

@ -1,118 +0,0 @@
using System.Drawing;
using System.Windows.Forms;
using WindowsFormsAero.TaskDialog;
namespace OnTopReplica {
partial class MainForm {
/// <summary>
/// Opens the context menu.
/// </summary>
/// <param name="position">Optional position of the mouse, relative to which the menu is shown.</param>
public void OpenContextMenu(Point? position) {
Point menuPosition = MousePosition;
if (position.HasValue)
menuPosition = position.Value;
if (IsFullscreen) {
menuFullscreenContext.Show(menuPosition);
}
else {
menuContext.Show(menuPosition);
}
}
/// <summary>
/// Gets the window's vertical chrome size.
/// </summary>
public int ChromeBorderVertical {
get {
if (IsChromeVisible)
return SystemInformation.FrameBorderSize.Height;
else
return 0;
}
}
/// <summary>
/// Gets the window's horizontal chrome size.
/// </summary>
public int ChromeBorderHorizontal {
get {
if (IsChromeVisible)
return SystemInformation.FrameBorderSize.Width;
else
return 0;
}
}
/// <summary>
/// Displays an error task dialog.
/// </summary>
/// <param name="mainInstruction">Main instruction of the error dialog.</param>
/// <param name="explanation">Detailed informations about the error.</param>
/// <param name="errorMessage">Expanded error codes/messages.</param>
private void ShowErrorDialog(string mainInstruction, string explanation, string errorMessage) {
TaskDialog dlg = new TaskDialog(mainInstruction, Strings.ErrorGenericTitle, explanation) {
CommonIcon = TaskDialogIcon.Stop,
IsExpanded = false
};
if (!string.IsNullOrEmpty(errorMessage)) {
dlg.ExpandedInformation = Strings.ErrorGenericInfoText + errorMessage;
dlg.ExpandedControlText = Strings.ErrorGenericInfoButton;
}
dlg.Show(this);
}
/// <summary>
/// Ensures that the main form is visible (either closing the fullscreen mode or reactivating from task icon).
/// </summary>
public void EnsureMainFormVisible() {
//Reset special modes
IsFullscreen = false;
ClickThroughEnabled = false;
Opacity = 1.0;
//Restore main form in a platform-dependent method
Program.Platform.RestoreForm(this);
}
/// <summary>
/// Opens a confirmation dialog to confirm whether to reset the main form or not.
/// </summary>
public void ResetMainFormWithConfirmation() {
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(this).CommonButton == Result.OK) {
ResetMainForm();
}
}
/// <summary>
/// Resets the main form to its initial state.
/// </summary>
public void ResetMainForm() {
//Reset form settings
UnsetThumbnail();
CloseSidePanel();
//Reset location and size (edge of the screen, min size)
Point nuLoc = Screen.PrimaryScreen.WorkingArea.Location;
nuLoc.Offset(40, 40);
Location = nuLoc;
Size = new Size(240, 220);
this.Show();
this.Activate();
}
}
}

View file

@ -1,180 +0,0 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using OnTopReplica.Properties;
using WindowsFormsAero.TaskDialog;
using OnTopReplica.SidePanels;
namespace OnTopReplica {
partial class MainForm {
private void Menu_opening(object sender, CancelEventArgs e) {
//Cancel if currently in "fullscreen" mode or a side panel is open
if (IsFullscreen || IsSidePanelOpen) {
e.Cancel = true;
return;
}
bool showing = _thumbnailPanel.IsShowingThumbnail;
selectRegionToolStripMenuItem.Enabled = showing;
switchToWindowToolStripMenuItem.Enabled = showing;
resizeToolStripMenuItem.Enabled = showing;
chromeToolStripMenuItem.Checked = IsChromeVisible;
clickForwardingToolStripMenuItem.Checked = ClickForwardingEnabled;
chromeToolStripMenuItem.Enabled = showing;
clickThroughToolStripMenuItem.Enabled = showing;
clickForwardingToolStripMenuItem.Enabled = showing;
}
private void Menu_Switch_click(object sender, EventArgs e) {
if (CurrentThumbnailWindowHandle == null)
return;
Program.Platform.HideForm(this);
Native.WindowManagerMethods.SetForegroundWindow(CurrentThumbnailWindowHandle.Handle);
}
private void Menu_Advanced_opening(object sender, EventArgs e) {
restoreLastClonedWindowToolStripMenuItem.Checked = Settings.Default.RestoreLastWindow;
}
private void Menu_GroupSwitchMode_click(object sender, EventArgs e) {
SetSidePanel(new SidePanels.GroupSwitchPanel());
}
private void Menu_RestoreLastWindow_click(object sender, EventArgs e) {
Settings.Default.RestoreLastWindow = !Settings.Default.RestoreLastWindow;
}
private void Menu_ClickForwarding_click(object sender, EventArgs e) {
ClickForwardingEnabled = !ClickForwardingEnabled;
}
private void Menu_ClickThrough_click(object sender, EventArgs e) {
ClickThroughEnabled = true;
}
private void Menu_Opacity_opening(object sender, CancelEventArgs e) {
ToolStripMenuItem[] items = {
toolStripMenuItem1,
toolStripMenuItem2,
toolStripMenuItem3,
toolStripMenuItem4
};
foreach (ToolStripMenuItem i in items) {
if (((double)i.Tag) == this.Opacity)
i.Checked = true;
else
i.Checked = false;
}
}
private void Menu_Opacity_click(object sender, EventArgs e) {
//Get clicked menu item
ToolStripMenuItem tsi = sender as ToolStripMenuItem;
if (tsi != null && this.Visible) {
//Get opacity from the tag
this.Opacity = (double)tsi.Tag;
Program.Platform.OnFormStateChange(this);
}
}
private void Menu_Region_click(object sender, EventArgs e) {
SetSidePanel(new OnTopReplica.SidePanels.RegionPanel());
}
private void Menu_Resize_opening(object sender, CancelEventArgs e) {
if (!_thumbnailPanel.IsShowingThumbnail)
e.Cancel = true;
restorePositionAndSizeToolStripMenuItem.Checked = Settings.Default.RestoreSizeAndPosition;
}
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) {
IsFullscreen = true;
}
private void Menu_Resize_RecallPosition_click(object sender, EventArgs e) {
Settings.Default.RestoreSizeAndPosition = !Settings.Default.RestoreSizeAndPosition;
}
private void Menu_Position_Opening(object sender, EventArgs e) {
disabledToolStripMenuItem.Checked = (PositionLock == null);
topLeftToolStripMenuItem.Checked = (PositionLock == ScreenPosition.TopLeft);
topRightToolStripMenuItem.Checked = (PositionLock == ScreenPosition.TopRight);
centerToolStripMenuItem.Checked = (PositionLock == ScreenPosition.Center);
bottomLeftToolStripMenuItem.Checked = (PositionLock == ScreenPosition.BottomLeft);
bottomRightToolStripMenuItem.Checked = (PositionLock == ScreenPosition.BottomRight);
}
private void Menu_Position_Disable(object sender, EventArgs e) {
PositionLock = null;
}
private void Menu_Position_TopLeft(object sender, EventArgs e) {
PositionLock = ScreenPosition.TopLeft;
}
private void Menu_Position_TopRight(object sender, EventArgs e) {
PositionLock = ScreenPosition.TopRight;
}
private void Menu_Position_Center(object sender, EventArgs e) {
PositionLock = ScreenPosition.Center;
}
private void Menu_Position_BottomLeft(object sender, EventArgs e) {
PositionLock = ScreenPosition.BottomLeft;
}
private void Menu_Position_BottomRight(object sender, EventArgs e) {
PositionLock = ScreenPosition.BottomRight;
}
private void Menu_Reduce_click(object sender, EventArgs e) {
//Hide form in a platform specific way
Program.Platform.HideForm(this);
}
private void Menu_Chrome_click(object sender, EventArgs e) {
IsChromeVisible = !IsChromeVisible;
}
private void Menu_Settings_click(object sender, EventArgs e) {
this.SetSidePanel(new OptionsPanel());
}
private void Menu_About_click(object sender, EventArgs e) {
this.SetSidePanel(new AboutPanel());
}
private void Menu_Close_click(object sender, EventArgs e) {
this.Close();
}
private void Menu_Fullscreen_ExitFullscreen_click(object sender, EventArgs e) {
IsFullscreen = false;
}
}
}

View file

@ -1,168 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using OnTopReplica.Native;
using OnTopReplica.Properties;
namespace OnTopReplica.MessagePumpProcessors {
/// <summary>
/// HotKey registration helper.
/// </summary>
class HotKeyManager : BaseMessagePumpProcessor {
public HotKeyManager() {
Enabled = true;
}
delegate void HotKeyHandler();
/// <summary>
/// Wraps hot key handler registration data.
/// </summary>
private class HotKeyHandlerRegistration : IDisposable {
private HotKeyHandlerRegistration() {
}
private HotKeyHandlerRegistration(IntPtr hwnd, int key, HotKeyHandler handler) {
if (hwnd == IntPtr.Zero)
throw new ArgumentException();
if (handler == null)
throw new ArgumentNullException();
_hwnd = hwnd;
RegistrationKey = key;
Handler = handler;
}
static int _lastUsedKey = 0;
/// <summary>
/// Registers a new hotkey and returns a handle to the registration.
/// </summary>
/// <returns>Returns null on failure.</returns>
public static HotKeyHandlerRegistration Register(Form owner, int keyCode, int modifiers, HotKeyHandler handler) {
var key = ++_lastUsedKey;
if (!HotKeyMethods.RegisterHotKey(owner.Handle, key, modifiers, keyCode)) {
Console.Error.WriteLine("Failed to create hotkey on keys {0}.", keyCode);
return null;
}
return new HotKeyHandlerRegistration(owner.Handle, key, handler);
}
IntPtr _hwnd;
public int RegistrationKey { get; private set; }
public HotKeyHandler Handler { get; private set; }
public void Dispose() {
if (!HotKeyMethods.UnregisterHotKey(_hwnd, RegistrationKey)) {
Console.Error.WriteLine("Failed to unregister hotkey #{0}.", RegistrationKey);
}
}
}
Dictionary<int, HotKeyHandlerRegistration> _handlers = new Dictionary<int, HotKeyHandlerRegistration>();
public override void Initialize(MainForm form) {
base.Initialize(form);
RefreshHotkeys();
}
public override bool Process(ref Message msg) {
if (Enabled && msg.Msg == HotKeyMethods.WM_HOTKEY) {
int keyId = msg.WParam.ToInt32();
if (!_handlers.ContainsKey(keyId))
return false;
_handlers[keyId].Handler.Invoke();
}
return false;
}
public bool Enabled { get; set; }
/// <summary>
/// Refreshes registered hotkeys from Settings.
/// </summary>
/// <remarks>
/// Application settings contain hotkey registration strings that are used
/// automatically by this registration process.
/// </remarks>
public void RefreshHotkeys() {
ClearHandlers();
RegisterHandler(Settings.Default.HotKeyCloneCurrent, HotKeyCloneHandler);
RegisterHandler(Settings.Default.HotKeyShowHide, HotKeyShowHideHandler);
}
private void RegisterHandler(string spec, HotKeyHandler handler) {
if (string.IsNullOrEmpty(spec))
return; //this can happen and is allowed => simply don't register
if (handler == null)
throw new ArgumentNullException();
int modifiers = 0, keyCode = 0;
try {
HotKeyMethods.TranslateStringToKeyValues(spec, out modifiers, out keyCode);
}
catch (ArgumentException) {
//TODO: swallowed exception
return;
}
var reg = HotKeyHandlerRegistration.Register(Form, keyCode, modifiers, handler);
if(reg != null)
_handlers.Add(reg.RegistrationKey, reg);
}
private void ClearHandlers() {
foreach (var hotkey in _handlers) {
hotkey.Value.Dispose();
}
_handlers.Clear();
}
protected override void Shutdown() {
ClearHandlers();
}
#region Hotkey callbacks
/// <summary>
/// Handles "show/hide" hotkey. Ensures the form is in restored state and switches
/// between shown and hidden states.
/// </summary>
void HotKeyShowHideHandler() {
if (Form.IsFullscreen)
Form.IsFullscreen = false;
if (!Program.Platform.IsHidden(Form)) {
Program.Platform.HideForm(Form);
}
else {
Form.EnsureMainFormVisible();
}
}
/// <summary>
/// Handles the "clone current" hotkey.
/// </summary>
void HotKeyCloneHandler() {
var handle = Win32Helper.GetCurrentForegroundWindow();
if (handle.Handle == Form.Handle)
return;
Form.SetThumbnail(handle, null);
}
#endregion
}
}

View file

@ -1,532 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" 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>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>Assets\icon-new.ico</ApplicationIcon>
<IsWebBootstrapper>false</IsWebBootstrapper>
<GenerateManifests>false</GenerateManifests>
<TargetZone>Internet</TargetZone>
<StartupObject>OnTopReplica.Program</StartupObject>
<ExcludedPermissions>
</ExcludedPermissions>
<SignAssembly>false</SignAssembly>
<ManifestCertificateThumbprint>A305A505E19CF40E069521C80C13AB3C900EDB7C</ManifestCertificateThumbprint>
<ManifestKeyFile>OnTopReplica_1_TemporaryKey.pfx</ManifestKeyFile>
<SignManifests>false</SignManifests>
<TargetFrameworkSubset>
</TargetFrameworkSubset>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Background</UpdateMode>
<UpdateInterval>1</UpdateInterval>
<UpdateIntervalUnits>Weeks</UpdateIntervalUnits>
<UpdatePeriodically>true</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<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>0</ApplicationRevision>
<ApplicationVersion>3.4.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>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<ApplicationManifest>OnTopReplica.exe.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsFormsAero">
<HintPath>..\Lib\WindowsFormsAero.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AspectRatioForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CloneClickEventArgs.cs" />
<Compile Include="CloseRequestEventArgs.cs" />
<Compile Include="GeometryExtensions.cs" />
<Compile Include="HotKeyTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ImageComboBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MainForm_Features.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm_Gui.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm_MenuEvents.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm_ChildForms.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MessagePumpManager.cs" />
<Compile Include="MessagePumpProcessors\GroupSwitchManager.cs" />
<Compile Include="IMessagePumpProcessor.cs" />
<Compile Include="MessagePumpProcessors\BaseMessagePumpProcessor.cs" />
<Compile Include="MessagePumpProcessors\ShellInterceptProcessor.cs" />
<Compile Include="MessagePumpProcessors\WindowKeeper.cs" />
<Compile Include="Native\ErrorMethods.cs" />
<Compile Include="Native\FilesystemMethods.cs" />
<Compile Include="Native\HookMethods.cs" />
<Compile Include="Native\HotKeyMethods.cs" />
<Compile Include="Native\HT.cs" />
<Compile Include="Platforms\DebugPlatform.cs" />
<Compile Include="Platforms\WindowsEight.cs" />
<Compile Include="PluginRegionLocator.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="SidePanelContainer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SidePanelContainer.Designer.cs">
<DependentUpon>SidePanelContainer.cs</DependentUpon>
</Compile>
<Compile Include="SidePanels\AboutPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SidePanels\AboutPanel.Designer.cs">
<DependentUpon>AboutPanel.cs</DependentUpon>
</Compile>
<Compile Include="SidePanels\AboutPanelContents.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SidePanels\AboutPanelContents.Designer.cs">
<DependentUpon>AboutPanelContents.cs</DependentUpon>
</Compile>
<Compile Include="SidePanels\OptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SidePanels\OptionsPanel.Designer.cs">
<DependentUpon>OptionsPanel.cs</DependentUpon>
</Compile>
<Compile Include="SidePanels\GroupSwitchPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SidePanels\GroupSwitchPanel.Designer.cs">
<DependentUpon>GroupSwitchPanel.cs</DependentUpon>
</Compile>
<Compile Include="StartupOptions\FourValueTypeConverter.cs" />
<Compile Include="StartupOptions\PaddingConverter.cs" />
<Compile Include="Strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Include="ThumbnailRegion.cs" />
<Compile Include="WindowListMenuManager.cs" />
<Compile Include="WindowSeekers\BaseWindowSeeker.cs" />
<Compile Include="WindowSeekers\ByClassWindowSeeker.cs" />
<Compile Include="WindowSeekers\ByTitleWindowSeeker.cs" />
<Compile Include="WindowSeekers\IWindowSeeker.cs" />
<Compile Include="WindowSeekers\PointBasedWindowSeeker.cs" />
<Compile Include="WindowSeekers\RestoreWindowSeeker.cs" />
<Compile Include="WindowSeekers\TaskWindowSeeker.cs" />
<Compile Include="WindowsFormsExtensions.cs" />
<EmbeddedResource Include="SidePanelContainer.resx">
<DependentUpon>SidePanelContainer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SidePanels\AboutPanel.resx">
<DependentUpon>AboutPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SidePanels\AboutPanelContents.resx">
<DependentUpon>AboutPanelContents.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Strings.pl.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.pl.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.ru.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.ru.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Native\ITaskBarList.cs" />
<Compile Include="Native\InputMethods.cs" />
<Compile Include="Native\MessagingMethods.cs" />
<Compile Include="Native\MK.cs" />
<Compile Include="Native\Point.cs" />
<Compile Include="Native\Rectangle.cs" />
<Compile Include="Native\VirtualKeyState.cs" />
<Compile Include="Native\WindowManagerMethods.cs" />
<Compile Include="Native\WindowMethods.cs" />
<Compile Include="Native\WM.cs" />
<Compile Include="Native\WMSZ.cs" />
<Compile Include="NDesk\Options\Options.cs" />
<Compile Include="NotificationIcon.cs" />
<Compile Include="ScreenPosition.cs" />
<Compile Include="SidePanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="StartupOptions\CliStatus.cs" />
<Compile Include="StartupOptions\CommandLineReportForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="StartupOptions\CommandLineReportForm.Designer.cs">
<DependentUpon>CommandLineReportForm.cs</DependentUpon>
</Compile>
<Compile Include="StartupOptions\RectangleConverter.cs" />
<Compile Include="StartupOptions\Factory.cs" />
<Compile Include="StartupOptions\Options.cs" />
<Compile Include="StartupOptions\ScreenPositionConverter.cs" />
<Compile Include="StartupOptions\SizeConverter.cs" />
<Compile Include="StoredRegionComparer.cs" />
<Compile Include="Native\WindowsSevenMethods.cs" />
<None Include="Native\CommonControls.cs" />
<Compile Include="MessagePumpProcessors\HotKeyManager.cs" />
<Compile Include="PlatformSupport.cs" />
<Compile Include="Platforms\Other.cs" />
<Compile Include="Platforms\WindowsSeven.cs" />
<Compile Include="Platforms\WindowsVista.cs" />
<Compile Include="Platforms\WindowsXp.cs" />
<Compile Include="FocusedTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="NativeToolStripRenderer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="SidePanels\GroupSwitchPanel.resx">
<DependentUpon>GroupSwitchPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SidePanels\OptionsPanel.resx">
<DependentUpon>OptionsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="StartupOptions\CommandLineReportForm.resx">
<DependentUpon>CommandLineReportForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Strings.cs.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.cs.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.da.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.da.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.de.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.de.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.es.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.fi.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.fi.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.it.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.it.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</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="SidePanels\RegionPanel.resx">
<DependentUpon>RegionPanel.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings.no.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.no.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.pt-BR.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.pt-BR.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings.pt.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.pt.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="OnTopReplica.exe.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="SidePanels\RegionPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SidePanels\RegionPanel.Designer.cs">
<DependentUpon>RegionPanel.cs</DependentUpon>
</Compile>
<Compile Include="StoredRegion.cs" />
<Compile Include="StoredRegionArray.cs" />
<Compile Include="ThumbnailPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Update\UpdateCheckCompletedEventArgs.cs" />
<Compile Include="Update\UpdateInformation.cs" />
<Compile Include="Update\UpdateManager.cs" />
<Compile Include="Win32Helper.cs" />
<Compile Include="WindowHandle.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\reduce.png" />
</ItemGroup>
<ItemGroup>
<None Include="LICENSE.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="CREDITS.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Assets\fullscreen.png" />
<None Include="Assets\clickforwarding.png" />
<None Include="Assets\groupmode.png" />
<None Include="Assets\pos_center.png" />
<None Include="Assets\flag_spanish.png" />
<None Include="Assets\flag_poland.png" />
<None Include="Assets\flag_germany.png" />
<Content Include="Assets\xiao_arrow.png" />
<None Include="Assets\xiao_help.png" />
<None Include="Assets\window_opacity_new.png" />
<None Include="Assets\xiao_wrench.png" />
<None Include="Assets\xiao_delete.png" />
<None Include="Assets\xiao_add.png" />
<None Include="Assets\xiao_ok.png" />
<None Include="Assets\flag_danish.png" />
<None Include="Assets\newicon.png" />
<None Include="Assets\regions_new.png" />
<None Include="Assets\desktop.png" />
<None Include="Assets\list.png" />
<Content Include="Assets\icon-new.ico" />
<Content Include="Assets\screenshot-icon.ico" />
<Content Include="Assets\window_multiple16.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 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\flag_usa.png" />
<None Include="Assets\flag_ita.png" />
<None Include="Assets\flag_czech.png" />
<Content Include="Assets\icon.ico" />
<None Include="Assets\regions.png" />
<None Include="Assets\x-oblique.png" />
<None Include="Assets\xiao_up.png" />
<None Include="Assets\xiao_down.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" />
</ItemGroup>
<ItemGroup>
<PublishFile Include="Assets\icon.ico">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
<PublishFile Include="Assets\screenshot-icon.ico">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
<PublishFile Include="Assets\window_multiple16.ico">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
<PublishFile Include="Assets\xiao_arrow.png">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
<PublishFile Include="cs\OnTopReplica.resources">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Satellite</FileType>
</PublishFile>
<PublishFile Include="da\OnTopReplica.resources">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Satellite</FileType>
</PublishFile>
<PublishFile Include="it\OnTopReplica.resources">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Satellite</FileType>
</PublishFile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- 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

@ -1,61 +0,0 @@
using System;
using System.Windows.Forms;
using OnTopReplica.Native;
using WindowsFormsAero.Dwm;
namespace OnTopReplica.Platforms {
class WindowsSeven : WindowsVista {
public override void PreHandleFormInit() {
//Set Application ID
WindowsSevenMethods.SetCurrentProcessExplicitAppUserModelID("LorenzCunoKlopfenstein.OnTopReplica.MainForm");
}
public override void PostHandleFormInit(MainForm form) {
DwmManager.SetWindowFlip3dPolicy(form, Flip3DPolicy.ExcludeAbove);
DwmManager.SetExcludeFromPeek(form, true);
DwmManager.SetDisallowPeek(form, true);
}
public override void HideForm(MainForm form) {
form.Opacity = 0;
}
public override bool IsHidden(MainForm form) {
return (form.Opacity == 0.0);
}
public override void RestoreForm(MainForm form) {
if (form.Opacity == 0.0)
form.Opacity = 1.0;
form.Show();
}
/*public override void OnFormStateChange(MainForm form) {
//SetWindowStyle(form);
}*/
/// <summary>
/// Used to alter the window style. Not used anymore.
/// </summary>
private void SetWindowStyle(MainForm form) {
if (!form.IsFullscreen) {
//This hides the app from ALT+TAB
//Note that when minimized, it will be shown as an (ugly) minimized tool window
//thus we do not minimize, but set to transparent when hiding
long exStyle = WindowMethods.GetWindowLong(form.Handle, WindowMethods.WindowLong.ExStyle).ToInt64();
exStyle |= (long)(WindowMethods.WindowExStyles.ToolWindow);
//exStyle &= ~(long)(WindowMethods.WindowExStyles.AppWindow);
WindowMethods.SetWindowLong(form.Handle, WindowMethods.WindowLong.ExStyle, new IntPtr(exStyle));
//WindowMethods.SetWindowLong(form.Handle, WindowMethods.WindowLong.HwndParent, WindowManagerMethods.GetDesktopWindow());
}
}
}
}

View file

@ -1,239 +0,0 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<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>
<data name="xiao_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_add.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="xiao_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="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\25.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="xiao_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="regions" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\regions_new.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="window_opacity" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\window_opacity_new.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="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="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="clickforwarding" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\clickforwarding.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\newicon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="xiao_help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_help.png;System.Drawing.Bitmap, 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="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="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="flag_czech" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_czech.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="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="desktop" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\desktop.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flag_danish" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_danish.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="xiao_ok" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_ok.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="xiao_wrench" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_wrench.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="list" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\list.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icon_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\icon-new.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="fullscreen" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\fullscreen.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="xiao_arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\xiao_arrow.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="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="groupmode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\groupmode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pos_center" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\pos_center.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flag_spanish" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_spanish.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flag_poland" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_poland.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="flag_germany" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Assets\flag_germany.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -1,57 +0,0 @@
<?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="Opacity" Type="System.Byte" Scope="User">
<Value Profile="(Default)">255</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>
<Setting Name="FullscreenAlwaysOnTop" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="RestoreSizeAndPosition" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="RestoreLastSize" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="RestoreLastPosition" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="RestoreLastWindow" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="RestoreLastWindowClass" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="RestoreLastWindowTitle" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="RestoreLastWindowHwnd" Type="System.Int64" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="HotKeyCloneCurrent" Type="System.String" Scope="User">
<Value Profile="(Default)">[CTRL]+[SHIFT]+C</Value>
</Setting>
<Setting Name="HotKeyShowHide" Type="System.String" Scope="User">
<Value Profile="(Default)">[CTRL]+[SHIFT]+O</Value>
</Setting>
</Settings>
</SettingsFile>

View file

View file

View file

@ -1,46 +0,0 @@
namespace OnTopReplica {
partial class SidePanelContainer {
/// <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.SuspendLayout();
//
// SidePanelContainer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(246, 300);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MinimizeBox = false;
this.Name = "SidePanelContainer";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Side Panel container";
this.TopMost = true;
this.ResumeLayout(false);
}
#endregion
}
}

View file

@ -1,120 +0,0 @@
<?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

@ -1,32 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WindowsFormsAero.Dwm;
namespace OnTopReplica.SidePanels {
partial class AboutPanel : SidePanel {
public AboutPanel() {
InitializeComponent();
//Display version number
labelVersion.Text = string.Format(Strings.AboutVersion, Application.ProductVersion);
}
public override string Title {
get {
return Strings.AboutTitle;
}
}
public override Margins? GlassMargins {
get {
return new Margins(0, 0, 0, labelVersion.Height);
}
}
}
}

View file

@ -1,163 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.IO;
using OnTopReplica.WindowSeekers;
namespace OnTopReplica.StartupOptions {
/// <summary>
/// Represents startup options that can be set via CLI scripting (or other stuff).
/// </summary>
class Options {
public Options() {
Status = CliStatus.Ok;
Opacity = 255;
DisableChrome = false;
MustBeVisible = false;
Fullscreen = false;
}
#region Position and size
public Point? StartLocation { get; set; }
public ScreenPosition? StartPositionLock { get; set; }
public Size? StartSize { get; set; }
#endregion
#region Window cloning
public IntPtr? WindowId { get; set; }
public string WindowTitle { get; set; }
public string WindowClass { get; set; }
public ThumbnailRegion Region { get; set; }
public bool MustBeVisible { get; set; }
#endregion
#region Options
public bool EnableClickForwarding { get; set; }
public byte Opacity { get; set; }
public bool DisableChrome { get; set; }
public bool Fullscreen { get; set; }
#endregion
#region Debug info
StringBuilder _sb = new StringBuilder();
TextWriter _sbWriter;
public CliStatus Status { get; set; }
/// <summary>
/// Gets a debug message writer.
/// </summary>
public TextWriter DebugMessageWriter {
get {
if (_sbWriter == null) {
_sbWriter = new StringWriter(_sb);
}
return _sbWriter;
}
}
/// <summary>
/// Gets the debug message.
/// </summary>
public string DebugMessage {
get {
if(_sbWriter != null)
_sbWriter.Flush();
return _sb.ToString();
}
}
#endregion
#region Application
public void Apply(MainForm form) {
//GUI
form.IsChromeVisible = !DisableChrome;
form.Opacity = (double)Opacity / 255.0;
//Seek handle for thumbnail cloning
WindowHandle handle = null;
if (WindowId.HasValue) {
handle = WindowHandle.FromHandle(WindowId.Value);
}
else if (WindowTitle != null) {
var seeker = new ByTitleWindowSeeker(WindowTitle) {
OwnerHandle = form.Handle,
SkipNotVisibleWindows = MustBeVisible
};
seeker.Refresh();
handle = seeker.Windows.FirstOrDefault();
}
else if (WindowClass != null) {
var seeker = new ByClassWindowSeeker(WindowClass) {
OwnerHandle = form.Handle,
SkipNotVisibleWindows = MustBeVisible
};
seeker.Refresh();
handle = seeker.Windows.FirstOrDefault();
}
//Position lock
if (StartPositionLock.HasValue) {
form.PositionLock = StartPositionLock.Value;
}
//Size and location start values
if (StartLocation.HasValue && StartSize.HasValue) {
form.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
form.Location = StartLocation.Value;
form.ClientSize = StartSize.Value;
}
else if (StartLocation.HasValue) {
form.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultBounds;
form.Location = StartLocation.Value;
}
else if (StartSize.HasValue) {
form.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation;
form.ClientSize = StartSize.Value;
}
//Clone any found handle
if (handle != null) {
form.SetThumbnail(handle, Region);
}
//Other features
if (EnableClickForwarding) {
form.ClickForwardingEnabled = true;
}
//Fullscreen
if (Fullscreen) {
form.IsFullscreen = true;
}
}
#endregion
}
}

View file

@ -1,60 +0,0 @@
<?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="Opacity" serializeAs="String">
<value>255</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>
<setting name="FullscreenAlwaysOnTop" serializeAs="String">
<value>False</value>
</setting>
<setting name="RestoreSizeAndPosition" serializeAs="String">
<value>False</value>
</setting>
<setting name="RestoreLastSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="RestoreLastPosition" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="RestoreLastWindow" serializeAs="String">
<value>False</value>
</setting>
<setting name="RestoreLastWindowClass" serializeAs="String">
<value/>
</setting>
<setting name="RestoreLastWindowTitle" serializeAs="String">
<value/>
</setting>
<setting name="RestoreLastWindowHwnd" serializeAs="String">
<value>0</value>
</setting>
<setting name="HotKeyCloneCurrent" serializeAs="String">
<value>[CTRL]+[SHIFT]+C</value>
</setting>
<setting name="HotKeyShowHide" serializeAs="String">
<value>[CTRL]+[SHIFT]+O</value>
</setting>
</OnTopReplica.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>