// Constructor public TaskBarWindow(EnumWindowsItem window) { if (window == null) { return; } ForceName = false; Handle = (long)window.Handle; OriginalName = window.Text; }
/// <summary> /// Add a new Window to the collection. Intended for /// internal use by EnumWindows only. /// </summary> /// <param name="hWnd">Window handle to add</param> public void Add(IntPtr hWnd) { EnumWindowsItem item = new EnumWindowsItem(hWnd); this.InnerList.Add(item); }
public void Follower() { EnumWindowsItem childWindow = WC.GetChildWindow("Map", ""); if (childWindow != null) { goto Label_0253; } return; Label_0249: Thread.Sleep(0x14d); Label_0253: if (WC.Hwnd2ID(childWindow.Handle) != 0) { try { int x = WC.winGetPosition(this.ParentHwnd).X; int y = WC.winGetPosition(this.ParentHwnd).Y; int width = WC.winGetSize(this.ParentHwnd).Width; int height = WC.winGetSize(this.ParentHwnd).Height; int num5 = WC.winGetPosition(this.ExternalHwnd).X; int num6 = WC.winGetPosition(this.ExternalHwnd).Y; int num7 = WC.winGetSize(this.ExternalHwnd).Width; int num8 = WC.winGetSize(this.ExternalHwnd).Height; if (this.followsParent) { switch (this.winHanLocation) { case WindowHandlingLocation.TopLeft2mid: WC.winSetPosition(this.ExternalHwnd, x + this.offsetX, y + this.offsetY); goto Label_0249; case WindowHandlingLocation.TopRight2mid: WC.winSetPosition(this.ExternalHwnd, ((x + width) - num7) - this.offsetX, y + this.offsetY); goto Label_0249; case WindowHandlingLocation.BottomLeft2mid: WC.winSetPosition(this.ExternalHwnd, x + this.offsetX, ((y + height) - num8) - this.offsetY); goto Label_0249; case WindowHandlingLocation.BottomRight2mid: WC.winSetPosition(this.ExternalHwnd, ((x + width) - num7) - this.offsetX, ((y + height) - num8) - this.offsetY); goto Label_0249; } } else { switch (this.winHanLocation) { case WindowHandlingLocation.TopLeft2mid: WC.winSetPosition(this.ParentHwnd, num5 + this.offsetX, num6 + this.offsetY); goto Label_0249; case WindowHandlingLocation.TopRight2mid: WC.winSetPosition(this.ParentHwnd, ((num5 + num7) - width) - this.offsetX, num6 + this.offsetY); goto Label_0249; case WindowHandlingLocation.BottomLeft2mid: WC.winSetPosition(this.ParentHwnd, num5 + this.offsetX, ((num6 + num8) - height) - this.offsetY); goto Label_0249; case WindowHandlingLocation.BottomRight2mid: WC.winSetPosition(this.ParentHwnd, ((num5 + num7) - width) - this.offsetX, ((num6 + num8) - height) - this.offsetY); goto Label_0249; } } } catch { this.Toggle(false); } goto Label_0249; } }