/// <summary> /// Handle a workspace that want to be disconnected. /// </summary> public void HandleKwsToDisconnect(Workspace kws) { if (!kws.InKasConnectTree()) return; // Remove the workspace from the KAS connection tree. kws.RemoveFromKasConnectTree(); // Request an update of the UI since the connection status may // have changed. kws.StateChangeUpdate(true); // Disconnect the KAS if no workspace want to be connected. if (kws.Kas.KwsConnectTree.Count == 0) DisconnectKas(kws.Kas); }
/// <summary> /// Handle a workspace that want to be connected. /// </summary> public void HandleKwsToConnect(Workspace kws) { if (kws.InKasConnectTree()) return; // Add the workspace to the KAS connect tree. kws.AddToKasConnectTree(); // Request an update of the UI since the connection status may // have changed. kws.StateChangeUpdate(true); // Run our state machine if this is the first connection request. if (kws.Kas.KwsConnectTree.Count == 1) RequestRun("KAS connection request"); }