mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-20 20:33:06 +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() {
|
||||
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>
|
||||
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)]
|
||||
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) {
|
||||
ToolTipText = Strings.MenuOpenTT,
|
||||
},
|
||||
new ToolStripMenuItem(Strings.MenuWindows, Resources.window16){
|
||||
new ToolStripMenuItem(Strings.MenuWindows, Resources.list){
|
||||
DropDown = Form.MenuWindows,
|
||||
ToolTipText = Strings.MenuWindowsTT
|
||||
},
|
||||
|
|
|
@ -116,8 +116,12 @@ namespace OnTopReplica {
|
|||
/// </summary>
|
||||
public Size ThumbnailOriginalSize {
|
||||
get {
|
||||
if (_thumbnail != null && !_thumbnail.IsInvalid)
|
||||
return (_regionEnabled) ? _regionCurrent.Size : _thumbnail.SourceSize;
|
||||
if (_thumbnail != null && !_thumbnail.IsInvalid) {
|
||||
if (_regionEnabled)
|
||||
return _regionCurrent.Size;
|
||||
|
||||
return _thumbnail.SourceSize;
|
||||
}
|
||||
else
|
||||
throw new Exception(Strings.ErrorNoThumbnail);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue