public static bool Show(string name) { using (SEBDesktopController desktopController = new SEBDesktopController()) { if (!desktopController.Open(name)) { return(false); } return(desktopController.Show()); } }
/// <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); }
/// <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; }