コード例 #1
0
 public void EnsureWindowObject(Win32Workspace workspace)
 {
     if (m_windowObject == null)
     {
         var window = new Win32Window(workspace, Handle);
         Interlocked.CompareExchange(ref m_windowObject, window, null);
     }
 }
コード例 #2
0
        internal Win32VirtualDesktopManager(Win32Workspace workspace, IWin32VirtualDesktopService vds, IntPtr hMon)
        {
            m_workspace = workspace;
            m_desktops  = new List <Win32VirtualDesktop>();
            m_hMon      = hMon;
            m_vds       = vds;

            foreach (var d in m_vds.GetVirtualDesktops(m_hMon))
            {
                m_desktops.Add(new Win32VirtualDesktop(workspace, m_vds, d));
            }

            m_currentDesktop = m_vds.GetCurrentDesktopIndex(m_hMon);
        }
コード例 #3
0
 internal Win32Window(Win32Workspace workspace, IntPtr hwnd)
 {
     m_workspace   = workspace;
     m_hwnd        = hwnd;
     m_isDead      = false;
     m_oldHwndPrev = GetPreviousWindow()?.Handle ?? IntPtr.Zero;
     try
     {
         m_title = GetTitle();
     }
     catch (Win32Exception e) when(e.IsTimeoutException())
     {
         m_title = GetClassName() + " (Not Responding)";
     }
     catch (Win32Exception)
     {
         m_title = "";
     }
 }
コード例 #4
0
 public Win32DisplayManager(Win32Workspace workspace)
 {
     m_workspace    = workspace;
     m_displays     = new HashSet <Win32Display>(GetMonitors().Select(x => new Win32Display(this, x)));
     PrimaryDisplay = m_displays.First(x => x.Bounds.TopLeft == new Point(0, 0));
 }
コード例 #5
0
 internal Win32VirtualDesktop(Win32Workspace workspace, IWin32VirtualDesktopService vds, object desktop)
 {
     m_workspace = workspace;
     m_vds       = vds;
     m_desktop   = desktop;
 }