Example #1
0
        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]));
            }
        }
Example #2
0
 public BackgroundWindows(FrigoForm owner, WindowFinder finder)
 {
     foreach (WindowHandle window in finder.ToolWindows.Reverse())
     {
         backgrounds.Add(new BackgroundWindow(owner, window));
     }
 }
Example #3
0
 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();
 }
Example #4
0
 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));
 }