public static SEBDesktopController OpenDesktop(string name)
        {
            SEBDesktopController desktopController = new SEBDesktopController();

            if (!desktopController.Open(name))
            {
                return((SEBDesktopController)null);
            }
            return(desktopController);
        }
        public object Clone()
        {
            this.CheckDisposed();
            SEBDesktopController desktopController = new SEBDesktopController();

            if (this.IsOpen)
            {
                desktopController.Open(this.m_desktopName);
            }
            return((object)desktopController);
        }
 public static bool Show(string name)
 {
     using (SEBDesktopController desktopController = new SEBDesktopController())
     {
         if (!desktopController.Open(name))
         {
             return(false);
         }
         return(desktopController.Show());
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Opens a desktop.
        /// </summary>
        /// <param name="name">The name of the desktop to open.</param>
        /// <returns>If successful, a Desktop object, otherwise, null.</returns>
        public static SEBDesktopController OpenDesktop(string name)
        {
            // open the desktop.
            SEBDesktopController desktop = new SEBDesktopController();
            bool result = desktop.Open(name);

            // something went wrong
            if (!result)
            {
                return(null);
            }

            return(desktop);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Creates a new Desktop object with the same desktop open.
        /// </summary>
        /// <returns>Cloned desktop object.</returns>
        public object Clone()
        {
            // make sure object isnt disposed.
            CheckDisposed();

            SEBDesktopController desktop = new SEBDesktopController();

            // if a desktop is open, make the clone open it.
            if (IsOpen)
            {
                desktop.Open(m_desktopName);
            }

            return(desktop);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Switches to the specified desktop.
        /// </summary>
        /// <param name="name">Name of desktop to switch input to.</param>
        /// <returns>True if desktops were successfully switched.</returns>
        public static bool Show(string name)
        {
            // attmempt to open desktop.
            bool result = false;

            using (SEBDesktopController d = new SEBDesktopController())
            {
                result = d.Open(name);

                // something went wrong.
                if (!result)
                {
                    return(false);
                }

                // attempt to switch desktops.
                result = d.Show();
            }

            return(result);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Creates a new Desktop object with the same desktop open.
        /// </summary>
        /// <returns>Cloned desktop object.</returns>
        public object Clone()
        {
            // make sure object isnt disposed.
            CheckDisposed();

            SEBDesktopController desktop = new SEBDesktopController();

            // if a desktop is open, make the clone open it.
            if (IsOpen) desktop.Open(m_desktopName);

            return desktop;
        }
Exemplo n.º 8
0
        /// <summary>
        /// Switches to the specified desktop.
        /// </summary>
        /// <param name="name">Name of desktop to switch input to.</param>
        /// <returns>True if desktops were successfully switched.</returns>
        public static bool Show(string name)
        {
            // attmempt to open desktop.
            bool result = false;

            using (SEBDesktopController d = new SEBDesktopController())
            {
                result = d.Open(name);

                // something went wrong.
                if (!result) return false;

                // attempt to switch desktops.
                result = d.Show();
            }

            return result;
        }
Exemplo n.º 9
0
        /// <summary>
        /// Opens a desktop.
        /// </summary>
        /// <param name="name">The name of the desktop to open.</param>
        /// <returns>If successful, a Desktop object, otherwise, null.</returns>
        public static SEBDesktopController OpenDesktop(string name)
        {
            // open the desktop.
            SEBDesktopController desktop = new SEBDesktopController();
            bool result = desktop.Open(name);

            // something went wrong
            if (!result) return null;

            return desktop;
        }