Skip to content

Commit

Permalink
Merge branch 'release/2.2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Mar 21, 2016
2 parents 868bc6a + 6337d74 commit 1d49c6c
Show file tree
Hide file tree
Showing 29 changed files with 5,043 additions and 4,450 deletions.
19 changes: 19 additions & 0 deletions AEMManager/AemActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public static void AddOpenMenuItems(Menu.MenuItemCollection pParent, AemInstance
item.Click += new EventHandler(OpenFelixConsole);
menuItems.Add(item);

item = new MenuItem();
item.Text = "Open Folder";
item.Click += new EventHandler(OpenFolder);
menuItems.Add(item);

if (pInstance.AemInstanceType == AemInstanceType.AEM54) {
item = new MenuItem();
item.Text = "Open Servlet Engine Admin";
Expand Down Expand Up @@ -119,6 +124,20 @@ private static void OpenFelixConsole(object sender, EventArgs e) {
OpenUrl(instance.UrlWithContextPath + "/system/console", instance);
}

private static void OpenFolder(object sender, EventArgs e) {
AemInstance instance = Program.GetActionInstance(sender);
if (instance == null) {
return;
}

string folder = instance.PathWithoutFilename;
if (!Directory.Exists(folder)) {
return;
}
mLog.Info("Open Folder: " + folder);
System.Diagnostics.Process.Start(folder);
}

private static void OpenServletEngineAdmin(object sender, EventArgs e) {
AemInstance instance = Program.GetActionInstance(sender);
if (instance == null) {
Expand Down
28 changes: 5 additions & 23 deletions AEMManager/AemManager.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions AEMManager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.1.2.0")]
[assembly: AssemblyFileVersion("2.1.2.0")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]

// Configure log4net using the .config file
[assembly: log4net.Config.XmlConfiguratorAttribute(Watch = true)]
Binary file modified AEMManager/resources/iconset_inv_q/0.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/1.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/2.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/3.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/4.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/5.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/6.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/7.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/8.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_inv_q/9.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/0.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/1.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/2.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/3.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/4.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/5.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/6.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/7.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/8.ico
Binary file not shown.
Binary file modified AEMManager/resources/iconset_q/9.ico
Binary file not shown.
58 changes: 48 additions & 10 deletions AEMManager/util/SystemUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,71 @@ static class SystemUtil {
public static void SaveWindowPos(Form pfrm) {
RegistryKey key = RegistryUtil.GetUserKey(pfrm);

if (pfrm.WindowState != FormWindowState.Minimized) {
key.SetValue("WindowPos_WindowState", (int)pfrm.WindowState);
if (pfrm.MaximizeBox) {
if (pfrm.WindowState != FormWindowState.Minimized) {
key.SetValue("WindowPos_WindowState", (int)pfrm.WindowState);
}
pfrm.WindowState = FormWindowState.Normal;
}
pfrm.WindowState = FormWindowState.Normal;
key.SetValue("WindowPos_WindowWidth", pfrm.Size.Width);
key.SetValue("WindowPos_WindowHeight", pfrm.Size.Height);

key.SetValue("WindowPos_WindowX", pfrm.Location.X);
key.SetValue("WindowPos_WindowY", pfrm.Location.Y);

if (pfrm.FormBorderStyle == FormBorderStyle.Sizable || pfrm.FormBorderStyle == FormBorderStyle.SizableToolWindow) {
key.SetValue("WindowPos_WindowWidth", pfrm.Size.Width);
key.SetValue("WindowPos_WindowHeight", pfrm.Size.Height);
}

key.Close();
}

/// <summary>
/// Restores the last saved position/state of given form from the registry.
/// </summary>
/// <param name="pfrm">Form instance</param>
public static void RestoreWindowPos(Form pfrm) {
public static void RestoreWindowPos(Form pfrm, int left = 0, int top = 0, int width = 0, int height = 0, FormWindowState windowState = FormWindowState.Normal) {
RegistryKey key = RegistryUtil.GetUserKey(pfrm);
try {
pfrm.Size = new Size((int)key.GetValue("WindowPos_WindowWidth"), (int)key.GetValue("WindowPos_WindowHeight"));
pfrm.Location = new Point((int)key.GetValue("WindowPos_WindowX"), (int)key.GetValue("WindowPos_WindowY"));
pfrm.WindowState = (FormWindowState)key.GetValue("WindowPos_WindowState");
pfrm.Location = new Point((int)key.GetValue("WindowPos_WindowX", left), (int)key.GetValue("WindowPos_WindowY", top));
if (pfrm.FormBorderStyle == FormBorderStyle.Sizable || pfrm.FormBorderStyle == FormBorderStyle.SizableToolWindow) {
pfrm.Size = new Size((int)key.GetValue("WindowPos_WindowWidth", width), (int)key.GetValue("WindowPos_WindowHeight", height));
}
if (pfrm.MaximizeBox) {
pfrm.WindowState = (FormWindowState)key.GetValue("WindowPos_WindowState", windowState);
}
}
catch (Exception) {
if (left > 0 && top > 0) {
pfrm.Location = new Point(left, top);
}
if (pfrm.FormBorderStyle == FormBorderStyle.Sizable || pfrm.FormBorderStyle == FormBorderStyle.SizableToolWindow) {
if (width > 0 && height > 0) {
pfrm.Size = new Size(width, height);
}
}
if (pfrm.MaximizeBox) {
pfrm.WindowState = windowState;
}
}
catch (Exception) { }
finally {
key.Close();
}

if (pfrm.FormBorderStyle == FormBorderStyle.Sizable || pfrm.FormBorderStyle == FormBorderStyle.SizableToolWindow) {
if (pfrm.Width > SystemInformation.VirtualScreen.Width) {
pfrm.Width = SystemInformation.VirtualScreen.Width - 20;
}
if (pfrm.Height > SystemInformation.VirtualScreen.Height) {
pfrm.Height = SystemInformation.VirtualScreen.Height - 20;
}
}
if (pfrm.Left + pfrm.Width > SystemInformation.VirtualScreen.Width) {
pfrm.Left = SystemInformation.VirtualScreen.Width - pfrm.Width - 10;
}
if (pfrm.Top + pfrm.Height > SystemInformation.VirtualScreen.Height) {
pfrm.Top = SystemInformation.VirtualScreen.Height - pfrm.Height - 10;
}

}

}
Expand Down
2 changes: 1 addition & 1 deletion AEMManagerSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="AEM Manager" Language="1033" UpgradeCode="58391141-13e1-403c-9fa6-3759099bdb29"
Manufacturer="wcm.io"
Version="2.1.2.0">
Version="2.2.0.0">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of AEM Manager is already installed." />
Expand Down
Binary file modified AEMManagerSetup/resources/WixUIBannerBmp.bmp
Binary file not shown.
Binary file modified AEMManagerSetup/resources/WixUIDialogBmp.bmp
Binary file not shown.
6 changes: 6 additions & 0 deletions resources/icons/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
AEM Manager Icons
=================

Icons are defined via the AI file `cubes.ai'.

They are exported as PNG and converted to ICO files via https://iconverticons.com/online/
9,376 changes: 4,962 additions & 4,414 deletions resources/icons/cubes.ai

Large diffs are not rendered by default.

0 comments on commit 1d49c6c

Please sign in to comment.