mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-06-03 11:04:32 +12:00
Minor changes.
This commit is contained in:
parent
759be7cb3d
commit
5c2808c0d4
|
@ -40,5 +40,12 @@ namespace OnTopReplica.Native {
|
||||||
public System.Drawing.Rectangle ToRectangle() {
|
public System.Drawing.Rectangle ToRectangle() {
|
||||||
return new System.Drawing.Rectangle(Left, Top, Right - Left, Bottom - Top);
|
return new System.Drawing.Rectangle(Left, Top, Right - Left, Bottom - Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public System.Drawing.Size Size {
|
||||||
|
get {
|
||||||
|
return new System.Drawing.Size(Width, Height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,9 @@ namespace OnTopReplica.Native {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static class WindowMethods {
|
static class WindowMethods {
|
||||||
|
|
||||||
|
[DllImport("user32.dll", SetLastError = true)]
|
||||||
|
public static extern bool GetClientRect(IntPtr handle, out NRectangle rect);
|
||||||
|
|
||||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||||
static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount);
|
static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount);
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace OnTopReplica {
|
||||||
new ToolStripMenuItem(Strings.MenuOpen, Resources.icon, TaskIconOpen_click) {
|
new ToolStripMenuItem(Strings.MenuOpen, Resources.icon, TaskIconOpen_click) {
|
||||||
ToolTipText = Strings.MenuOpenTT,
|
ToolTipText = Strings.MenuOpenTT,
|
||||||
},
|
},
|
||||||
new ToolStripMenuItem(Strings.MenuWindows, Resources.window16){
|
new ToolStripMenuItem(Strings.MenuWindows, Resources.list){
|
||||||
DropDown = Form.MenuWindows,
|
DropDown = Form.MenuWindows,
|
||||||
ToolTipText = Strings.MenuWindowsTT
|
ToolTipText = Strings.MenuWindowsTT
|
||||||
},
|
},
|
||||||
|
|
|
@ -116,8 +116,12 @@ namespace OnTopReplica {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Size ThumbnailOriginalSize {
|
public Size ThumbnailOriginalSize {
|
||||||
get {
|
get {
|
||||||
if (_thumbnail != null && !_thumbnail.IsInvalid)
|
if (_thumbnail != null && !_thumbnail.IsInvalid) {
|
||||||
return (_regionEnabled) ? _regionCurrent.Size : _thumbnail.SourceSize;
|
if (_regionEnabled)
|
||||||
|
return _regionCurrent.Size;
|
||||||
|
|
||||||
|
return _thumbnail.SourceSize;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
throw new Exception(Strings.ErrorNoThumbnail);
|
throw new Exception(Strings.ErrorNoThumbnail);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue