public string GetClientStatusDescription(MOG_Command command) { MOG_CommandServerCS commandServer = (MOG_CommandServerCS)MOG_ControllerSystem.GetCommandManager(); // Describe the current command of this connection string description = ""; // Check if we have a ProjectName specified? if (command.GetProject().Length > 0) { // Add on our ProjectName description += "PROJECT: " + command.GetProject(); } // Check if we have a ProjectName specified? if (command.GetBranch().Length > 0) { // Add on our ProjectName description += " BRANCH: " + command.GetBranch(); } // Check if we have a UserName specified? if (command.GetUserName().Length > 0) { // Add on our ProjectName description += " USER: "******" TAB: " + viewsCommand.GetTab(); } // Check if we have a Platform specified? if (viewsCommand.GetPlatform().Length > 0) { description += " PLATFORM: " + viewsCommand.GetPlatform(); } // Check if we have a Tab specified? if (viewsCommand.GetUserName().Length > 0) { description += " INBOX: " + viewsCommand.GetUserName(); } } return(description); }
public string GetDetailedCommandDescription(MOG_Command command) { MOG_CommandServerCS commandServer = (MOG_CommandServerCS)MOG_ControllerSystem.GetCommandManager(); // Describe the current command of this connection string description = ""; // Check if this command is a MOG_COMMAND_RegisterClient? // Check if this command is a MOG_COMMAND_RegisterEditor? switch (command.GetCommandType()) { case MOG_COMMAND_TYPE.MOG_COMMAND_RegisterClient: case MOG_COMMAND_TYPE.MOG_COMMAND_RegisterEditor: case MOG_COMMAND_TYPE.MOG_COMMAND_LoginProject: case MOG_COMMAND_TYPE.MOG_COMMAND_LoginUser: case MOG_COMMAND_TYPE.MOG_COMMAND_ActiveViews: // Indicate the LoginProject if (command.GetProject() != null && command.GetProject().Length > 0) { if (description.Length > 0) { description = String.Concat(description, ", "); } description = String.Concat(description, command.GetProject()); } // Indicate the LoginUser if (command.GetUserName() != null && command.GetUserName().Length > 0) { if (description.Length > 0) { description = String.Concat(description, ", "); } description = String.Concat(description, command.GetUserName()); } // Attempt to locate the current view settings for this client MOG_Command viewsCommand = commandServer.LocateActiveViewByID(command.GetNetworkID()); if (viewsCommand != null) { // Attempt to show the ActiveTab if (viewsCommand.GetTab() != null && viewsCommand.GetTab().Length > 0) { if (description.Length > 0) { description = String.Concat(description, ", "); } description = String.Concat(description, viewsCommand.GetTab()); } // Attempt to show the ActivePlatform if (viewsCommand.GetPlatform() != null && viewsCommand.GetPlatform().Length > 0) { if (description.Length > 0) { description = String.Concat(description, ", "); } description = String.Concat(description, viewsCommand.GetPlatform()); } // Attempt to show the ActiveUser if (viewsCommand.GetUserName() != null && viewsCommand.GetUserName().Length > 0) { if (description.Length > 0) { description = String.Concat(description, ", "); } description = String.Concat(description, viewsCommand.GetUserName()); } } return(description); } description = command.ToString(); // If there is an Asset associated with the command?, show it as well if (command.GetAssetFilename().GetFilename().Length != 0) { if (command.GetAssetFilename().GetUserName().Length > 0) { description = String.Concat(description, " for ", command.GetAssetFilename().GetUserName()); if (command.GetAssetFilename().GetFilenameType() == MOG_FILENAME_TYPE.MOG_FILENAME_SlaveTask) { string temp; int start, len; temp = command.GetAssetFilename().GetPath(); start = command.GetAssetFilename().GetBoxPath().Length + 1; len = temp.LastIndexOf("\\") - start; if (start > 0 && len != -1) { temp = temp.Substring(start, len); description = String.Concat(description, " - ", temp); } } else { description = String.Concat(description, " - ", command.GetAssetFilename().GetFilename()); } } } return(description); }