Minor changes.

This commit is contained in:
Lorenz Cuno Klopfenstein 2010-08-02 23:52:28 +02:00
parent 759be7cb3d
commit 5c2808c0d4
4 changed files with 17 additions and 3 deletions

View file

@ -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);
}
}
}
}

View file

@ -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);

View file

@ -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
},

View file

@ -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);
}