diff --git a/.hgignore b/.hgignore index 1d2d424..104a7be 100644 --- a/.hgignore +++ b/.hgignore @@ -4,3 +4,4 @@ glob:obj/* glob:publish/* glob:OnTopReplica/Assets/Thumbs.db glob:*.psd +glob:Installer/OnTopReplica-Setup.exe diff --git a/Installer/header.bmp b/Installer/header.bmp new file mode 100644 index 0000000..7326b9c Binary files /dev/null and b/Installer/header.bmp differ diff --git a/Installer/script.nsi b/Installer/script.nsi new file mode 100644 index 0000000..dce754e --- /dev/null +++ b/Installer/script.nsi @@ -0,0 +1,105 @@ +# INCLUDES +!include MUI2.nsh ;Modern interface +!include LogicLib.nsh ;nsDialogs + +# INIT +Name "OnTopReplica" +InstallDir "$LOCALAPPDATA\OnTopReplica" +OutFile "OnTopReplica-Setup.exe" +RequestExecutionLevel user + +# REFS +!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\OnTopReplica" +!define START_LINK_DIR "$STARTMENU\Programs\OnTopReplica" +!define START_LINK_RUN "$STARTMENU\Programs\OnTopReplica\OnTopReplica.lnk" +!define START_LINK_UNINSTALLER "$STARTMENU\Programs\OnTopReplica\Uninstall OnTopReplica.lnk" +!define UNINSTALLER_NAME "OnTopReplica-Uninstall.exe" + +# GRAPHICS +!define MUI_ICON "..\OnTopReplica\Assets\icon-new.ico" +!define MUI_UNICON "..\OnTopReplica\Assets\icon-new-red.ico" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT +!define MUI_HEADERIMAGE_BITMAP "header.bmp" +!define MUI_HEADERIMAGE_UNBITMAP "header.bmp" +#!define MUI_WELCOMEFINISHPAGE_BITMAP "banner.bmp" +#!define MUI_UNWELCOMEFINISHPAGE_BITMAP "banner.bmp" + +# TEXT AND SETTINGS +!define MUI_PAGE_HEADER_TEXT "OnTopReplica" + +!define MUI_FINISHPAGE_RUN "$INSTDIR\OnTopReplica.exe" +;!define MUI_FINISHPAGE_RUN_TEXT "Run OnTopReplica now." + +;Do not skip to finish automatially +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_UNFINISHPAGE_NOAUTOCLOSE + +# PAGE DEFINITIONS +!insertmacro MUI_PAGE_WELCOME +;!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +# LANGUAGES +!insertmacro MUI_LANGUAGE "English" + +# CALLBACKS +Function RegisterApplication + ;Register uninstaller into Add/Remove panel (for local user only) + WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayName" "OnTopReplica" + WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayIcon" "$INSTDIR\${UNINSTALLER_NAME}" + WriteRegStr HKCU "${REG_UNINSTALL}" "Publisher" "Lorenz Cuno Klopfenstein" + WriteRegStr HKCU "${REG_UNINSTALL}" "InstallSource" "$EXEDIR\" + WriteRegDWord HKCU "${REG_UNINSTALL}" "NoModify" 1 + WriteRegDWord HKCU "${REG_UNINSTALL}" "NoRepair" 1 + WriteRegStr HKCU "${REG_UNINSTALL}" "UninstallString" "$INSTDIR\${UNINSTALLER_NAME}" + + ;Links + SetShellVarContext current + CreateDirectory "${START_LINK_DIR}" + CreateShortCut "${START_LINK_RUN}" "$INSTDIR\OnTopReplica.exe" + CreateShortCut "${START_LINK_UNINSTALLER}" "$INSTDIR\${UNINSTALLER_NAME}" +FunctionEnd + +Function un.DeregisterApplication + ;Deregister uninstaller from Add/Remove panel + DeleteRegKey HKCU "${REG_UNINSTALL}" + + ;Start menu links + SetShellVarContext current + RMDir /r "${START_LINK_DIR}" +FunctionEnd + +# INSTALL SECTIONS +Section "!OnTopReplica" OnTopReplica + SectionIn RO + + SetOutPath $INSTDIR + SetOverwrite on + File "..\OnTopReplica\bin\Release\OnTopReplica.exe" + File "..\OnTopReplica\bin\Release\VistaControls.dll" + + ;Install localization files + SetOutPath "$INSTDIR\it" + File "..\OnTopReplica\bin\Release\it\OnTopReplica.resources.dll" + SetOutPath "$INSTDIR\cs" + File "..\OnTopReplica\bin\Release\cs\OnTopReplica.resources.dll" + SetOutPath "$INSTDIR\da" + File "..\OnTopReplica\bin\Release\da\OnTopReplica.resources.dll" + + ;Uninstaller + WriteUninstaller "$INSTDIR\${UNINSTALLER_NAME}" + Call RegisterApplication +SectionEnd + +Section "Uninstall" + ;Remove whole directory (no data is stored there anyway) + RMDir /r "$INSTDIR" + + ;Remove uninstaller + Call un.DeregisterApplication +SectionEnd diff --git a/OnTopReplica/AboutForm.Designer.cs b/OnTopReplica/AboutForm.Designer.cs index 0a30d65..ce5ffd9 100644 --- a/OnTopReplica/AboutForm.Designer.cs +++ b/OnTopReplica/AboutForm.Designer.cs @@ -29,7 +29,6 @@ this.themedLabel2 = new VistaControls.ThemeText.ThemedLabel(); this.panel1 = new System.Windows.Forms.Panel(); this.buttonReset = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); this.progressBar1 = new VistaControls.ProgressBar(); this.buttonUpdate = new System.Windows.Forms.Button(); this.buttonExpander = new System.Windows.Forms.Button(); @@ -72,7 +71,6 @@ this.panel1.BackgroundImage = global::OnTopReplica.Properties.Resources.back; this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panel1.Controls.Add(this.buttonReset); - this.panel1.Controls.Add(this.buttonCancel); this.panel1.Controls.Add(this.progressBar1); this.panel1.Controls.Add(this.buttonUpdate); this.panel1.Controls.Add(this.buttonExpander); @@ -96,19 +94,6 @@ this.buttonReset.UseVisualStyleBackColor = true; this.buttonReset.Click += new System.EventHandler(this.ResetClick); // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.buttonCancel.Image = ((System.Drawing.Image)(resources.GetObject("buttonCancel.Image"))); - this.buttonCancel.Location = new System.Drawing.Point(211, 79); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(23, 23); - this.buttonCancel.TabIndex = 3; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Visible = false; - this.buttonCancel.Click += new System.EventHandler(this.Abort_click); - // // progressBar1 // this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -242,7 +227,6 @@ private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Button buttonUpdate; - private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.WebBrowser webBrowser; private System.Windows.Forms.Button buttonReset; private VistaControls.ProgressBar progressBar1; diff --git a/OnTopReplica/AboutForm.cs b/OnTopReplica/AboutForm.cs index 3984432..f5c2490 100644 --- a/OnTopReplica/AboutForm.cs +++ b/OnTopReplica/AboutForm.cs @@ -8,6 +8,7 @@ using System.Deployment.Application; using System; using VistaControls.TaskDialog; using System.ComponentModel; +using OnTopReplica.Update; namespace OnTopReplica { public partial class AboutForm : GlassForm { @@ -16,7 +17,6 @@ namespace OnTopReplica { InitializeComponent(); //Tooltips - toolTip.SetToolTip(buttonCancel, Strings.AboutButtonCancelTT); toolTip.SetToolTip(buttonExpander, Strings.AboutButtonExpanderTT); toolTip.SetToolTip(buttonReset, Strings.AboutButtonResetTT); toolTip.SetToolTip(buttonUpdate, Strings.AboutButtonUpdateTT); @@ -33,12 +33,8 @@ namespace OnTopReplica { //Update title themedLabel2.Text = "v" + Application.ProductVersion.Substring(0, 3); - //Create event handlers - handlerProgressChange = new DeploymentProgressChangedEventHandler(CurrentDeployment_CheckForUpdateProgressChanged); - handlerProgressComplete = new CheckForUpdateCompletedEventHandler(CurrentDeployment_CheckForUpdateCompleted); - - handlerUpdateChange = new DeploymentProgressChangedEventHandler(deployment_UpdateProgressChanged); - handlerUpdateComplete = new AsyncCompletedEventHandler(deployment_UpdateCompleted); + //Add update event handling + _updateManager.UpdateCheckCompleted += new EventHandler(UpdateManager_UpdateCheckCompleted); } protected override void OnKeyUp(KeyEventArgs e) { @@ -102,207 +98,44 @@ namespace OnTopReplica { #region Updating - bool _isChecking = false; - bool _isUpdating = false; + UpdateManager _updateManager = new UpdateManager(); private void Update_click(object sender, System.EventArgs e) { - ApplicationDeployment deployment = null; - try { - deployment = ApplicationDeployment.CurrentDeployment; - } - catch (InvalidDeploymentException ex) { - var dlg = new TaskDialog(Strings.ErrorUpdate, Strings.ErrorGenericTitle, Strings.ErrorUpdateContent); - dlg.EnableHyperlinks = true; - dlg.CommonIcon = TaskDialogIcon.Stop; - dlg.CommonButtons = TaskDialogButton.Close; - dlg.ExpandedControlText = Strings.ErrorDetailButton; - dlg.ExpandedInformation = ex.Message; - dlg.HyperlinkClick += new EventHandler(dlg_HyperlinkClick); - dlg.Show(this); - - return; - } - catch(Exception ex) { - ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, ex); - - return; - } - - CheckForUpdate(deployment); + CheckForUpdate(); } - private void Abort_click(object sender, EventArgs e) { - StopUpdate(); - } + delegate void GuiAction(); - void dlg_HyperlinkClick(object sender, HyperlinkEventArgs e) { - Process.Start(e.Url); - } + void UpdateManager_UpdateCheckCompleted(object sender, UpdateCheckCompletedEventArgs e) { + Invoke(new GuiAction(() => { + if (e.Success) { + _updateManager.HandleUpdateCheck(this, e.Information, true); + } + else { + var dlg = new TaskDialog(Strings.ErrorUpdate, Strings.ErrorUpdate, Strings.ErrorUpdateContentGeneric) { + CommonIcon = TaskDialogIcon.Stop, + CommonButtons = TaskDialogButton.OK + }; + dlg.Show(this); + } - public void CheckForUpdate(ApplicationDeployment deployment) { - //Add event handlers - deployment.CheckForUpdateProgressChanged += handlerProgressChange; - deployment.CheckForUpdateCompleted += handlerProgressComplete; + UpdateStopped(); + })); + } + public void CheckForUpdate() { //Update GUI buttonUpdate.Visible = false; progressBar1.Visible = true; - progressBar1.Value = 0; - buttonCancel.Visible = true; + progressBar1.Value = 50; - _isChecking = true; - - try { - deployment.CheckForUpdateAsync(); - } - catch (Exception ex) { - ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, ex); - - StopUpdate(); - } + _updateManager.CheckForUpdate(); } - public void InstallUpdate(ApplicationDeployment deployment) { - //Add event handlers - deployment.UpdateProgressChanged += handlerUpdateChange; - deployment.UpdateCompleted += handlerUpdateComplete; - - //Update GUI - buttonUpdate.Visible = false; - progressBar1.Visible = true; - progressBar1.Value = 0; - buttonCancel.Visible = true; - - _isUpdating = true; - - try { - deployment.UpdateAsync(); - } - catch (Exception ex) { - ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, ex); - - StopUpdate(); - } - } - - void StopUpdate() { + void UpdateStopped() { //Reset UI progressBar1.Visible = false; - buttonCancel.Visible = false; buttonUpdate.Visible = true; - - try { - ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment; - - //Remove all handlers - deployment.CheckForUpdateProgressChanged -= handlerProgressChange; - deployment.CheckForUpdateCompleted -= handlerProgressComplete; - - //Abort anything - if (_isChecking) - deployment.CheckForUpdateAsyncCancel(); - if (_isUpdating) - deployment.UpdateAsyncCancel(); - } - catch { - return; - } - finally { - _isChecking = false; - _isUpdating = false; - } - } - - DeploymentProgressChangedEventHandler handlerProgressChange; - CheckForUpdateCompletedEventHandler handlerProgressComplete; - - void CurrentDeployment_CheckForUpdateProgressChanged(object sender, DeploymentProgressChangedEventArgs e) { - progressBar1.Value = e.ProgressPercentage; - } - - void CurrentDeployment_CheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e) { - progressBar1.Value = 100; - _isChecking = false; - - if (e.Error != null) { - ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, e.Error); - - StopUpdate(); - return; - } - - if (e.Cancelled) - //Already was aborted - return; - - ApplicationDeployment deployment = null; - try { - deployment = ApplicationDeployment.CurrentDeployment; - } - catch { - //Internal (weird?) error, simply abort - StopUpdate(); - return; - } - - if (e.UpdateAvailable) { - //Install right away if required - if (e.IsUpdateRequired) - InstallUpdate(deployment); - - //Ask user - var dlg = new TaskDialog(string.Format(Strings.AskUpdate, e.AvailableVersion.ToString()), Strings.AskUpdateTitle, Strings.AskUpdateContent); - dlg.CommonIcon = TaskDialogIcon.Information; - dlg.UseCommandLinks = true; - dlg.CustomButtons = new CustomButton[] { - new CustomButton(Result.OK, string.Format(Strings.AskUpdateButtonOk, e.AvailableVersion.ToString())), - new CustomButton(Result.Cancel, Strings.AskUpdateButtonCancel) - }; - dlg.ExpandedInformation = string.Format(Strings.AskUpdateExpanded, Application.ProductVersion, e.AvailableVersion.ToString(), e.UpdateSizeBytes); - dlg.ExpandedControlText = Strings.ErrorDetailButton; - - if (dlg.Show(this).CommonButton == Result.OK) - InstallUpdate(deployment); - else - StopUpdate(); - } - else { - var dlg = new TaskDialog(Strings.InfoUpToDate, Strings.InfoUpToDateTitle); - dlg.CustomIcon = Icon.FromHandle(Resources.thumbs_up.GetHicon()); - dlg.CommonButtons = TaskDialogButton.Close; - dlg.Show(this); - - StopUpdate(); - } - } - - DeploymentProgressChangedEventHandler handlerUpdateChange; - AsyncCompletedEventHandler handlerUpdateComplete; - - void deployment_UpdateProgressChanged(object sender, DeploymentProgressChangedEventArgs e) { - progressBar1.Value = e.ProgressPercentage; - } - - void deployment_UpdateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { - progressBar1.Value = 100; - _isUpdating = false; - - if (e.Error != null) { - ShowGenericError(Strings.ErrorGenericTitle, Strings.ErrorUpdate, e.Error); - - StopUpdate(); - return; - } - - if (e.Cancelled) - return; - - var dlg = new TaskDialog(Strings.InfoUpdated, Strings.InfoUpdatedTitle, Strings.InfoUpdatedContent); - dlg.CustomIcon = Icon.FromHandle(Resources.thumbs_up.GetHicon()); - dlg.CommonButtons = TaskDialogButton.Close; - dlg.Show(this); - - StopUpdate(); } #endregion diff --git a/OnTopReplica/AboutForm.resx b/OnTopReplica/AboutForm.resx index 86aa216..4d116c2 100644 --- a/OnTopReplica/AboutForm.resx +++ b/OnTopReplica/AboutForm.resx @@ -117,28 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALDAAA - CwwBP0AiyAAAAolJREFUOE91k11IU2EcxkcRRXhRRGXgRUWWjS3osm4sZGZUftwUxfxoUptd+LUKLRuk - bWqlsSZrE5stq219Me1D84MkCxG7aK4iFKbkmsPkEC7DPHae/uds6jb1hQfO/7zv73nf9/mfIxJFja/n - 9phI4rnX9BxDuknSRK9dVHu0aZho1s7S4hGSJAR3+xuL4NVnger7y5p4yo+AHXAA35xgHCX84u+kfr8x - F+i7B/Q2wFuVsbSJpyIE95mBrkqg3wKmqRB+QxbQYwSeqIHHanCdtfBqUyNNhkoPutnhLoLuBuE35cBL - DdBRBbReI7AYaFKBsyjAWZXgeq0Y1KT4uuQ7M4Xr0DHb/Y35gMsGdJIBDztLgafnAXvBAmyWg3t+CUy9 - EgMqqbc6KW4v4St5Az7lbj9NoJeu0FIWhG1kOrczD9uLwRhz8Ekp8V3cvyWN4HXzgZLBZtKvgI1A3sAe - CbMmOabMCnzJk87WH91WQODGcDh4AqMCeKsHHIURO/+tO46pW2mYtpzFT/0puFXSUb7F4QbtfrMKeG8K - ph127Jm6EwI8ef0wGJ0Mvy1KjOsz+S6M9CnE2wWToZJEN+t2Aq8rIuB/1jzMNOQiUJMqwONXEzGuSwHb - VoPByzJf68n4bMJXCCYeTTLYjlpwfK/5wJ6VgjHIMaY7hulHRZjQJQvwpDUfw1dk+HBa7CQslrR2/iqe - siSwr7Tg2qrB3FHApZSMfTwj+eyrTMcf2wUEHqoF+F3O7hcESUnxi/8FzSFMWNWzLqX0h3pfbEb6rvVb - hYBv52BUl8HDLSGYN1h69GQnPCg/ECej2Q2hDy2GAjN0ZyXcoHoHaaEDy7qIRKvD5yiwVVSvIW2KZv4D - L3Lc9EIqZDQAAAAASUVORK5CYII= - - 17, 17 + AAABAAIAMDAAAAEAIACoJQAAJgAAABAQAAABACAAaAQAAM4lAAAoAAAAMAAAAGAAAAABACAAAAAAAAAA diff --git a/OnTopReplica/AspectRatioForm.cs b/OnTopReplica/AspectRatioForm.cs index d488d98..4e96ab7 100644 --- a/OnTopReplica/AspectRatioForm.cs +++ b/OnTopReplica/AspectRatioForm.cs @@ -38,7 +38,7 @@ namespace OnTopReplica { /// /// Gets or sets the form's aspect ratio that will be kept automatically when resizing. /// - [Description("Determins this form's fixed aspect ratio."), Category("Appearance"), DefaultValue(1.0)] + [Description("Determines this form's fixed aspect ratio."), Category("Appearance"), DefaultValue(1.0)] public double AspectRatio { get { return _aspectRatio; @@ -170,7 +170,7 @@ namespace OnTopReplica { rc.Top = rc.Bottom - (int)(width / AspectRatio) - ExtraPadding.Vertical - clientSizeConversionHeight; } - Marshal.StructureToPtr(rc, m.LParam, true); + Marshal.StructureToPtr(rc, m.LParam, false); } base.WndProc(ref m); diff --git a/OnTopReplica/Assets/icon-new-red.ico b/OnTopReplica/Assets/icon-new-red.ico new file mode 100644 index 0000000..c5549f8 Binary files /dev/null and b/OnTopReplica/Assets/icon-new-red.ico differ diff --git a/OnTopReplica/MainForm.cs b/OnTopReplica/MainForm.cs index c76e6da..b17df10 100644 --- a/OnTopReplica/MainForm.cs +++ b/OnTopReplica/MainForm.cs @@ -7,6 +7,7 @@ using VistaControls.Dwm; using VistaControls.TaskDialog; using System.Collections.Generic; using OnTopReplica.Native; +using OnTopReplica.Update; namespace OnTopReplica { @@ -17,10 +18,8 @@ namespace OnTopReplica { SidePanel _currentSidePanel = null; Panel _sidePanelContainer; - //Window manager + //Managers WindowManager _windowManager = new WindowManager(); - - //Message pump extension MessagePumpManager _msgPumpManager = new MessagePumpManager(); FormBorderStyle _defaultBorderStyle; @@ -58,10 +57,6 @@ namespace OnTopReplica { menuContext, menuWindows, menuOpacity, menuResize, menuLanguages, menuFullscreenContext ); - //Hook keyboard handler - this.KeyUp += new KeyEventHandler(Form_KeyUp); - this.KeyPreview = true; - //Init message pump extensions _msgPumpManager.Initialize(this); @@ -71,6 +66,10 @@ namespace OnTopReplica { Keys.O, new Native.HotKeyMethods.HotKeyHandler(HotKeyOpenHandler)); hotKeyMgr.RegisterHotKey(Native.HotKeyModifiers.Control | Native.HotKeyModifiers.Shift, Keys.C, new Native.HotKeyMethods.HotKeyHandler(HotKeyCloneHandler)); + + //Hook keyboard handler + this.KeyUp += new KeyEventHandler(Form_KeyUp); + this.KeyPreview = true; } #region Event override @@ -159,8 +158,11 @@ namespace OnTopReplica { } protected override void WndProc(ref Message m) { - if (_msgPumpManager.PumpMessage(ref m)) - return; + if (_msgPumpManager != null) { + if (_msgPumpManager.PumpMessage(ref m)) { + return; + } + } switch (m.Msg) { case WM.NCRBUTTONUP: @@ -252,7 +254,7 @@ namespace OnTopReplica { if (IsFullscreen) IsFullscreen = false; - if (Program.Platform.IsHidden(this)) { + if (!Program.Platform.IsHidden(this)) { Program.Platform.HideForm(this); } else { diff --git a/OnTopReplica/MessagePumpManager.cs b/OnTopReplica/MessagePumpManager.cs index c0cf071..1ab23b7 100644 --- a/OnTopReplica/MessagePumpManager.cs +++ b/OnTopReplica/MessagePumpManager.cs @@ -19,23 +19,28 @@ namespace OnTopReplica { public void Initialize(MainForm form) { Form = form; + //Register window shell hook + if (!HookMethods.RegisterShellHookWindow(form.Handle)) { + Console.Error.WriteLine("Failed to register shell hook window."); + } + else { +#if DEBUG + Console.WriteLine("Shell hook window registered successfully."); +#endif + } + foreach (var t in Assembly.GetExecutingAssembly().GetTypes()) { if (typeof(IMessagePumpProcessor).IsAssignableFrom(t) && !t.IsAbstract) { var instance = (IMessagePumpProcessor)Activator.CreateInstance(t); instance.Initialize(form); - _processors.Add(t, instance); + _processors[t] = instance; #if DEBUG Console.WriteLine("Registered message pump processor: {0}", t); #endif } } - - //Register window shell hook - if (!HookMethods.RegisterShellHookWindow(form.Handle)) { - Console.Error.WriteLine("Failed to register shell hook window."); - } } /// @@ -54,7 +59,7 @@ namespace OnTopReplica { /// /// Get the instance of a registered message pump processor. - /// Throw if instance not found. + /// Throws if instance not found. /// public T Get() { return (T)_processors[typeof(T)]; @@ -64,7 +69,7 @@ namespace OnTopReplica { public void Dispose() { if (!HookMethods.DeregisterShellHookWindow(Form.Handle)) { - Console.Error.WriteLine("Failed to deregister sheel hook window."); + Console.Error.WriteLine("Failed to deregister shell hook window."); } foreach (var processor in _processors.Values) { @@ -74,5 +79,7 @@ namespace OnTopReplica { } #endregion + } + } diff --git a/OnTopReplica/OnTopReplica.csproj b/OnTopReplica/OnTopReplica.csproj index a26a570..6820fe6 100644 --- a/OnTopReplica/OnTopReplica.csproj +++ b/OnTopReplica/OnTopReplica.csproj @@ -14,15 +14,15 @@ 512 Assets\icon-new.ico false - true + false Internet OnTopReplica.Program false - DB79D77572EF10838D6A2CECDDE738C6570E7995 - OnTopReplica_TemporaryKey.pfx - true + A305A505E19CF40E069521C80C13AB3C900EDB7C + OnTopReplica_1_TemporaryKey.pfx + false @@ -44,11 +44,11 @@ en OnTopReplica Lorenz Cuno Klopfenstein + true publish.htm false - true - 1 - 3.0.0.%2a + 0 + 3.0.2.%2a false true true @@ -82,31 +82,11 @@ + + OnTopReplica.exe.manifest - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - false - false - false - - - true - bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt - false - false - @@ -179,26 +159,11 @@ - - True - True - Strings.cs.resx - - - True - True - Strings.da.resx - True True Strings.resx - - Strings.it.resx - True - True - Component @@ -255,6 +220,7 @@ Resources.resx True + SettingsSingleFileGenerator Settings.Designer.cs @@ -275,6 +241,9 @@ Component + + + @@ -309,9 +278,6 @@ - - Designer - @@ -359,7 +325,6 @@ - @@ -373,6 +338,46 @@ + + False + + + + + Exclude + True + File + + + False + + + + + Exclude + True + File + + + False + + + + + Exclude + True + File + + + False + + + + + Exclude + True + File + False diff --git a/OnTopReplica/OnTopReplica.exe.manifest b/OnTopReplica/OnTopReplica.exe.manifest index d7a6e03..b9febc2 100644 --- a/OnTopReplica/OnTopReplica.exe.manifest +++ b/OnTopReplica/OnTopReplica.exe.manifest @@ -1,38 +1,22 @@  - - - - - - - - - - - - - - - - - - - - - - - Lightweight clone of a window. - - + + + + + + + + + + + + + + Lightweight clone of a window. + + + + + + \ No newline at end of file diff --git a/OnTopReplica/OnTopReplica_TemporaryKey.pfx b/OnTopReplica/OnTopReplica_TemporaryKey.pfx deleted file mode 100644 index b8aa234..0000000 Binary files a/OnTopReplica/OnTopReplica_TemporaryKey.pfx and /dev/null differ diff --git a/OnTopReplica/PlatformSupport.cs b/OnTopReplica/PlatformSupport.cs index ccbf09a..8f7d816 100644 --- a/OnTopReplica/PlatformSupport.cs +++ b/OnTopReplica/PlatformSupport.cs @@ -72,7 +72,7 @@ namespace OnTopReplica { /// Gets whether the form is currently hidden or not. /// public virtual bool IsHidden(MainForm form) { - return form.Visible; + return !form.Visible; } /// @@ -104,5 +104,6 @@ namespace OnTopReplica { } #endregion + } } diff --git a/OnTopReplica/Platforms/WindowsVista.cs b/OnTopReplica/Platforms/WindowsVista.cs index f5d277e..d8d1b60 100644 --- a/OnTopReplica/Platforms/WindowsVista.cs +++ b/OnTopReplica/Platforms/WindowsVista.cs @@ -25,6 +25,7 @@ namespace OnTopReplica.Platforms { //Do not show in task bar, but display notify icon //NOTE: this effectively makes Windows ignore the Flip 3D policy set above (on Windows 7) + //NOTE: this also makes HotKey registration critically fail on Windows 7 form.ShowInTaskbar = false; //Install tray icon diff --git a/OnTopReplica/Program.cs b/OnTopReplica/Program.cs index f03458a..7a2e645 100644 --- a/OnTopReplica/Program.cs +++ b/OnTopReplica/Program.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Drawing; using System.IO; using VistaControls.TaskDialog; +using OnTopReplica.Update; namespace OnTopReplica { @@ -16,6 +17,10 @@ namespace OnTopReplica { static CultureInfo _languageChangeCode = Settings.Default.Language; + static UpdateManager _updateManager; + + static MainForm _mainForm; + /// /// The main entry point for the application. /// @@ -24,20 +29,25 @@ namespace OnTopReplica { //Hook abort handler AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - //Initialize and check for platform support Platform = PlatformSupport.Create(); if (!Platform.CheckCompatibility()) return; Platform.InitApp(); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + //Update settings if needed if (Settings.Default.MustUpdate) { Settings.Default.Upgrade(); Settings.Default.MustUpdate = false; } + + //Start update request + _updateManager = new UpdateManager(); + _updateManager.UpdateCheckCompleted += new EventHandler(UpdateCheckCompleted); + _updateManager.CheckForUpdate(); bool mustReloadForm = false; Point reloadLocation = new Point(); @@ -49,18 +59,18 @@ namespace OnTopReplica { Settings.Default.Language = _languageChangeCode; _languageChangeCode = null; - Form form = new MainForm(); + _mainForm = new MainForm(); if (mustReloadForm) { - form.Location = reloadLocation; - form.Size = reloadSize; + _mainForm.Location = reloadLocation; + _mainForm.Size = reloadSize; } - Application.Run(form); + Application.Run(_mainForm); //Enable reloading on next loop mustReloadForm = true; - reloadLocation = form.Location; - reloadSize = form.Size; + reloadLocation = _mainForm.Location; + reloadSize = _mainForm.Size; } while (_languageChangeCode != null); @@ -68,6 +78,22 @@ namespace OnTopReplica { Settings.Default.Save(); } + delegate void GuiAction(); + + static void UpdateCheckCompleted(object sender, UpdateCheckCompletedEventArgs e) { + //Budy waiting for form (ugly) + while (_mainForm == null || !_mainForm.IsHandleCreated) ; + + _mainForm.Invoke(new GuiAction(() => { + if (e.Success) { + _updateManager.HandleUpdateCheck(_mainForm, e.Information, false); + } + else { + Console.Error.WriteLine("Failed to check for updates: {0}", e.Error); + } + })); + } + /// /// Forces a global language change. As soon as the main form is closed, the change is performed /// and the form is reopened using the new language. diff --git a/OnTopReplica/Properties/AssemblyInfo.cs b/OnTopReplica/Properties/AssemblyInfo.cs index bb63a90..7a7740f 100644 --- a/OnTopReplica/Properties/AssemblyInfo.cs +++ b/OnTopReplica/Properties/AssemblyInfo.cs @@ -10,7 +10,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Lorenz Cuno Klopfenstein")] [assembly: AssemblyProduct("OnTopReplica")] -[assembly: AssemblyCopyright("Copyright © Lorenz Cuno Klopfenstein 2007")] +[assembly: AssemblyCopyright("Copyright © Lorenz Cuno Klopfenstein 2010")] +//[assembly: AssemblyCopyright("Copyright © Lorenz Cuno Klopfenstein 2007")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +33,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyVersion("3.0.2.0")] +[assembly: AssemblyFileVersion("3.0.2.0")] diff --git a/OnTopReplica/Strings.Designer.cs b/OnTopReplica/Strings.Designer.cs index ce7f535..827c274 100644 --- a/OnTopReplica/Strings.Designer.cs +++ b/OnTopReplica/Strings.Designer.cs @@ -213,7 +213,7 @@ namespace OnTopReplica { } /// - /// Looks up a localized string similar to Install OnTopReplica {0}?. + /// Looks up a localized string similar to Download OnTopReplica {0}?. /// internal static string AskUpdate { get { @@ -232,7 +232,7 @@ namespace OnTopReplica { } /// - /// Looks up a localized string similar to Proceed + /// Looks up a localized string similar to Download ///Install OnTopReplica {0}.. /// internal static string AskUpdateButtonOk { @@ -242,7 +242,7 @@ namespace OnTopReplica { } /// - /// Looks up a localized string similar to The new version will be automatically downloaded and installed.. + /// Looks up a localized string similar to The new version can be downloaded and installed from the official website.. /// internal static string AskUpdateContent { get { @@ -252,8 +252,7 @@ namespace OnTopReplica { /// /// Looks up a localized string similar to Installed version: {0} - ///Available version: {1} - ///Download size: {2} bytes. + ///Available version: {1}. /// internal static string AskUpdateExpanded { get { @@ -325,7 +324,7 @@ namespace OnTopReplica { } /// - /// Looks up a localized string similar to 'Desktop Composition' is not enabled.. + /// Looks up a localized string similar to Desktop Composition' is not enabled.. /// internal static string ErrorDwmOff { get { @@ -381,7 +380,7 @@ namespace OnTopReplica { } /// - /// Looks up a localized string similar to 'Desktop Composition' is not supported on your Operating System. + /// Looks up a localized string similar to Desktop Composition' is not supported on your Operating System. ///You must run this application on Windows Vista Home Premium or better.. /// internal static string ErrorNoDwm { @@ -426,25 +425,6 @@ namespace OnTopReplica { } } - /// - /// Looks up a localized string similar to OnTopReplica cannot run on your platform. - ///The application is compatible with Windows Vista and 7.. - /// - internal static string ErrorUnsupportedPlatform { - get { - return ResourceManager.GetString("ErrorUnsupportedPlatform", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unsupported Platform. - /// - internal static string ErrorUnsupportedPlatformTitle { - get { - return ResourceManager.GetString("ErrorUnsupportedPlatformTitle", resourceCulture); - } - } - /// /// Looks up a localized string similar to Unable to check for updates.. /// @@ -463,6 +443,15 @@ namespace OnTopReplica { } } + /// + /// Looks up a localized string similar to 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.. + /// + internal static string ErrorUpdateContentGeneric { + get { + return ResourceManager.GetString("ErrorUpdateContentGeneric", resourceCulture); + } + } + /// /// Looks up a localized string similar to Mode. /// diff --git a/OnTopReplica/Strings.cs.Designer.cs b/OnTopReplica/Strings.cs.Designer.cs deleted file mode 100644 index e69de29..0000000 diff --git a/OnTopReplica/Strings.cs.resx b/OnTopReplica/Strings.cs.resx index 3ca95a1..0d381ff 100644 --- a/OnTopReplica/Strings.cs.resx +++ b/OnTopReplica/Strings.cs.resx @@ -12,6 +12,71 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Přerušit aktualizaci. + + + Zobrazit podrobnosti o aplikaci OnTopReplica. + + + Resetovat nastavení OnTopReplica. + + + Aktualizovat OnTopReplica. + + + <html> + <head> + <style type="text/css"> +body { + font-family: Segoe UI, Arial, sans-serif; + font-size: 0.8em; + margin: 0; +padding: 0.75em; +} +h1 { + font-size: 1.4em; + font-weight: bold; + + margin: 1em 0 0.4em 0; + padding: 0; +} +p { + margin: 0.5em 0 0.5em 1em; + padding: 0; +} +a { + font-weight: bold; + color: blue; +} +a:hover { + color: red; +} + </style> + </head> + + <body> + + <h1>Licence</h1> + + <p><b>OnTopReplica</b> je šířena pod <a href="http://opensource.org/licenses/ms-rl.html">Microsoft Reciprocal License (Ms-RL)</a> licencí.</p> + <p>Původní zdrojový kód je možné nalézt na <a href="http://www.codeplex.com/ontopreplica">domovské stránce projektu na serveru CodePlex</a>.</p> + + <h1>Autoři a zásluhy</h1> + + <p>Původní inspirací pro OnTopReplica byla aplikace <a href="http://insentient.net">Switcher</a> a další aplikace založeny na DWM.</p> + + <p>Všechny Vista ovládací prvky jsou součástí <a href="http://www.codeplex.com/windowsformsaero">knihovny WindowsFormsAero</a> pro .NET.</p> + + <p>Některé ukázkové kódy byly převzaty z <a href="http://www.ookii.org">Ookii</a> ze serveru Channel9.</p> + + <p>Třída NativeToolstripRenderer byla převzata z <a href="http://wp.asztal.net/2007/12/vista-style-menus-in-dotnet/">asztal.net</a>.</p> + + <p>Některé ikony pocházejí z <a href="http://www.vistaico.com">VistaICO.com</a> a balíčku ikon Xiao.</p> + + </body> +</html> + OnTopReplica @@ -28,6 +93,40 @@ Všechna nastavení budou ztracena. Resetovat + + Resetovat nastavení? + + + Operace "Resetovat nastavení" smaže veškerá uživatelská nastavení aplikace OnTopReplica a vrátí nastavení do stejného stavu jako po instalaci (všechny uložené informace, jako například uložené výřezy oken, budou ztraceny). + + + Resetovat nastavení + + + Instalovat OnTopReplica {0}? + {0} update version + + + Zrušit aktualizaci +Aplikace OnTopReplica vás vyzve k aktualizaci při dalším startu. + + + Pokračovat +Instalovat OnTopReplica {0}. + {0} update version + + + Nová verze bude automaticky stažena a nainstalována. + + + Nainstalovaná verze: {0} +Dostupná verze: {1} + {0} installed version number +{1} online available version number + + + Nové aktualizace jsou k dispozici + &Storno @@ -37,6 +136,9 @@ Všechna nastavení budou ztracena. Označte výřez pomocí myši. + + Podrobnosti + Podrobnosti k Windows Aero @@ -70,21 +172,122 @@ Tuto aplikaci je možné spouštět pouze na systémech Windows Vista Home Premi Funkce Desktop Composition není podporována + + Náhled nebyl nahrán. + Nelze vytvořit náhled. Nelze vložit okno. + + Kontrola aktualizací se nezdařila. + + + Zdá se, že aplikace OnTopReplica nebyla nainstalována pomocí 'ClickOnce'. Aktualizaci musíte provést ručně (navštivte <a href="http://ontopreplica.codeplex.com">domácí stránku aplikace OnTopReplica</a>). + + + Režim + + + Vždy na vrchu + + + Nastaví aplikaci OnTopReplica, aby zůstávala vždy na vrchu. + + + Proklikávání + + + Aplikace OnTopReplica se bude chovat jako průhledná vrstva přes kterou bude možno proklikávat do podložených oken. + + + Standardní + + + Aplikace OnTopReplica se bude chovat jako běžné okno. Jiná okna mohou překrýt okno aplikace. + + + Aplikace OnTopReplica přes celou obrazovku + Domácí stránka: www.codeplex.com/ontopreplica. + + Přejete si povolit "přeposílání kliknutí"? + + + V tomto režimu aplikace OnTopReplica přeposílá kliknutí levého tlačítka myši do zdrojového okna (je tedy možné provádět základní ovládání zdrojového okna bez nutnosti jej aktivovat). + +Ukončit režim "přeposíání kliknutí" je možné opětovným vyvolání položky v menu. + + + Přeposílání kliknutí + + + Povolit "Proklikávání" v celoobrazovkovém režimu? + + + "Proklikávání" funguje pouze pokud je povoleno v menu a okno má nastavenou průhlednost. + + + V tomto režimu se bude okno roztažené přes celou obrazovku chovat jako poloprůhledná vrstva, přes kterou bude možné "proklikávat" na podložená okna. + +K návratu do standardního režimu je možné přejít kdykoli dvojklikem na ikonu v oznamovací oblasti (traye). + + + Ne. +Režim "Proklikávání" je možné zvolit později v menu + + + Používat "Proklikávání" + + + Režim "Proklikávání" + + + Aplikace OnTopReplica byla aktualizována. + + + Pro použití aktualizací je potřeba aplikaci OnTopReplica restartovat. + + + Aktualizace proběhla úspěšně + + + OnTopReplica je aktuální. + + + Žádná aktualizace není k dispozici. + + + Jazyk + O aplikaci... Skryje hlavní okno a zobrazí informace "O aplikaci". + + Okraj + + + Přepínač, který definuje, zda má aplikace OnTopReplica viditelný okraj okna. + + + Přeposílání kliknutí + + + Zapne "přeposílání kliknutí" do zdrojového okna. + + + Proklikávání + + + Aplikace OnTopReplica se bude chovat jako průhledná vrstva přes kterou bude možno proklikávat do podložených oken. + Zavřít @@ -163,6 +366,9 @@ Tuto aplikaci je možné spouštět pouze na systémech Windows Vista Home Premi Horní pravý rok + + Opustit celoobrazovkový režim + Ukládat pozici a velikost okna @@ -205,6 +411,36 @@ Tuto aplikaci je možné spouštět pouze na systémech Windows Vista Home Premi Zobrazí seznam oken, které je možné použít jako zdroj. + + - celé okno - + + + Aktuální výřez: + + + Smazat + + + Hotovo + + + Výška + + + Reset + + + Uložit + + + Uložené výřezy + + + Výřezy: + + + Šířka + Začněte klepnutím sem pravým tlačítkem myši... @@ -217,237 +453,4 @@ Tuto aplikaci je možné spouštět pouze na systémech Windows Vista Home Premi Zkontroluj aktualizace - - Instalovat OnTopReplica {0}? - - - Zrušit aktualizaci -Aplikace OnTopReplica vás vyzve k aktualizaci při dalším startu. - - - Pokračovat -Instalovat OnTopReplica {0}. - - - Nová verze bude automaticky stažena a nainstalována. - - - Nainstalovaná verze: {0} -Dostupná verze: {1} -Velikost pro stažení: {2} bajtů - - - Nové aktualizace jsou k dispozici - - - Podrobnosti - - - Náhled nebyl nahrán. - - - Kontrola aktualizací se nezdařila. - - - Zdá se, že aplikace OnTopReplica nebyla nainstalována pomocí 'ClickOnce'. Aktualizaci musíte provést ručně (navštivte <a href="http://ontopreplica.codeplex.com">domácí stránku aplikace OnTopReplica</a>). - - - Aplikace OnTopReplica byla aktualizována. - - - Pro použití aktualizací je potřeba aplikaci OnTopReplica restartovat. - - - Aktualizace proběhla úspěšně - - - OnTopReplica je aktuální. - - - Žádná aktualizace není k dispozici. - - - Povolit "Proklikávání" v celoobrazovkovém režimu? - - - "Proklikávání" funguje pouze pokud je povoleno v menu a okno má nastavenou průhlednost. - - - V tomto režimu se bude okno roztažené přes celou obrazovku chovat jako poloprůhledná vrstva, přes kterou bude možné "proklikávat" na podložená okna. - -K návratu do standardního režimu je možné přejít kdykoli dvojklikem na ikonu v oznamovací oblasti (traye). - - - Režim "Proklikávání" - - - Ne. -Režim "Proklikávání" je možné zvolit později v menu - - - Používat "Proklikávání" - - - Přeposílání kliknutí - - - Zapne "přeposílání kliknutí" do zdrojového okna. - - - Opustit celoobrazovkový režim - - - Jazyk - - - Výřezy: - - - Uložit - - - Smazat - - - Aktuální výřez: - - - Šířka - - - Výška - - - Reset - - - Hotovo - - - Uložené výřezy - - - Přejete si povolit "přeposílání kliknutí"? - - - Přeposílání kliknutí - - - V tomto režimu aplikace OnTopReplica přeposílá kliknutí levého tlačítka myši do zdrojového okna (je tedy možné provádět základní ovládání zdrojového okna bez nutnosti jej aktivovat). - -Ukončit režim "přeposíání kliknutí" je možné opětovným vyvolání položky v menu. - - - Resetovat nastavení? - - - Operace "Resetovat nastavení" smaže veškerá uživatelská nastavení aplikace OnTopReplica a vrátí nastavení do stejného stavu jako po instalaci (všechny uložené informace, jako například uložené výřezy oken, budou ztraceny). - - - Resetovat nastavení - - - Přerušit aktualizaci. - - - Zobrazit podrobnosti o aplikaci OnTopReplica. - - - Resetovat nastavení OnTopReplica. - - - Aktualizovat OnTopReplica. - - - <html> - <head> - <style type="text/css"> -body { - font-family: Segoe UI, Arial, sans-serif; - font-size: 0.8em; - margin: 0; -padding: 0.75em; -} -h1 { - font-size: 1.4em; - font-weight: bold; - - margin: 1em 0 0.4em 0; - padding: 0; -} -p { - margin: 0.5em 0 0.5em 1em; - padding: 0; -} -a { - font-weight: bold; - color: blue; -} -a:hover { - color: red; -} - </style> - </head> - - <body> - - <h1>Licence</h1> - - <p><b>OnTopReplica</b> je šířena pod <a href="http://opensource.org/licenses/ms-rl.html">Microsoft Reciprocal License (Ms-RL)</a> licencí.</p> - <p>Původní zdrojový kód je možné nalézt na <a href="http://www.codeplex.com/ontopreplica">domovské stránce projektu na serveru CodePlex</a>.</p> - - <h1>Autoři a zásluhy</h1> - - <p>Původní inspirací pro OnTopReplica byla aplikace <a href="http://insentient.net">Switcher</a> a další aplikace založeny na DWM.</p> - - <p>Všechny Vista ovládací prvky jsou součástí <a href="http://www.codeplex.com/windowsformsaero">knihovny WindowsFormsAero</a> pro .NET.</p> - - <p>Některé ukázkové kódy byly převzaty z <a href="http://www.ookii.org">Ookii</a> ze serveru Channel9.</p> - - <p>Třída NativeToolstripRenderer byla převzata z <a href="http://wp.asztal.net/2007/12/vista-style-menus-in-dotnet/">asztal.net</a>.</p> - - <p>Některé ikony pocházejí z <a href="http://www.vistaico.com">VistaICO.com</a> a balíčku ikon Xiao.</p> - - </body> -</html> - - - - celé okno - - - - Aplikace OnTopReplica přes celou obrazovku - - - Režim - - - Vždy na vrchu - - - Nastaví aplikaci OnTopReplica, aby zůstávala vždy na vrchu. - - - Proklikávání - - - Aplikace OnTopReplica se bude chovat jako průhledná vrstva přes kterou bude možno proklikávat do podložených oken. - - - Standardní - - - Aplikace OnTopReplica se bude chovat jako běžné okno. Jiná okna mohou překrýt okno aplikace. - - - Okraj - - - Přepínač, který definuje, zda má aplikace OnTopReplica viditelný okraj okna. - - - Proklikávání - - - Aplikace OnTopReplica se bude chovat jako průhledná vrstva přes kterou bude možno proklikávat do podložených oken. - \ No newline at end of file diff --git a/OnTopReplica/Strings.da.Designer.cs b/OnTopReplica/Strings.da.Designer.cs deleted file mode 100644 index e69de29..0000000 diff --git a/OnTopReplica/Strings.da.resx b/OnTopReplica/Strings.da.resx index 7f0dc1c..41d3c80 100644 --- a/OnTopReplica/Strings.da.resx +++ b/OnTopReplica/Strings.da.resx @@ -12,14 +12,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - OnTopReplica + + Annuller updateringen - - - ingen - + + Vis detaljer om OnTopReplica. - - Sæt OnTopReplica automatiskt på den aktuelle skærm. + + Nulstil alle OnTopReplica indstillinger. + + + Opdater OnTopReplica nu. <html> @@ -74,368 +77,205 @@ a:hover { </body> </html> - - Nederst højre + + OnTopReplica - - 1:1 Pas til vinduet - - - Installer OnTopReplica {0}? - - - &Annuller - - - 1:4 kvart - - - 100% (uigennemsigtig) - - - Krom - - - 50% - - - Klikke igennem - - - Annuller updateringen - - - - hele - - - - 2:1 dobbelt + + Nulstil vinduet helt? &NulstilAlle ændringer vil blive tabt. + + Kan bruges til at nulstille alle indstillinger hvis du mister kontrollen over vinduet eller hvis det er flyttet uden for skærmen. + + + Nulstil + + + Nulstil indstillinger? + + + Dette nulstiller OnTopReplica til standard indstillingerne (alle gemte informationer, som gemte områder, vil blive slettet). + + + Nulstil indstillingerne + + + Installer OnTopReplica {0}? + {0} update version + Annuller opdateringenOnTopReplica påminder dig igen næste gang det startes. - - Vinduet du har valgt er lukket eller er ikke gyldigt mere. + + FortsætInstaller OnTopReplica + {0} update version - - Viser en liste af vinduer du kan bruge som miniature kilde. + + Den nye version vil automatiskt blive downloaded og installeret. - - Viser OnTopReplica. + + Installeret version: {0} +Tilgængelig version: {1} + {0} installed version number +{1} online available version number - - OnTopReplica blev ikke installeret ved hjælp af 'ClickOnce'. Du bliver nødt til at opdatere manuelt (besøg <a href="http://ontopreplica.codeplex.com">OnTopReplica's hjemmeside</a>). + + Opdatering tilgængelig. - - Opdater nu! + + &Annuller - - Vis detaljer om OnTopReplica. + + Lavet af: Lorenz Cuno Klopfenstein. - - Luk + + Tegn områder med musen - - Aktiver "click forwarding" til det klonede vindue + + Detaljer - - Ingen opdateringer er tilgængelige + + Detaljer om Windows Aero Windows Aero er kun tilgængelig op Windows Vista Home Premium eller højere. + + Windows Aero effekter er ikke slået til + + + Du skal aktiverere "Windows Aero" som tema i Windows.For at gøre dette skal du højreklikke på skrivebordet og vælge personlige indstillinger. + + + Fejl detaljer. + + + Fejl: + + + Vinduet du har valgt er lukket eller er ikke gyldigt mere. + + + Fejl + + + Windows Aero effekter er ikke understøttet af dit styresystem. +Dette program kræver Windows Vista Home Premium eller bedre. + + + Skrivebords komposition ikke understøttet + + + Ingen miniature indlæst. + + + Kan ikke lave miniature. + + + Kunne ikke passes til vinduet. + + + Kan ikke søge efter opdateringer. + + + OnTopReplica blev ikke installeret ved hjælp af 'ClickOnce'. Du bliver nødt til at opdatere manuelt (besøg <a href="http://ontopreplica.codeplex.com">OnTopReplica's hjemmeside</a>). + + + Tilstande + Altid øverst - - Områder: + + Får OnTopReplica til altid at være øverst. - - Højde + + Klikke igennem - - Vælg område... + + OnTopReplica vil opføre sig som en gennemsigtig film der lader dig klikke igennem til de underliggende vinduer. - - Vælg vindue + + Standard - - Slet + + Opfører sig som et almindeligt vindue. Du kan trække andre viduer ind over OnTopReplica. - - Genskab + + OnTopReplica fuld skærm + + + Hjemmeside: www.codeplex.com/ontopreplica. + + + Ønsker du at aktivere "click forwarding"? Hvis denne funktion er aktiveret vil OnTopReplica vidersende alle venstr museklik til det klonede vindue (dette gør dig i stand til at udføre basis musefunktioner i det klonede vindue uden at skulle aktivere det). For at afslutte denne funktion skal du højreklikke på OnTopReplica og deaktivere "Click forwarding" i menuen. - - Position + + Click forwarding - - Gemte områder + + Ønskes gennem klik i fuldskærms tilstand? - - Gem + + Gennem klik virker kun hvis det er blevet aktiveret i gendan undermenuen og hvis vinduet er delvist gennemsigtigt. I denne tilstand vil fuld skærm vinduet opføre sig som et delvist gennemsigtigt lag, hvilket gør dig i stand til at klikke på de underliggende vinduer. For at komme tilbage til normal tilstand, dobbeltklik på OnTopReplica ikonet i meddelelsesområdet på proceslinjen. - - Lukker OnTopReplica. - - - Gendan sidste position og størrelse - - - Standard - - - Skjuler hoved vinduet og viser om boxen. - - - Bredde - - - Tilstande - - - Gennem klik tilstand - - - Højreklik her for at starte... - - - Nulstiller OnTopReplica indstillingerne og hoved vinduet. - - - Nulstil indstillinger? - - - Nulstil alle OnTopReplica indstillinger. - - - Nulstil vinduet helt? - - - Nulstil vinduet - - - Nulstil indstillingerne - - - Nulstil - - - Nulstil - - - Uigennemsigtighed - - - For at benytte den opdaterede udgave af OnTopReplica skal du genstarte programmet. - - - Du skal aktiverere "Windows Aero" som tema i Windows.For at gøre dette skal du højreklikke på skrivebordet og vælge personlige indstillinger. - - - Click forwarding - - - Click forwarding - - - Skift til vindue - - - Skifter til kilde vinduet og gemmer OnTopReplica. - - - Skifter til "område tilstand", der tillader dig at vælge et begrænset område af kildens vindue som miniature. - - - Vælger om OnTopReplica skal gemme sidst brugte størrelse og position, til næste gang det starter op. - - - Vælger Chrome kanten rundt om vinduet til/fra - - - Vælger "glas tilstand" til/fra - - - Ønsker du at aktivere "click forwarding"? - - - Ønskes gennem klik i fuldskærms tilstand? - - - Brug gennem klik. - - - FortsætInstaller OnTopReplica - - - Detaljer om Windows Aero - - - Fejl detaljer. - - - Detaljer - - - Tegn områder med musen - - - åben - - - Kan bruges til at nulstille alle indstillinger hvis du mister kontrollen over vinduet eller hvis det er flyttet uden for skærmen. - - - Opdatering tilgængelig. - - - Dette nulstiller OnTopReplica til standard indstillingerne (alle gemte informationer, som gemte områder, vil blive slettet). - - - OnTopReplice er opdateret. - - - Om... - - - Den nye version vil automatiskt blive downloaded og installeret. - - - En letvægts, live, miniature udgave af et vindue du vælger, der altid er øverst. - - - Kan ikke lave miniature. - - - Skrivebords komposition ikke understøttet - - - Kunne ikke passes til vinduet. - Nej. Du kan aktivere gennem klik senere. - - Sætter OnTopReplica til 50% uigennemsigtighed. + + Brug gennem klik. - - Sætter OnTopReplica til 75% uigennemsigtighed. - - - Sætter OnTopReplica til 25% uigennemsigtighed. - - - Får OnTopReplica til altid at være øverst. - - - Installeret version: {0}Tilgængelig version: {1}Download størrelse: {2} bytes - - - Sprog - - - Ingen miniature indlæst. - - - Minimere OnTopReplica til systembakken. - - - Kan ikke søge efter opdateringer. - - - Minimer til systembakken. - - - Færdig - - - Øverst højre - - - Sæt OnTopReplica til at være helt uigennemsigtig. - - - Øverst venstre - - - Glas - - - Windows Aero effekter er ikke slået til - - - Windows Aero effekter er ikke understøttet af dit styresystem. -Dette program kræver Windows Vista Home Premium eller bedre. - - - Hjemmeside: www.codeplex.com/ontopreplica. - - - Nederst venstre - - - Fejl: - - - Fejl - - - Lavet af: Lorenz Cuno Klopfenstein. - - - Fuld skærm - - - OnTopReplica vil opføre sig som en gennemsigtig film der lader dig klikke igennem til de underliggende vinduer. - - - Opfører sig som et almindeligt vindue. Du kan trække andre viduer ind over OnTopReplica. - - - Afslut fuldskærm tilstand. - - - OnTopReplica fuld skærm + + Gennem klik tilstand OnTopReplica er blevet opdateret. - - Aktuelt område: - - - OnTopReplica checker automatiskt for opdateringer. Der bliver ikke registreret nogen data på noget tidspunkt. - - - Opdater OnTopReplica nu. + + For at benytte den opdaterede udgave af OnTopReplica skal du genstarte programmet. Opdatering fuldført - - 1:2 halv + + OnTopReplice er opdateret. - - 25% + + Ingen opdateringer er tilgængelige - - 75% + + Sprog - - Gennem klik virker kun hvis det er blevet aktiveret i gendan undermenuen og hvis vinduet er delvist gennemsigtigt. + + Om... + + + Skjuler hoved vinduet og viser om boxen. + + + Krom + + + Vælger Chrome kanten rundt om vinduet til/fra + + + Click forwarding + + + Aktiver "click forwarding" til det klonede vindue Klikke igennem @@ -443,4 +283,169 @@ Dette program kræver Windows Vista Home Premium eller bedre. OnTopReplica vil opføre sig som en gennemsigtig film der lader dig klikke igennem til de underliggende vinduer. + + Luk + + + Lukker OnTopReplica. + + + 2:1 dobbelt + + + Fuld skærm + + + 1:2 halv + + + 1:1 Pas til vinduet + + + 1:4 kvart + + + Glas + + + Vælger "glas tilstand" til/fra + + + 100% (uigennemsigtig) + + + Sæt OnTopReplica til at være helt uigennemsigtig. + + + 25% + + + Sætter OnTopReplica til 25% uigennemsigtighed. + + + 50% + + + Sætter OnTopReplica til 50% uigennemsigtighed. + + + 75% + + + Sætter OnTopReplica til 75% uigennemsigtighed. + + + Uigennemsigtighed + + + åben + + + Viser OnTopReplica. + + + Nederst venstre + + + Nederst højre + + + Position + + + Sæt OnTopReplica automatiskt på den aktuelle skærm. + + + Øverst venstre + + + Øverst højre + + + Afslut fuldskærm tilstand. + + + Gendan sidste position og størrelse + + + Vælger om OnTopReplica skal gemme sidst brugte størrelse og position, til næste gang det starter op. + + + Minimer til systembakken. + + + Minimere OnTopReplica til systembakken. + + + Vælg område... + + + Skifter til "område tilstand", der tillader dig at vælge et begrænset område af kildens vindue som miniature. + + + Nulstil vinduet + + + Nulstiller OnTopReplica indstillingerne og hoved vinduet. + + + Genskab + + + Skift til vindue + + + Skifter til kilde vinduet og gemmer OnTopReplica. + + + Vælg vindue + + + - ingen - + + + Viser en liste af vinduer du kan bruge som miniature kilde. + + + - hele - + + + Aktuelt område: + + + Slet + + + Færdig + + + Højde + + + Nulstil + + + Gem + + + Gemte områder + + + Områder: + + + Bredde + + + Højreklik her for at starte... + + + En letvægts, live, miniature udgave af et vindue du vælger, der altid er øverst. + + + OnTopReplica checker automatiskt for opdateringer. Der bliver ikke registreret nogen data på noget tidspunkt. + + + Opdater nu! + \ No newline at end of file diff --git a/OnTopReplica/Strings.de.resx b/OnTopReplica/Strings.de.resx new file mode 100644 index 0000000..f50a611 --- /dev/null +++ b/OnTopReplica/Strings.de.resx @@ -0,0 +1,15 @@ + + + + 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/Strings.es.resx b/OnTopReplica/Strings.es.resx new file mode 100644 index 0000000..03bcda0 --- /dev/null +++ b/OnTopReplica/Strings.es.resx @@ -0,0 +1,90 @@ + + + + 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 + + + Cancelar actualización + + + Mostrar detalles acerca de OnTopReplica + + + Reiniciar la configuración de OnTopReplica + + + Actualizar OnTopReplica ahora + + + <html> + <head> + <style type="text/css"> +body { + font-family: Segoe UI, Arial, sans-serif; + font-size: 0.8em; + margin: 0; +padding: 0.75em; +} +h1 { + font-size: 1.4em; + font-weight: bold; + + margin: 1em 0 0.4em 0; + padding: 0; +} +p { + margin: 0.5em 0 0.5em 1em; + padding: 0; +} +a { + font-weight: bold; + color: blue; +} +a:hover { + color: red; +} + </style> + </head> + + <body> + + <h1>Licencia</h1> + + <p><b>OnTopReplica</b> cuenta con licencia <a href="http://opensource.org/licenses/ms-rl.html">Microsoft Reciprocal License (Ms-RL)</a>.</p> + <p>El código fuente original se encuentra en <a href="http://www.codeplex.com/ontopreplica">la página inicial del proyecto en CodePlex</a>.</p> + + <h1>Créditos</h1> + + <p><a href="http://insentient.net">Switcher</a> y otros programas basados en DWM inspiraron OnTopReplica.</p> + + <p>All Vista controls are part of the <a href="http://www.codeplex.com/windowsformsaero">WindowsFormsAero library</a> for .NET.</p> + + <p>Some example code taken from <a href="http://www.ookii.org">Ookii</a> on Channel9.</p> + + <p>NativeToolstripRenderer class taken from <a href="http://wp.asztal.net/2007/12/vista-style-menus-in-dotnet/">asztal.net</a>.</p> + + <p>Some icons from <a href="http://www.vistaico.com">VistaICO.com</a> and the Xiao icon set.</p> + + </body> +</html> + + + OnTopReplica + + + ¿Reiniciar la ventana? + + + &Reiniciar +Todas las configuraciones se perderán. + + \ No newline at end of file diff --git a/OnTopReplica/Strings.fi.resx b/OnTopReplica/Strings.fi.resx new file mode 100644 index 0000000..f50a611 --- /dev/null +++ b/OnTopReplica/Strings.fi.resx @@ -0,0 +1,15 @@ + + + + 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/Strings.it.Designer.cs b/OnTopReplica/Strings.it.Designer.cs deleted file mode 100644 index e69de29..0000000 diff --git a/OnTopReplica/Strings.it.resx b/OnTopReplica/Strings.it.resx index f827218..f8090e3 100644 --- a/OnTopReplica/Strings.it.resx +++ b/OnTopReplica/Strings.it.resx @@ -12,352 +12,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - OnTopReplica - - - Ripristinare completamente la finestra? - - - &Ripristina -Tutte le impostazioni saranno perse. - - - Può essere usato se si è perso il controllo della finestra o si è spostata oltre ai bordi dello schermo. - - - Ripristino - - - &Annulla - - - Creato da: Lorenz Cuno Klopfenstein. - - - Disegna una regione usando il mouse. - - - Dettagli su Windows Aero - - - Windows Aero è disponibile soltanto su Windows Vista Home Premium o superiore. - - - Il servizio di Desktop Composition Aero non è attivo. - - - È necessario attivare la "composizione del desktop" (DWM) selezionando "Windows Aero" come tema utilizzato da Windows. - -Per farlo, clicca col tasto destro del mouse sul desktop e poi su Personalizza. - - - Dettagli errore - - - Errore: - - - Sembra che la finestra selezionata sia stata chiusa o che non sia più valida. - - - Errore - - - La "composzione del desktop" non è supportata dal tuo sistema operativo. -È necessario utilizzare Windows Vista o superiore per avviare OnTopReplica. - - - Desktop Composition (DWM) non supportato - - - Impossibile clonare la finestra. - - - Impossibile adattare la finestra. - - - Sito internet: www.codeplex.com/ontopreplica. - - - A proposito di... - - - Nasconde la finestra principale e mostra una schermata di informazioni. - - - Seleziona più finestre per attivare. - - - Modalità Gruppo attivata. - - - Chiudi - - - Termina OnTopReplica. - - - 2:1 Doppio - - - Tutto schermo - - - 1:2 Metà - - - 1:1 Clone esatto - - - 1:4 Quarto - - - Effetto vetro - - - Abilita o disabilita l'effetto vetro. - - - 100% (opaco) - - - Imposta OnTopReplica come finestra completamente opaca. - - - 25% - - - Imposta l'opacità di OnTopReplica al 25%. - - - 50% - - - Imposta l'opacità di OnTopReplica al 50%. - - - 75% - - - Imposta l'opacità di OnTopReplica al 75%. - - - Opacità - - - Apri - - - Attiva la finestra di OnTopReplica. - - - In basso a sinistra - - - In basso a destra - - - Posizione - - - Posiziona automaticamente OnTopReplica sul monitor corrente. - - - In alto a sinistra - - - In alto a destra - - - Ripristina posizione e grandezza - - - Imposta se, al prossimo avvio di OnTopReplica, debbano essere ripristinati i valori di grandezza e posizione della finestra alla chiusura. - - - Minimizza - - - Riduce OnTopReplica ad un'icona nella barra delle applicazioni. - - - Seleziona regione... - - - Passa alla modalità di "selezione di regione", che permette di limitare la porzione di finestra che viene clonata. - - - Reimposta finestra - - - Reimposta OnTopReplica e la sua finestra principale. - - - Ridimensionamento - - - Vai alla finestra originale - - - Mostra la finestra originale e nasconde OnTopReplica. - - - Seleziona finestra - - - - nessuna - - - - Mostra una lista di finestre che è possibile clonare. - - - Clic destro qui per iniziare... - - - Una copia leggera, in tempo reale e sempre in primo piano di una finestra a tua scelta. - - - OnTopReplica controlla automaticamente se sono presenti aggiornamenti. - - - Aggiorna! - - - Installare OnTopReplica {0}? - - - Annulla aggiornamento -OnTopReplica si aggiornerà in un secondo momento. - - - Continua -Installa OnTopReplica {0}. - - - La nuova versione sarà scaricata ed installata automaticamente. - - - Versione installata: {0} -Versione disponibile: {1} -Grandezza: {2} bytes - - - Aggiornamento disponibile - - - Dettagli - - - Nessuna finestra clonata al momento. - - - Impossibile controllare gli aggiornamenti. - - - Sembra che OnTopReplica non sia stato installato usando 'ClickOnce'. Sarà necessario aggiornare manualmente il programma visitando <a href="http://ontopreplica.codeplex.com">la homepage del progetto</a>. - - - OnTopReplica è stato aggiornato. - - - Per utilizzare la nuova versione di OnTopReplica è necessario riavviare l'applicazione. - - - Aggiornamento completato - - - La versione più aggiornata è già installata. - - - Nessun aggiornamento disponibile - - - Attivare la modalità Click-Through? - - - La modalità "Click-Through" funziona solo se l'opzione è stata attivata e se la finestra è semitrasparente. - - - In questa modalità la finestra clonata si comporterà come una maschera semitrasparente che permette di cliccare sulle finestre dietro di essa. - -Per tornare alla modalità normale in qualsiasi momento, attiva OnTopReplica (dalla barra delle applicazioni). - - - Modalità Click-Through - - - Finestre - - - Modalità Gruppo di finestre: - - - No, grazie. -Puoi abilitare il Click-Through in futuro - - - Abilita Click-Through - - - Inoltro dei clic - - - Attiva la modalità di "inoltro dei clic" alla finestra clonata. - - - Esci da tutto schermo - - - Lingua - - - Regioni: - - - Salva - - - Cancella - - - Regione corrente: - - - Largh. - - - Altezz. - - - Reset - - - Chiudi - - - Regioni memorizzate - - - Attivare la modalità di inoltro dei clic? - - - Inoltro dei clic - - - In questa modalità, OnTopReplica inoltrerà tutti i clic del pulsante sinistro sul clone della finestra alla finestra originale (questo permetterà di interagire in maniera basilare con la finestra clonata, senza averla in primo piano). - -Per uscire da questa modalità, usa il tasto ESC. - - - Resettare impostazioni? - - - Questa procedura resetterà tutte le impostazioni di OnTopReplica e cancellerà tutte le informazioni memorizzate (come, ad esempio, le regioni salvate). - - - Reimposta - Annulla il processo di aggiornamento. @@ -423,11 +77,118 @@ a:hover { </body> </html> - - - intera - + + OnTopReplica - - OnTopReplica a pieno schermo + + Ripristinare completamente la finestra? + + + &Ripristina +Tutte le impostazioni saranno perse. + + + Può essere usato se si è perso il controllo della finestra o si è spostata oltre ai bordi dello schermo. + + + Ripristino + + + Resettare impostazioni? + + + Questa procedura resetterà tutte le impostazioni di OnTopReplica e cancellerà tutte le informazioni memorizzate (come, ad esempio, le regioni salvate). + + + Reimposta + + + Scaricare OnTopReplica {0}? + {0} update version + + + Annulla aggiornamento +OnTopReplica si aggiornerà in un secondo momento. + + + Continua +Scarica OnTopReplica {0}. + {0} update version + + + Sarà possibile scaricare la nuova versione ed installarla. + + + Versione installata: {0} +Versione disponibile: {1} + {0} installed version number +{1} online available version number + + + Aggiornamento disponibile + + + &Annulla + + + Creato da: Lorenz Cuno Klopfenstein. + + + Disegna una regione usando il mouse. + + + Dettagli + + + Dettagli su Windows Aero + + + Windows Aero è disponibile soltanto su Windows Vista Home Premium o superiore. + + + Il servizio di Desktop Composition Aero non è attivo. + + + È necessario attivare la "composizione del desktop" (DWM) selezionando "Windows Aero" come tema utilizzato da Windows. + +Per farlo, clicca col tasto destro del mouse sul desktop e poi su Personalizza. + + + Dettagli errore + + + Errore: + + + Sembra che la finestra selezionata sia stata chiusa o che non sia più valida. + + + Errore + + + La "composzione del desktop" non è supportata dal tuo sistema operativo. +È necessario utilizzare Windows Vista o superiore per avviare OnTopReplica. + + + Desktop Composition (DWM) non supportato + + + Nessuna finestra clonata al momento. + + + Impossibile clonare la finestra. + + + Impossibile adattare la finestra. + + + Impossibile controllare gli aggiornamenti. + + + Sembra che OnTopReplica non sia stato installato usando 'ClickOnce'. Sarà necessario aggiornare manualmente il programma visitando <a href="http://ontopreplica.codeplex.com">la homepage del progetto</a>. + + + Non è stato possibile controllare se esiste una versione più aggiornata di OnTopReplica. Verificare di essere connessi ad Internet. Se la connessione è attiva, è possibile che il sito ufficiale sia temporaneamente offline. Modalità @@ -450,31 +211,277 @@ a:hover { Si comporta come una finestra normale. Puoi portare altre finestre sopra OnTopReplica. + + OnTopReplica a pieno schermo + + + Disattiva + + + Abilita modalità + + + Seleziona più finestre per attivare. + + + Modalità Gruppo attivata. + + + Modalità Gruppo di finestre: + + + Finestre + Column Header of list, simply refers to available windows to be cloned + + + Sito internet: www.codeplex.com/ontopreplica. + + + Attivare la modalità di inoltro dei clic? + + + In questa modalità, OnTopReplica inoltrerà tutti i clic del pulsante sinistro sul clone della finestra alla finestra originale (questo permetterà di interagire in maniera basilare con la finestra clonata, senza averla in primo piano). + +Per uscire da questa modalità, usa il tasto ESC. + + + Inoltro dei clic + + + Attivare la modalità Click-Through? + + + La modalità "Click-Through" funziona solo se l'opzione è stata attivata e se la finestra è semitrasparente. + + + In questa modalità la finestra clonata si comporterà come una maschera semitrasparente che permette di cliccare sulle finestre dietro di essa. + +Per tornare alla modalità normale in qualsiasi momento, attiva OnTopReplica (dalla barra delle applicazioni). + + + No, grazie. +Puoi abilitare il Click-Through in futuro + + + Abilita Click-Through + + + Modalità Click-Through + + + OnTopReplica è stato aggiornato. + + + Per utilizzare la nuova versione di OnTopReplica è necessario riavviare l'applicazione. + + + Aggiornamento completato + + + La versione più aggiornata è già installata. + + + Nessun aggiornamento disponibile + + + Lingua + + + A proposito di... + + + Nasconde la finestra principale e mostra una schermata di informazioni. + + + Avanzate + Bordo Abilita o disabilita il bordo della finestra. + + Inoltro dei clic + + + Attiva la modalità di "inoltro dei clic" alla finestra clonata. + Abilita Click-Through OnTopReplica si comporterà come una schermata trasparente, permettendo di cliccare sulle finestre al di sotto di essa. + + Chiudi + + + Termina OnTopReplica. + + + 2:1 Doppio + + + Tutto schermo + + + 1:2 Metà + + + 1:1 Clone esatto + + + 1:4 Quarto + + + Effetto vetro + + + Abilita o disabilita l'effetto vetro. + Modalità Gruppo di finestre OnTopReplica clonerà automaticamente una finestra di un gruppo, scegliendo quella che non è stata in primo piano da più tempo. - - Abilita modalità + + 100% (opaco) - - Disattiva + + Imposta OnTopReplica come finestra completamente opaca. - - Avanzate + + 25% + + + Imposta l'opacità di OnTopReplica al 25%. + + + 50% + + + Imposta l'opacità di OnTopReplica al 50%. + + + 75% + + + Imposta l'opacità di OnTopReplica al 75%. + + + Opacità + + + Apri + + + Attiva la finestra di OnTopReplica. + + + In basso a sinistra + + + In basso a destra + + + Posizione + + + Posiziona automaticamente OnTopReplica sul monitor corrente. + + + In alto a sinistra + + + In alto a destra + + + Esci da tutto schermo + + + Ripristina posizione e grandezza + + + Imposta se, al prossimo avvio di OnTopReplica, debbano essere ripristinati i valori di grandezza e posizione della finestra alla chiusura. + + + Minimizza + + + Riduce OnTopReplica ad un'icona nella barra delle applicazioni. + + + Seleziona regione... + + + Passa alla modalità di "selezione di regione", che permette di limitare la porzione di finestra che viene clonata. + + + Reimposta finestra + + + Reimposta OnTopReplica e la sua finestra principale. + + + Ridimensionamento + + + Vai alla finestra originale + + + Mostra la finestra originale e nasconde OnTopReplica. + + + Seleziona finestra + + + - nessuna - + + + Mostra una lista di finestre che è possibile clonare. + + + - intera - + + + Regione corrente: + + + Cancella + + + Chiudi + + + Altezz. + + + Reset + + + Salva + + + Regioni memorizzate + + + Regioni: + + + Largh. + + + Clic destro qui per iniziare... + + + Una copia leggera, in tempo reale e sempre in primo piano di una finestra a tua scelta. + + + OnTopReplica controlla automaticamente se sono presenti aggiornamenti. + + + Aggiorna! \ No newline at end of file diff --git a/OnTopReplica/Strings.no.resx b/OnTopReplica/Strings.no.resx new file mode 100644 index 0000000..f50a611 --- /dev/null +++ b/OnTopReplica/Strings.no.resx @@ -0,0 +1,15 @@ + + + + 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/Strings.pt.resx b/OnTopReplica/Strings.pt.resx new file mode 100644 index 0000000..f50a611 --- /dev/null +++ b/OnTopReplica/Strings.pt.resx @@ -0,0 +1,15 @@ + + + + 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/Strings.resx b/OnTopReplica/Strings.resx index f0d5c5a..670c5a7 100644 --- a/OnTopReplica/Strings.resx +++ b/OnTopReplica/Strings.resx @@ -12,352 +12,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 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 - - - &Cancel - - - Created by: Lorenz Cuno Klopfenstein. - - - Draw regions using mouse. - - - 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 - - - 'Desktop Composition' is not supported on your Operating System. -You must run this application on Windows Vista Home Premium or better. - - - Desktop Composition unsupported - - - Unable to create thumbnail. - - - Unable to fit window. - - - Homepage: www.codeplex.com/ontopreplica. - - - About... - - - Hides the main window and displays the "about" box. - - - Select multiple windows to enable. - - - Group switch mode is enabled. - - - 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. - - - 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 - - - Position - - - Automatically position OnTopReplica on the current screen. - - - Top Left - - - Top Right - - - 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. - - - 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! - - - Install OnTopReplica {0}? - - - Cancel update -OnTopReplica will prompt you the next time it is started. - - - Proceed -Install OnTopReplica {0}. - - - The new version will be automatically downloaded and installed. - - - Installed version: {0} -Available version: {1} -Download size: {2} bytes - - - Update available - - - Details - - - No thumbnail loaded. - - - 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 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 - - - 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). - - - Click-Through mode - - - Windows - - - Group switch mode: - - - No, thank you. -You can enable click-through later - - - Use Click-Through - - - Enable Click forwarding - - - Enable "click forwarding" to the cloned window. - - - Quit fullscreen mode - - - Language - - - Regions: - - - Save - - - Delete - - - Current region: - - - Width - - - Height - - - Reset - - - Done - - - Stored regions - - - Do you want to enable "click forwarding"? - - - 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. - - - 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 - Abort update process. @@ -423,11 +77,118 @@ a:hover { </body> </html> - - - whole - + + OnTopReplica - - OnTopReplica fullscreen + + 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 + + + Cancel update +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. + + + Installed version: {0} +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. + + + 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 + + + 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 @@ -450,31 +211,277 @@ a:hover { 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. + + + 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). + + + 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 + Chrome Toggles the display of the window chrome. + + 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. - - Enable Group mode + + 100% (opaque) - - Disable + + Sets OnTopReplica to be completely opaque. - - Advanced + + 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 + + + Position + + + 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! \ No newline at end of file diff --git a/OnTopReplica/Strings.ru.resx b/OnTopReplica/Strings.ru.resx new file mode 100644 index 0000000..f50a611 --- /dev/null +++ b/OnTopReplica/Strings.ru.resx @@ -0,0 +1,15 @@ + + + + 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/Update/UpdateCheckCompletedEventArgs.cs b/OnTopReplica/Update/UpdateCheckCompletedEventArgs.cs new file mode 100644 index 0000000..6482835 --- /dev/null +++ b/OnTopReplica/Update/UpdateCheckCompletedEventArgs.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OnTopReplica.Update { + class UpdateCheckCompletedEventArgs : EventArgs { + + public UpdateInformation Information { get; set; } + + public bool Success { get; set; } + + public Exception Error { get; set; } + + } +} diff --git a/OnTopReplica/Update/UpdateInformation.cs b/OnTopReplica/Update/UpdateInformation.cs new file mode 100644 index 0000000..f605223 --- /dev/null +++ b/OnTopReplica/Update/UpdateInformation.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml.Serialization; +using System.IO; +using System.Xml; + +namespace OnTopReplica.Update { + + /// + /// Contains information about the latest OnTopReplica update available. + /// + public class UpdateInformation { + + Version _latestVersion; + + /// + /// Gets the latest available version of the software. + /// + [XmlIgnore] + public Version LatestVersion { + get { + return _latestVersion; + } + set { + _latestVersion = value; + } + } + + [XmlElement("latestVersion")] + public string LatestVersionInternal { + get { + return _latestVersion.ToString(); + } + set { + _latestVersion = new Version(value); + } + } + + /// + /// Indicates when the latest version was released. + /// + [XmlElement("latestVersionRelease")] + public DateTime LatestVersionRelease { get; set; } + + /// + /// Gets the URL of the page that allows the user to download the updated installer. + /// + [XmlElement("downloadPage")] + public string DownloadPage { get; set; } + + /// + /// Deserializes an UpdateInformation object from a stream. + /// + public static UpdateInformation Deserialize(Stream source) { + var serializer = new XmlSerializer(typeof(UpdateInformation)); + var info = serializer.Deserialize(source) as UpdateInformation; + return info; + } + + public static string Serialize(UpdateInformation information) { + var serializer = new XmlSerializer(typeof(UpdateInformation)); + var sb = new StringBuilder(); + using(var writer = new StringWriter(sb)){ + serializer.Serialize(writer, information); + } + return sb.ToString(); + } + + } + +} diff --git a/OnTopReplica/Update/UpdateManager.cs b/OnTopReplica/Update/UpdateManager.cs new file mode 100644 index 0000000..b114b83 --- /dev/null +++ b/OnTopReplica/Update/UpdateManager.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Text; +using System.Net.Cache; +using System.IO; +using System.Reflection; +using VistaControls.TaskDialog; +using System.Diagnostics; +using System.Windows.Forms; + +namespace OnTopReplica.Update { + + class UpdateManager { + + const string UpdateManifestUrl = "http://www.klopfenstein.net/public/Uploads/ontopreplica/update.xml"; + + public void CheckForUpdate() { + //Build web request + var request = (HttpWebRequest)HttpWebRequest.Create(UpdateManifestUrl); + request.AllowAutoRedirect = true; + request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip; + request.CachePolicy = new RequestCachePolicy(RequestCacheLevel.BypassCache); + + //Begin async request... + request.BeginGetResponse(new AsyncCallback(EndCheckForUpdate), request); + } + + private void EndCheckForUpdate(IAsyncResult result) { + HttpWebRequest request = (HttpWebRequest)result.AsyncState; + + try { + var response = request.EndGetResponse(result); + var info = UpdateInformation.Deserialize(response.GetResponseStream()); + + OnUpdateCheckSuccess(info); + } + catch (Exception ex) { + OnUpdateCheckError(ex); + return; + } + } + + public event EventHandler UpdateCheckCompleted; + + protected virtual void OnUpdateCheckError(Exception ex) { + var evt = UpdateCheckCompleted; + if (evt != null) { + evt(this, new UpdateCheckCompletedEventArgs { + Success = false, + Error = ex + }); + } + } + + protected virtual void OnUpdateCheckSuccess(UpdateInformation information) { + var evt = UpdateCheckCompleted; + if (evt != null) { + evt(this, new UpdateCheckCompletedEventArgs { + Success = true, + Information = information + }); + } + } + + /// + /// Handles the results of an update check. Must be called from main GUI thread. + /// + /// The retrieved update information. + /// Determines if the lack of updated should be notified to the user. + public void HandleUpdateCheck(Form parent, UpdateInformation information, bool verbose) { + if (information == null) + return; + + var currentVersion = Assembly.GetExecutingAssembly().GetName().Version; + + if (information.LatestVersion > currentVersion) { + //New version found + var dlg = new TaskDialog( + string.Format(Strings.AskUpdate, information.LatestVersion), + Strings.AskUpdateTitle, + Strings.AskUpdateContent) { + CustomButtons = new CustomButton[] { + new CustomButton(Result.OK, string.Format(Strings.AskUpdateButtonOk, information.LatestVersion)), + new CustomButton(Result.Cancel, Strings.AskUpdateButtonCancel) + }, + UseCommandLinks = true, + CommonIcon = TaskDialogIcon.Information, + ExpandedInformation = string.Format(Strings.AskUpdateExpanded, currentVersion, information.LatestVersion) + }; + + if (dlg.Show(parent).CommonButton == Result.OK) { + Process.Start(information.DownloadPage); + } + } + else if(verbose) { + //No updates, but need to inform the user + var dlg = new TaskDialog(Strings.InfoUpToDate, Strings.InfoUpToDateTitle) { + CommonButtons = TaskDialogButton.OK, + CommonIcon = TaskDialogIcon.Information, + Footer = information.LatestVersion.ToString() + }; + dlg.Show(); + } + } + + } + +} diff --git a/OriginalAssets/new-icon.png b/OriginalAssets/new-icon.png new file mode 100644 index 0000000..dfa49b4 Binary files /dev/null and b/OriginalAssets/new-icon.png differ