public static SEBDesktopController.WindowCollection GetWindows(string desktop)
 {
     if (!SEBDesktopController.Exists(desktop))
     {
         return((SEBDesktopController.WindowCollection)null);
     }
     return(SEBDesktopController.OpenDesktop(desktop).GetWindows());
 }
 public static Process CreateProcess(string path, string desktop)
 {
     if (!SEBDesktopController.Exists(desktop))
     {
         return((Process)null);
     }
     return(SEBDesktopController.OpenDesktop(desktop).CreateProcess(path));
 }
Beispiel #3
0
        /// <summary>
        /// Enumerates the windows on a desktop.
        /// </summary>
        /// <param name="windows">Array of Desktop.Window objects to recieve windows.</param>
        /// <returns>A window colleciton if successful, otherwise null.</returns>
        public static WindowCollection GetWindows(string desktop)
        {
            if (!SEBDesktopController.Exists(desktop))
            {
                return(null);
            }

            // get windows.
            SEBDesktopController d = SEBDesktopController.OpenDesktop(desktop);

            return(d.GetWindows());
        }
Beispiel #4
0
        /// <summary>
        /// Creates a new process on the specified desktop.
        /// </summary>
        /// <param name="path">Path to application.</param>
        /// <param name="desktop">Desktop name.</param>
        /// <returns>A Process object for the newly created process, otherwise, null.</returns>
        public static Process CreateProcess(string path, string desktop)
        {
            if (!SEBDesktopController.Exists(desktop))
            {
                return(null);
            }

            // create the process.
            SEBDesktopController d = SEBDesktopController.OpenDesktop(desktop);

            return(d.CreateProcess(path));
        }
 public bool Open(string name)
 {
     this.CheckDisposed();
     if (this.m_desktop != IntPtr.Zero && !this.Close())
     {
         return(false);
     }
     this.m_desktop = SEBDesktopController.OpenDesktop(name, 0U, true, 511U);
     if (this.m_desktop == IntPtr.Zero)
     {
         return(false);
     }
     this.m_desktopName = name;
     return(true);
 }
Beispiel #6
0
 /// <summary>
 /// Opens the default desktop.
 /// </summary>
 /// <returns>If successful, a Desktop object, otherwise, null.</returns>
 public static SEBDesktopController OpenDefaultDesktop()
 {
     // opens the default desktop.
     return(SEBDesktopController.OpenDesktop("Default"));
 }
 public static SEBDesktopController OpenDefaultDesktop()
 {
     return(SEBDesktopController.OpenDesktop("Default"));
 }