public static bool Show(string name)
 {
     using (SEBDesktopController desktopController = new SEBDesktopController())
     {
         if (!desktopController.Open(name))
         {
             return(false);
         }
         return(desktopController.Show());
     }
 }
コード例 #2
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);
        }
コード例 #3
0
ファイル: SEBDesktopController.cs プロジェクト: t00/seb
        /// <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;
        }