public ApplicationWindows(FrigoForm owner, WindowFinder finder) { Selected.Changed += (oldWindow, newWindow) => { if (oldWindow != null) { oldWindow.Selected.Value = false; } if (newWindow != null) { newWindow.Selected.Value = true; } }; Visible.Changed += (oldValue, value) => { foreach (ApplicationWindow window in windows) { window.Visible = value; } }; Layout layout = new Layout(finder.Windows); foreach (WindowHandle handle in finder.Windows) { windows.Add(new ApplicationWindow(owner, handle, windows.Count, layout.Bounds[handle])); } }
public BackgroundWindows(FrigoForm owner, WindowFinder finder) { foreach (WindowHandle window in finder.ToolWindows.Reverse()) { backgrounds.Add(new BackgroundWindow(owner, window)); } }
public ApplicationWindow(FrigoForm owner, WindowHandle application, int index, Rectangle bounds) { Bounds = bounds; Owner = owner; ExStyle |= WindowExStyles.Transparent | WindowExStyles.Layered; Application = application; Selected.Changed += (x, y) => RenderOverlay(); this.index = index; thumbnail = new Thumbnail(application, owner.WindowHandle); thumbnail.SetDestinationRect(new Rect(Bounds).ScreenToClient(owner.WindowHandle)); layerUpdater = new LayerUpdater(this); windowIcon = new WindowIcon(application); windowIcon.Changed += RenderOverlay; RenderOverlay(); }
public BackgroundWindow(FrigoForm owner, WindowHandle window) { thumbnail = new Thumbnail(window, owner.WindowHandle); thumbnail.SetSourceRect(window.GetRect().ScreenToClient(window)); thumbnail.SetDestinationRect(window.GetRect().ScreenToClient(owner.WindowHandle)); }