diff --git a/Docs/Settings List.txt b/Docs/Settings List.txt new file mode 100644 index 0000000..b54e994 --- /dev/null +++ b/Docs/Settings List.txt @@ -0,0 +1,7 @@ +OPTIONS + ++ Language + Drop down list with icons + Restart notice + ++ Shortcuts \ No newline at end of file diff --git a/OnTopReplica/GeometryExtensions.cs b/OnTopReplica/GeometryExtensions.cs index 0f177a7..d11a61a 100644 --- a/OnTopReplica/GeometryExtensions.cs +++ b/OnTopReplica/GeometryExtensions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text; using System.Drawing; +using System.Windows.Forms; namespace OnTopReplica { @@ -17,6 +18,38 @@ namespace OnTopReplica { return new Point(a.X - b.X, a.Y - b.Y); } + /// + /// Expands a size value by a padding distance. + /// + public static Size Expand(this Size size, Padding padding) { + return new Size(size.Width + padding.Horizontal, size.Height + padding.Vertical); + } + + /// + /// Expands a size value by a size distance. + /// + public static Size Expand(this Size size, Size expandSize) { + return new Size(size.Width + expandSize.Width, size.Height + expandSize.Height); + } + + /// + /// Computes the difference between two size values. + /// + public static Size Difference(this Size a, Size b) { + return new Size(a.Width - b.Width, a.Height - b.Height); + } + + /// + /// Ensures that the minimum size of a control respects a minimum + /// client size area. + /// + /// Control whose MinimumSize should be altered. + /// Minimum client size value to ensure. + public static void EnsureMinimumClientSize(this Control ctrl, Size minimumClientSize) { + Size offset = ctrl.Size.Difference(ctrl.ClientSize); + ctrl.MinimumSize = minimumClientSize.Expand(offset); + } + } } diff --git a/OnTopReplica/MainForm.Designer.cs b/OnTopReplica/MainForm.Designer.cs index bfdefe8..57ac3f3 100644 --- a/OnTopReplica/MainForm.Designer.cs +++ b/OnTopReplica/MainForm.Designer.cs @@ -65,13 +65,7 @@ this.chromeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.reduceToIconToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.menuLanguages = new System.Windows.Forms.ContextMenuStrip(this.components); - this.englishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.cestinaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.danskToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.espanolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.italianoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuContextClose = new System.Windows.Forms.ToolStripMenuItem(); this.fullSelectWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -83,7 +77,6 @@ this.menuWindows.SuspendLayout(); this.menuOpacity.SuspendLayout(); this.menuResize.SuspendLayout(); - this.menuLanguages.SuspendLayout(); this.menuFullscreenContext.SuspendLayout(); this.SuspendLayout(); // @@ -100,11 +93,11 @@ this.chromeToolStripMenuItem, this.reduceToIconToolStripMenuItem, this.toolStripSeparator1, - this.languageToolStripMenuItem, + this.settingsToolStripMenuItem, this.aboutToolStripMenuItem, this.menuContextClose}); this.menuContext.Name = "menuContext"; - this.menuContext.Size = new System.Drawing.Size(169, 296); + this.menuContext.Size = new System.Drawing.Size(187, 296); this.menuContext.Opening += new System.ComponentModel.CancelEventHandler(this.Menu_opening); // // menuContextWindows @@ -112,7 +105,7 @@ this.menuContextWindows.DropDown = this.menuWindows; this.menuContextWindows.Image = global::OnTopReplica.Properties.Resources.list; this.menuContextWindows.Name = "menuContextWindows"; - this.menuContextWindows.Size = new System.Drawing.Size(168, 22); + this.menuContextWindows.Size = new System.Drawing.Size(186, 22); this.menuContextWindows.Text = global::OnTopReplica.Strings.MenuWindows; this.menuContextWindows.ToolTipText = global::OnTopReplica.Strings.MenuWindowsTT; // @@ -135,7 +128,7 @@ // this.switchToWindowToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.xiao_arrow; this.switchToWindowToolStripMenuItem.Name = "switchToWindowToolStripMenuItem"; - this.switchToWindowToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + 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); @@ -145,7 +138,7 @@ this.selectRegionToolStripMenuItem.Enabled = false; this.selectRegionToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.regions; this.selectRegionToolStripMenuItem.Name = "selectRegionToolStripMenuItem"; - this.selectRegionToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + 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); @@ -159,7 +152,7 @@ this.restoreLastClonedWindowToolStripMenuItem}); this.advancedToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.xiao_wrench; this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; - this.advancedToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + 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); // @@ -194,7 +187,8 @@ // this.restoreLastClonedWindowToolStripMenuItem.Name = "restoreLastClonedWindowToolStripMenuItem"; this.restoreLastClonedWindowToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.restoreLastClonedWindowToolStripMenuItem.Text = "Restore last cloned window"; + 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 @@ -202,7 +196,7 @@ 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(168, 22); + this.menuContextOpacity.Size = new System.Drawing.Size(186, 22); this.menuContextOpacity.Text = global::OnTopReplica.Strings.MenuOpacity; // // menuOpacity @@ -270,7 +264,7 @@ this.resizeToolStripMenuItem.DropDown = this.menuResize; this.resizeToolStripMenuItem.Enabled = false; this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem"; - this.resizeToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.resizeToolStripMenuItem.Size = new System.Drawing.Size(186, 22); this.resizeToolStripMenuItem.Text = global::OnTopReplica.Strings.MenuResize; // // menuResize @@ -354,7 +348,7 @@ this.bottomRightToolStripMenuItem}); this.dockToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.pos_null; this.dockToolStripMenuItem.Name = "dockToolStripMenuItem"; - this.dockToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + 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); @@ -411,7 +405,7 @@ // chromeToolStripMenuItem // this.chromeToolStripMenuItem.Name = "chromeToolStripMenuItem"; - this.chromeToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + 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); @@ -420,7 +414,7 @@ // this.reduceToIconToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.reduce; this.reduceToIconToolStripMenuItem.Name = "reduceToIconToolStripMenuItem"; - this.reduceToIconToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + 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); @@ -428,78 +422,21 @@ // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(165, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(183, 6); // - // languageToolStripMenuItem + // settingsToolStripMenuItem // - this.languageToolStripMenuItem.DropDown = this.menuLanguages; - this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.languageToolStripMenuItem.Text = global::OnTopReplica.Strings.Language; - // - // menuLanguages - // - this.menuLanguages.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.englishToolStripMenuItem, - this.cestinaToolStripMenuItem, - this.danskToolStripMenuItem1, - this.espanolToolStripMenuItem, - this.italianoToolStripMenuItem}); - this.menuLanguages.Name = "menuLanguages"; - this.menuLanguages.OwnerItem = this.languageToolStripMenuItem; - this.menuLanguages.Size = new System.Drawing.Size(153, 136); - this.menuLanguages.Text = "Dansk"; - // - // englishToolStripMenuItem - // - this.englishToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.flag_usa; - this.englishToolStripMenuItem.Name = "englishToolStripMenuItem"; - this.englishToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.englishToolStripMenuItem.Tag = "en-US"; - this.englishToolStripMenuItem.Text = "English"; - this.englishToolStripMenuItem.Click += new System.EventHandler(this.Menu_Language_click); - // - // cestinaToolStripMenuItem - // - this.cestinaToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.flag_czech; - this.cestinaToolStripMenuItem.Name = "cestinaToolStripMenuItem"; - this.cestinaToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.cestinaToolStripMenuItem.Tag = "cs-CZ"; - this.cestinaToolStripMenuItem.Text = "Čeština"; - this.cestinaToolStripMenuItem.Click += new System.EventHandler(this.Menu_Language_click); - // - // danskToolStripMenuItem1 - // - this.danskToolStripMenuItem1.Image = global::OnTopReplica.Properties.Resources.flag_danish; - this.danskToolStripMenuItem1.Name = "danskToolStripMenuItem1"; - this.danskToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); - this.danskToolStripMenuItem1.Tag = "da-DK"; - this.danskToolStripMenuItem1.Text = "Dansk"; - this.danskToolStripMenuItem1.Click += new System.EventHandler(this.Menu_Language_click); - // - // espanolToolStripMenuItem - // - this.espanolToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.flag_spanish; - this.espanolToolStripMenuItem.Name = "espanolToolStripMenuItem"; - this.espanolToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.espanolToolStripMenuItem.Tag = "es-ES"; - this.espanolToolStripMenuItem.Text = "Español"; - this.espanolToolStripMenuItem.Click += new System.EventHandler(this.Menu_Language_click); - // - // italianoToolStripMenuItem - // - this.italianoToolStripMenuItem.Image = global::OnTopReplica.Properties.Resources.flag_ita; - this.italianoToolStripMenuItem.Name = "italianoToolStripMenuItem"; - this.italianoToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.italianoToolStripMenuItem.Tag = "it-IT"; - this.italianoToolStripMenuItem.Text = "Italiano"; - this.italianoToolStripMenuItem.Click += new System.EventHandler(this.Menu_Language_click); + 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(168, 22); + 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); @@ -508,7 +445,7 @@ // this.menuContextClose.Image = global::OnTopReplica.Properties.Resources.close_new; this.menuContextClose.Name = "menuContextClose"; - this.menuContextClose.Size = new System.Drawing.Size(168, 22); + 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); // @@ -564,10 +501,11 @@ this.BackColor = System.Drawing.SystemColors.Control; this.ClientSize = new System.Drawing.Size(264, 204); this.ControlBox = false; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(20, 38); + this.MinimumSize = new System.Drawing.Size(40, 40); this.Name = "MainForm"; this.Text = "OnTopReplica"; this.TopMost = true; @@ -575,7 +513,6 @@ this.menuWindows.ResumeLayout(false); this.menuOpacity.ResumeLayout(false); this.menuResize.ResumeLayout(false); - this.menuLanguages.ResumeLayout(false); this.menuFullscreenContext.ResumeLayout(false); this.ResumeLayout(false); @@ -612,14 +549,8 @@ private System.Windows.Forms.ToolStripMenuItem quarterToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem fullscreenToolStripMenuItem1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripMenuItem languageToolStripMenuItem; - private System.Windows.Forms.ContextMenuStrip menuLanguages; - private System.Windows.Forms.ToolStripMenuItem englishToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem italianoToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem cestinaToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem danskToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem chromeToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem danskToolStripMenuItem1; private System.Windows.Forms.ContextMenuStrip menuFullscreenContext; private System.Windows.Forms.ToolStripMenuItem fullSelectWindowToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fullOpacityToolStripMenuItem; @@ -633,8 +564,8 @@ private System.Windows.Forms.ToolStripMenuItem disabledToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripMenuItem restorePositionAndSizeToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem espanolToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem restoreLastClonedWindowToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; } } diff --git a/OnTopReplica/MainForm.cs b/OnTopReplica/MainForm.cs index f536905..75c806e 100644 --- a/OnTopReplica/MainForm.cs +++ b/OnTopReplica/MainForm.cs @@ -17,8 +17,6 @@ namespace OnTopReplica { //GUI elements ThumbnailPanel _thumbnailPanel; - SidePanel _currentSidePanel = null; - Panel _sidePanelContainer; //Managers BaseWindowSeeker _windowSeeker = new TaskWindowSeeker { @@ -37,6 +35,7 @@ namespace OnTopReplica { InitializeComponent(); KeepAspectRatio = false; GlassEnabled = true; + GlassMargins = new Margins(-1); //Store default values _nonClickThroughKey = TransparencyKey; @@ -44,26 +43,14 @@ namespace OnTopReplica { //Thumbnail panel _thumbnailPanel = new ThumbnailPanel { Location = Point.Empty, - Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, - Size = ClientSize + Dock = DockStyle.Fill }; _thumbnailPanel.CloneClick += new EventHandler(Thumbnail_CloneClick); Controls.Add(_thumbnailPanel); - //Side panel - _sidePanelContainer = new Panel { - Location = new Point(ClientSize.Width + 5, 0), - Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom, - Enabled = false, - Visible = false, - Size = new Size(100, ClientSize.Height), - Padding = new Padding(4) - }; - Controls.Add(_sidePanelContainer); - //Set native renderer on context menus Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer( - menuContext, menuWindows, menuOpacity, menuResize, menuLanguages, menuFullscreenContext + menuContext, menuWindows, menuOpacity, menuResize, menuFullscreenContext ); //Init message pump extensions @@ -80,10 +67,8 @@ namespace OnTopReplica { this.KeyPreview = true; } - delegate void GuiAction(); - void UpdateManager_CheckCompleted(object sender, UpdateCheckCompletedEventArgs e) { - this.Invoke(new GuiAction(() => { + this.Invoke(new Action(() => { if (e.Success) { _updateManager.HandleUpdateCheck(this, e.Information, false); } @@ -139,14 +124,10 @@ namespace OnTopReplica { base.OnClosing(e); } - Margins fullMargins = new Margins(-1); + protected override void OnMove(EventArgs e) { + base.OnMove(e); - protected override void OnResize(EventArgs e) { - base.OnResize(e); - - this.GlassMargins = (_currentSidePanel != null) ? - new Margins(ClientSize.Width - _sidePanelContainer.Width, 0, 0, 0) : - fullMargins; + AdjustSidePanelLocation(); } protected override void OnResizeEnd(EventArgs e) { @@ -247,8 +228,6 @@ namespace OnTopReplica { #endregion - const string Title = "OnTopReplica"; - #region Keyboard event handling protected override void OnKeyUp(KeyEventArgs e) { @@ -328,7 +307,6 @@ namespace OnTopReplica { bool _isFullscreen = false; Point _preFullscreenLocation; Size _preFullscreenSize; - FormBorderStyle _preFullscreenBorderStyle; public bool IsFullscreen { get { @@ -346,7 +324,6 @@ namespace OnTopReplica { if (value) { _preFullscreenLocation = Location; _preFullscreenSize = ClientSize; - _preFullscreenBorderStyle = FormBorderStyle; FormBorderStyle = FormBorderStyle.None; var currentScreen = Screen.FromControl(this); @@ -354,7 +331,7 @@ namespace OnTopReplica { Location = currentScreen.WorkingArea.Location; } else { - FormBorderStyle = _preFullscreenBorderStyle; + FormBorderStyle = DefaultBorderStyle; Location = _preFullscreenLocation; ClientSize = _preFullscreenSize; RefreshAspectRatio(); diff --git a/OnTopReplica/MainForm.resx b/OnTopReplica/MainForm.resx index e1539d6..c9dc6f3 100644 --- a/OnTopReplica/MainForm.resx +++ b/OnTopReplica/MainForm.resx @@ -129,9 +129,6 @@ 578, 17 - - 695, 17 - 399, 17 diff --git a/OnTopReplica/MainForm_ChildForms.cs b/OnTopReplica/MainForm_ChildForms.cs index fb35b8b..24e9c90 100644 --- a/OnTopReplica/MainForm_ChildForms.cs +++ b/OnTopReplica/MainForm_ChildForms.cs @@ -8,98 +8,68 @@ namespace OnTopReplica { partial class MainForm { - EventHandler RequestClosingHandler; - - const int SidePanelMargin = 1; + //SidePanel _currentSidePanel = null; + SidePanelContainer _sidePanelContainer = null; /// /// Opens a new side panel. /// /// The side panel to embed. public void SetSidePanel(SidePanel panel) { - if (_currentSidePanel != null) { + if (IsSidePanelOpen) { CloseSidePanel(); } - _currentSidePanel = panel; - _currentSidePanel.OnFirstShown(this); - - //Add and show - _sidePanelContainer.Controls.Add(panel); - _sidePanelContainer.Enabled = true; - _sidePanelContainer.Show(); - panel.Show(); - - int intHorzMargin = panel.Margin.Horizontal + _sidePanelContainer.Padding.Horizontal; //internal margins for sidepanel - int intVertMargin = panel.Margin.Vertical + _sidePanelContainer.Padding.Vertical; - - //Resize container - _sidePanelContainer.ClientSize = new Size( - panel.MinimumSize.Width + intHorzMargin, - ClientSize.Height - ); - - int rightHorzMargin = _sidePanelContainer.Width + SidePanelMargin; //horz margin between the two controls - - //Resize rest - MinimumSize = new Size( - 20 + panel.MinimumSize.Width + SidePanelMargin + intHorzMargin, - panel.MinimumSize.Height + intVertMargin - ); - ClientSize = new Size( - ClientSize.Width + rightHorzMargin, - ClientSize.Height - ); - ExtraPadding = new Padding(0, 0, rightHorzMargin, 0); - _thumbnailPanel.Size = new Size( - ClientSize.Width - rightHorzMargin, - ClientSize.Height - ); - _sidePanelContainer.Location = new Point( - ClientSize.Width - rightHorzMargin, - 0 - ); - - //Move window if needed - FixPositionAndSize(); - - //Hook event listener - if (RequestClosingHandler == null) - RequestClosingHandler = new EventHandler(SidePanel_RequestClosing); - panel.RequestClosing += RequestClosingHandler; + _sidePanelContainer = new SidePanelContainer(this); + _sidePanelContainer.SetSidePanel(panel); + _sidePanelContainer.Show(this); + AdjustSidePanelLocation(); } /// /// Closes the current side panel. /// public void CloseSidePanel() { - if (_currentSidePanel == null) + if (_sidePanelContainer == null || _sidePanelContainer.IsDisposed) { + _sidePanelContainer = null; + return; + } + + _sidePanelContainer.Hide(); + _sidePanelContainer.FreeSidePanel(); + } + + /// + /// Gets whether a side panel is currently shown. + /// + public bool IsSidePanelOpen { + get { + if (_sidePanelContainer == null) + return false; + if (_sidePanelContainer.IsDisposed) { + _sidePanelContainer = null; + return false; + } + + return _sidePanelContainer.Visible; + } + } + + /// + /// Moves the side panel based on the main form's current location. + /// + protected void AdjustSidePanelLocation() { + if (!IsSidePanelOpen) return; - //Unhook listener to make panel freeable - _currentSidePanel.RequestClosing -= RequestClosingHandler; - - //Remove side panel and container - _currentSidePanel.OnClosing(this); - _currentSidePanel.Hide(); - _sidePanelContainer.Controls.Clear(); - _sidePanelContainer.Visible = _sidePanelContainer.Enabled = false; - - //Free panel - _currentSidePanel.Dispose(); - _currentSidePanel = null; - - //Resize - MinimumSize = new Size(20, 20); - ClientSize = new Size( - ClientSize.Width - _sidePanelContainer.Width - SidePanelMargin, - ClientSize.Height - ); - ExtraPadding = new Padding(0); - _thumbnailPanel.Size = ClientSize; - - //Put focus back to main form - this.Focus(); + //Check if moving the panel on the form's right would put it off-screen + var screen = Screen.FromControl(this); + if (Location.X + Width + _sidePanelContainer.Width > screen.WorkingArea.Right) { + _sidePanelContainer.Location = new Point(Location.X - _sidePanelContainer.Width, Location.Y); + } + else { + _sidePanelContainer.Location = new Point(Location.X + Width, Location.Y); + } } void SidePanel_RequestClosing(object sender, EventArgs e) { diff --git a/OnTopReplica/MainForm_MenuEvents.cs b/OnTopReplica/MainForm_MenuEvents.cs index 02d1e82..aa62f50 100644 --- a/OnTopReplica/MainForm_MenuEvents.cs +++ b/OnTopReplica/MainForm_MenuEvents.cs @@ -10,7 +10,7 @@ namespace OnTopReplica { private void Menu_opening(object sender, CancelEventArgs e) { //Cancel if currently in "fullscreen" mode or a side panel is open - if (IsFullscreen || _currentSidePanel != null) { + if (IsFullscreen || IsSidePanelOpen) { e.Cancel = true; return; } @@ -189,6 +189,7 @@ namespace OnTopReplica { } private void Menu_Language_click(object sender, EventArgs e) { + //TODO: strip this stuff ToolStripItem tsi = (ToolStripItem)sender; string langCode = tsi.Tag as string; @@ -202,6 +203,10 @@ namespace OnTopReplica { MessageBox.Show("Error");*/ } + private void Menu_Settings_click(object sender, EventArgs e) { + this.SetSidePanel(new OnTopReplica.SidePanels.OptionsPanel()); + } + private void Menu_About_click(object sender, EventArgs e) { this.Hide(); diff --git a/OnTopReplica/OnTopReplica.csproj b/OnTopReplica/OnTopReplica.csproj index 99f1cad..b5fa411 100644 --- a/OnTopReplica/OnTopReplica.csproj +++ b/OnTopReplica/OnTopReplica.csproj @@ -139,6 +139,12 @@ + + Form + + + SidePanelContainer.cs + UserControl @@ -161,6 +167,9 @@ + + SidePanelContainer.cs + diff --git a/OnTopReplica/SidePanel.cs b/OnTopReplica/SidePanel.cs index bb965ad..01f14d0 100644 --- a/OnTopReplica/SidePanel.cs +++ b/OnTopReplica/SidePanel.cs @@ -49,5 +49,14 @@ namespace OnTopReplica { public virtual void OnClosing(MainForm form) { } + /// + /// Gets the side panel's title. + /// + public virtual string Title { + get { + return "Side panel"; + } + } + } } diff --git a/OnTopReplica/SidePanelContainer.Designer.cs b/OnTopReplica/SidePanelContainer.Designer.cs new file mode 100644 index 0000000..5823542 --- /dev/null +++ b/OnTopReplica/SidePanelContainer.Designer.cs @@ -0,0 +1,46 @@ +namespace OnTopReplica { + partial class SidePanelContainer { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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.Padding = new System.Windows.Forms.Padding(6); + this.ShowInTaskbar = false; + this.Text = "Side Panel container"; + this.TopMost = true; + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/OnTopReplica/SidePanelContainer.cs b/OnTopReplica/SidePanelContainer.cs new file mode 100644 index 0000000..560e035 --- /dev/null +++ b/OnTopReplica/SidePanelContainer.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace OnTopReplica { + /// + /// Acts as a form that can contain a SidePanel instance. + /// + partial class SidePanelContainer : Form { + + EventHandler RequestClosingHandler; + + MainForm _parent; + + public SidePanelContainer(MainForm mainForm) { + InitializeComponent(); + + _parent = mainForm; + RequestClosingHandler = new EventHandler(Panel_RequestClosing); + } + + void Panel_RequestClosing(object sender, EventArgs e) { + FreeSidePanel(); + this.Close(); + } + + protected override void OnClosing(CancelEventArgs e) { + base.OnClosing(e); + + //Ensure side panel closing code is run + FreeSidePanel(); + } + + /// + /// Sets a new side panel and refreshes the window. The panel is + /// managed by the SidePanelContainer from now on. + /// + /// SidePanel to embed and to manage. + public void SetSidePanel(SidePanel panel) { + panel.OnFirstShown(_parent); + + //Set panel + this.SuspendLayout(); + + this.Text = panel.Title; + + CurrentSidePanel = panel; + panel.RequestClosing += RequestClosingHandler; + this.Controls.Add(panel); + + var minSize = panel.MinimumSize.Expand(this.Padding); + this.ClientSize = minSize; + this.EnsureMinimumClientSize(minSize); + + this.ResumeLayout(); + } + + /// + /// Removes the current side panel and disposes it. + /// + public void FreeSidePanel() { + if (CurrentSidePanel == null) + return; + + this.SuspendLayout(); + + FreeSidePanelCore(); + + this.ResumeLayout(); + } + + /// + /// Removes the current side panel and disposes it (doesn't suspend layout). + /// + private void FreeSidePanelCore() { + CurrentSidePanel.OnClosing(_parent); + + //Free hook + CurrentSidePanel.RequestClosing -= RequestClosingHandler; + + //Remove + this.Controls.Remove(CurrentSidePanel); + + //Free + CurrentSidePanel.Dispose(); + CurrentSidePanel = null; + } + + public SidePanel CurrentSidePanel { + get; + private set; + } + } +} diff --git a/OnTopReplica/SidePanelContainer.resx b/OnTopReplica/SidePanelContainer.resx new file mode 100644 index 0000000..5ea0895 --- /dev/null +++ b/OnTopReplica/SidePanelContainer.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/OnTopReplica/SidePanels/GroupSwitchPanel.cs b/OnTopReplica/SidePanels/GroupSwitchPanel.cs index 8617981..0bb5263 100644 --- a/OnTopReplica/SidePanels/GroupSwitchPanel.cs +++ b/OnTopReplica/SidePanels/GroupSwitchPanel.cs @@ -10,6 +10,12 @@ namespace OnTopReplica.SidePanels { InitializeComponent(); } + public override string Title { + get { + return Strings.MenuGroupSwitch; + } + } + public override void OnFirstShown(MainForm form) { base.OnFirstShown(form); diff --git a/OnTopReplica/SidePanels/OptionsPanel.Designer.cs b/OnTopReplica/SidePanels/OptionsPanel.Designer.cs new file mode 100644 index 0000000..72f651a --- /dev/null +++ b/OnTopReplica/SidePanels/OptionsPanel.Designer.cs @@ -0,0 +1,120 @@ +namespace OnTopReplica.SidePanels { + partial class OptionsPanel { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.btnClose = new System.Windows.Forms.Button(); + this.panelMain = new System.Windows.Forms.Panel(); + this.groupLanguage = new System.Windows.Forms.GroupBox(); + this.lblLanguage = new System.Windows.Forms.Label(); + this.comboLanguage = new System.Windows.Forms.ComboBox(); + this.panelMain.SuspendLayout(); + this.groupLanguage.SuspendLayout(); + this.SuspendLayout(); + // + // btnClose + // + this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnClose.Location = new System.Drawing.Point(185, 217); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(75, 23); + this.btnClose.TabIndex = 0; + this.btnClose.Text = "Close"; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.Close_click); + // + // panelMain + // + this.panelMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panelMain.AutoScroll = true; + this.panelMain.Controls.Add(this.groupLanguage); + this.panelMain.Location = new System.Drawing.Point(0, 0); + this.panelMain.Name = "panelMain"; + this.panelMain.Size = new System.Drawing.Size(260, 211); + this.panelMain.TabIndex = 1; + // + // groupLanguage + // + this.groupLanguage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupLanguage.Controls.Add(this.lblLanguage); + this.groupLanguage.Controls.Add(this.comboLanguage); + this.groupLanguage.Location = new System.Drawing.Point(3, 3); + this.groupLanguage.Name = "groupLanguage"; + this.groupLanguage.Size = new System.Drawing.Size(254, 68); + this.groupLanguage.TabIndex = 0; + this.groupLanguage.TabStop = false; + this.groupLanguage.Text = "Language:"; + // + // lblLanguage + // + this.lblLanguage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblLanguage.Location = new System.Drawing.Point(6, 43); + this.lblLanguage.Name = "lblLanguage"; + this.lblLanguage.Size = new System.Drawing.Size(242, 23); + this.lblLanguage.TabIndex = 1; + this.lblLanguage.Text = "Requires a restart."; + // + // comboLanguage + // + this.comboLanguage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboLanguage.FormattingEnabled = true; + this.comboLanguage.Items.AddRange(new object[] { + "English", + "Dansk", + "Italiano"}); + this.comboLanguage.Location = new System.Drawing.Point(6, 19); + this.comboLanguage.Name = "comboLanguage"; + this.comboLanguage.Size = new System.Drawing.Size(242, 21); + this.comboLanguage.TabIndex = 0; + // + // OptionsPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScroll = true; + this.Controls.Add(this.panelMain); + this.Controls.Add(this.btnClose); + this.MinimumSize = new System.Drawing.Size(260, 240); + this.Name = "OptionsPanel"; + this.Size = new System.Drawing.Size(260, 240); + this.panelMain.ResumeLayout(false); + this.groupLanguage.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Panel panelMain; + private System.Windows.Forms.GroupBox groupLanguage; + private System.Windows.Forms.ComboBox comboLanguage; + private System.Windows.Forms.Label lblLanguage; + } +} diff --git a/OnTopReplica/SidePanels/OptionsPanel.cs b/OnTopReplica/SidePanels/OptionsPanel.cs new file mode 100644 index 0000000..226cfd0 --- /dev/null +++ b/OnTopReplica/SidePanels/OptionsPanel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace OnTopReplica.SidePanels { + partial class OptionsPanel : SidePanel { + public OptionsPanel() { + InitializeComponent(); + } + + private void Close_click(object sender, EventArgs e) { + OnRequestClosing(); + } + + public override string Title { + get { + return Strings.MenuSettings; + } + } + } +} diff --git a/OnTopReplica/SidePanels/OptionsPanel.resx b/OnTopReplica/SidePanels/OptionsPanel.resx new file mode 100644 index 0000000..5ea0895 --- /dev/null +++ b/OnTopReplica/SidePanels/OptionsPanel.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/OnTopReplica/SidePanels/RegionPanel.cs b/OnTopReplica/SidePanels/RegionPanel.cs index f281926..ca35f13 100644 --- a/OnTopReplica/SidePanels/RegionPanel.cs +++ b/OnTopReplica/SidePanels/RegionPanel.cs @@ -19,6 +19,12 @@ namespace OnTopReplica.SidePanels { _regionDrawnHandler = new ThumbnailPanel.RegionDrawnHandler(ThumbnailPanel_RegionDrawn); } + public override string Title { + get { + return Strings.MenuRegion; + } + } + ThumbnailPanel.RegionDrawnHandler _regionDrawnHandler; public override void OnFirstShown(MainForm form) { diff --git a/OnTopReplica/Strings.Designer.cs b/OnTopReplica/Strings.Designer.cs index 7dcb12b..556e7f7 100644 --- a/OnTopReplica/Strings.Designer.cs +++ b/OnTopReplica/Strings.Designer.cs @@ -1168,6 +1168,42 @@ namespace OnTopReplica { } } + /// + /// Looks up a localized string similar to Restore last cloned window. + /// + internal static string MenuRestoreLast { + get { + return ResourceManager.GetString("MenuRestoreLast", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When enabled, OnTopReplica will attempt to restore the last cloned window on start up.. + /// + internal static string MenuRestoreLastTT { + get { + return ResourceManager.GetString("MenuRestoreLastTT", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings.... + /// + internal static string MenuSettings { + get { + return ResourceManager.GetString("MenuSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Displays the settings panel.. + /// + internal static string MenuSettingsTT { + get { + return ResourceManager.GetString("MenuSettingsTT", resourceCulture); + } + } + /// /// Looks up a localized string similar to Switch to window. /// diff --git a/OnTopReplica/Strings.resx b/OnTopReplica/Strings.resx index a25d656..27f0cea 100644 --- a/OnTopReplica/Strings.resx +++ b/OnTopReplica/Strings.resx @@ -1,30 +1,135 @@ - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Abort update process. - - - Show details about OnTopReplica. - - - Reset all OnTopReplica settings. - - - Update OnTopReplica now. - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Abort update process. + + + Show details about OnTopReplica. + + + Reset all OnTopReplica settings. + + + Update OnTopReplica now. + + <html> <head> <style type="text/css"> @@ -75,419 +180,431 @@ a:hover { <p>Some icons from <a href="http://www.vistaico.com">VistaICO.com</a> and the Xiao icon set.</p> </body> -</html> - - - OnTopReplica - - - Reset window completely? - - +</html> + + + OnTopReplica + + + Reset window completely? + + &Reset -All settings will be lost. - - - Can be used to reset all settings if you lost control over the window or moved it beyond the screen boundary. - - - Reset - - - Reset settings? - - - This will erase all settings of OnTopReplica, returning it to the original state right after installation (all saved information, like stored regions, will be lost). - - - Reset settings - - - Download OnTopReplica {0}? - {0} update version - - +All settings will be lost. + + + Can be used to reset all settings if you lost control over the window or moved it beyond the screen boundary. + + + Reset + + + Reset settings? + + + This will erase all settings of OnTopReplica, returning it to the original state right after installation (all saved information, like stored regions, will be lost). + + + Reset settings + + + Download OnTopReplica {0}? + {0} update version + + Cancel update -OnTopReplica will prompt you the next time it is started. - - +OnTopReplica will prompt you the next time it is started. + + Download -Install OnTopReplica {0}. - {0} update version - - - The new version can be downloaded and installed from the official website. - - +Install OnTopReplica {0}. + {0} update version + + + The new version can be downloaded and installed from the official website. + + Installed version: {0} -Available version: {1} +Available version: {1} {0} installed version number -{1} online available version number - - - Update available - - - &Cancel - - - Created by: Lorenz Cuno Klopfenstein. - - - Draw regions using mouse. - - - Details - - - Details on Windows Aero - - - Windows Aero is only available on Windows Vista Home Premium or higher. - - - Desktop Composition' is not enabled. - - +{1} online available version number + + + Update available + + + &Cancel + + + Created by: Lorenz Cuno Klopfenstein. + + + Draw regions using mouse. + + + Details + + + Details on Windows Aero + + + Windows Aero is only available on Windows Vista Home Premium or higher. + + + Desktop Composition' is not enabled. + + You must enable desktop composition, by selecting 'Windows Aero' as the theme used by Windows. -To do so, right-click on the desktop and click on Personalize. - - - Error details - - - Error: - - - It appears that the selected window has been closed or is not valid anymore. - - - Error - - +To do so, right-click on the desktop and click on Personalize. + + + Error details + + + Error: + + + It appears that the selected window has been closed or is not valid anymore. + + + Error + + Desktop Composition' is not supported on your Operating System. -You must run this application on Windows Vista Home Premium or better. - - - Desktop Composition unsupported - - - No thumbnail loaded. - - - Unable to create thumbnail - - - Unable to fit window. - - - Unable to check for updates. - - - It appears that OnTopReplica wasn't installed using 'ClickOnce'. You'll have to update manually (visit <a href="http://ontopreplica.codeplex.com">OnTopReplica's homepage</a>). - - - OnTopReplica was unable to check whether an updated version is available. Make sure you are connected to the Internet. If you are, the website may be temporarily down. - - - Mode - - - Always on top - - - Forces OnTopReplica to stay always on top. - - - Click through - - - OnTopReplica will behave like a transparent overlay that lets your clicks through to the windows below. - - - Standard - - - Behaves like an ordinary window. You can bring other windows above OnTopReplica. - - - OnTopReplica fullscreen - - - Disable - - - Enable Group mode - - - Select multiple windows to enable. - - - Group switch mode is enabled. - - - Group switch mode: - - - Windows - Column Header of list, simply refers to available windows to be cloned - - - Homepage: www.codeplex.com/ontopreplica. - - - Do you want to enable "click forwarding"? - - +You must run this application on Windows Vista Home Premium or better. + + + Desktop Composition unsupported + + + No thumbnail loaded. + + + Unable to create thumbnail + + + Unable to fit window. + + + Unable to check for updates. + + + It appears that OnTopReplica wasn't installed using 'ClickOnce'. You'll have to update manually (visit <a href="http://ontopreplica.codeplex.com">OnTopReplica's homepage</a>). + + + OnTopReplica was unable to check whether an updated version is available. Make sure you are connected to the Internet. If you are, the website may be temporarily down. + + + Mode + + + Always on top + + + Forces OnTopReplica to stay always on top. + + + Click through + + + OnTopReplica will behave like a transparent overlay that lets your clicks through to the windows below. + + + Standard + + + Behaves like an ordinary window. You can bring other windows above OnTopReplica. + + + OnTopReplica fullscreen + + + Disable + + + Enable Group mode + + + Select multiple windows to enable. + + + Group switch mode is enabled. + + + Group switch mode: + + + Windows + Column Header of list, simply refers to available windows to be cloned + + + Homepage: www.codeplex.com/ontopreplica. + + + Do you want to enable "click forwarding"? + + If this mode is enabled, OnTopReplica will forward all left mouse clicks to the window that is being cloned (this will allow you to do basic mouse operations on the cloned window without having to activate it). -To exit this mode, push ESC. - - - Click forwarding - - - Enable Click-Through mode? - - - Click-through only works if it has been enabled in the Resize submenu and if the window is semi-transparent. - - +To exit this mode, push ESC. + + + Click forwarding + + + Enable Click-Through mode? + + + Click-through only works if it has been enabled in the Resize submenu and if the window is semi-transparent. + + In this mode the fullscreen window will behave as a partially transparent overlay, allowing you to click on the other windows behind it. -To return to normal mode anytime, activate OnTopReplica by clicking on the task bar (or the tray icon). - - +To return to normal mode anytime, activate OnTopReplica by clicking on the task bar (or the tray icon). + + No, thank you. -You can enable click-through later - - - Use Click-Through - - - Click-Through mode - - - OnTopReplica has been updated. - - - In order to use the updated version of OnTopReplica you'll have to restart the application. - - - Update successful - - - OnTopReplica is up to date. - - - No update available - - - Language - - - About... - - - Hides the main window and displays the "about" box. - - - Advanced - - - Show window border - - - Toggles the display of the window border. - - - Enable Click forwarding - - - Enable "click forwarding" to the cloned window. - - - Enable Click-Through - - - OnTopReplica will behave like a transparent overlay that lets your clicks through to the windows below. - - - Close - - - Closes OnTopReplica. - - - 2:1 Double - - - Fullscreen - - - 1:2 Half - - - 1:1 Fit to window - - - 1:4 Quarter - - - Glass - - - Toggles "glass mode" on and off. - - - Group Switch mode - - - OnTopReplica will automatically clone a window from an user defined group, switching to the one least recently activated to the foreground. - - - 100% (opaque) - - - Sets OnTopReplica to be completely opaque. - - - 25% - - - Sets OnTopReplica to 25% opacity. - - - 50% - - - Sets OnTopReplica to 50% opacity. - - - 75% - - - Sets OnTopReplica to 75% opacity. - - - Opacity - - - Open - - - Displays OnTopReplica. - - - Bottom Left - - - Bottom Right - - - Center - - - Disabled - - - Position lock - - - Automatically position OnTopReplica on the current screen. - - - Top Left - - - Top Right - - - Quit fullscreen mode - - - Recall last position and size - - - Toggles whether OnTopReplica should store its last position and size and use them when it is restarted. - - - Minimize - - - Minimizes OnTopReplica to the task bar (or the tray). - - - Select region... - - - Switches to "region mode", that allows you to select a limited region of the source's window as thumbnail. - - - Reset window - - - Resets OnTopReplica settings and its main window. - - - Resize - - - Switch to window - - - Switches to the source window and hides OnTopReplica. - - - Select window - - - - none - - - - Displays a list of window you can select as thumbnail source. - - - - whole - - - - Current region: - - - Delete - - - Done - - - Height - - - Reset - - - Save - - - Stored regions - - - Regions: - - - Width - - - Right-click here to start... - - - A lightweight, real-time, always on top thumbnail of a window of your choice. - - - OnTopReplica automatically checks for updates. No information is logged at any point. - - - Update now! - +You can enable click-through later + + + Use Click-Through + + + Click-Through mode + + + OnTopReplica has been updated. + + + In order to use the updated version of OnTopReplica you'll have to restart the application. + + + Update successful + + + OnTopReplica is up to date. + + + No update available + + + Language + + + About... + + + Hides the main window and displays the "about" box. + + + Advanced + + + Show window border + + + Toggles the display of the window border. + + + Enable Click forwarding + + + Enable "click forwarding" to the cloned window. + + + Enable Click-Through + + + OnTopReplica will behave like a transparent overlay that lets your clicks through to the windows below. + + + Close + + + Closes OnTopReplica. + + + 2:1 Double + + + Fullscreen + + + 1:2 Half + + + 1:1 Fit to window + + + 1:4 Quarter + + + Glass + + + Toggles "glass mode" on and off. + + + Group Switch mode + + + OnTopReplica will automatically clone a window from an user defined group, switching to the one least recently activated to the foreground. + + + 100% (opaque) + + + Sets OnTopReplica to be completely opaque. + + + 25% + + + Sets OnTopReplica to 25% opacity. + + + 50% + + + Sets OnTopReplica to 50% opacity. + + + 75% + + + Sets OnTopReplica to 75% opacity. + + + Opacity + + + Open + + + Displays OnTopReplica. + + + Bottom Left + + + Bottom Right + + + Center + + + Disabled + + + Position lock + + + Automatically position OnTopReplica on the current screen. + + + Top Left + + + Top Right + + + Quit fullscreen mode + + + Recall last position and size + + + Toggles whether OnTopReplica should store its last position and size and use them when it is restarted. + + + Minimize + + + Minimizes OnTopReplica to the task bar (or the tray). + + + Select region... + + + Switches to "region mode", that allows you to select a limited region of the source's window as thumbnail. + + + Reset window + + + Resets OnTopReplica settings and its main window. + + + Resize + + + Switch to window + + + Switches to the source window and hides OnTopReplica. + + + Select window + + + - none - + + + Displays a list of window you can select as thumbnail source. + + + - whole - + + + Current region: + + + Delete + + + Done + + + Height + + + Reset + + + Save + + + Stored regions + + + Regions: + + + Width + + + Right-click here to start... + + + A lightweight, real-time, always on top thumbnail of a window of your choice. + + + OnTopReplica automatically checks for updates. No information is logged at any point. + + + Update now! + + + Settings... + + + Displays the settings panel. + + + Restore last cloned window + + + When enabled, OnTopReplica will attempt to restore the last cloned window on start up. + \ No newline at end of file