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); }
public string GetClientStatusDescription(MOG_Command command) { // Describe the current command of this connection string description = ""; // Check if this was a registered slave reporting? switch (command.GetCommandType()) { case MOG_COMMAND_TYPE.MOG_COMMAND_RegisterSlave: description = "Idle"; // Get the contained command this slave is working on MOG_Command slaveTask = command.GetCommand(); if (slaveTask != null) { // Check if we have a ProjectName specified? if (slaveTask.GetProject().Length > 0) { // Add on our ProjectName description = "PROJECT: " + slaveTask.GetProject(); } // Check if there is an encoded platform in this command? if (slaveTask.GetPlatform().Length > 0) { // Get the slave's active platform description += " PLATFORM: " + slaveTask.GetPlatform(); } // Check if we have a UserName specified? if (slaveTask.GetUserName().Length > 0) { // Add on our ProjectName description += " USER: "******" COMMAND: " + slaveTask.ToString(); // Make sure we are in the same project if (string.Compare(slaveTask.GetProject(), MOG_ControllerProject.GetProjectName(), true) == 0) { // Check if we have an asset specified? if (slaveTask.GetAssetFilename().GetAssetName().Length > 0) { // Build the slave's description description += " ASSET: " + slaveTask.GetAssetFilename().GetAssetName(); } } } break; default: // 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: " + command.GetTab(); } // Check if we have a Platform specified? if (command.GetPlatform().Length > 0) { description += " PLATFORM: " + command.GetPlatform(); } // Check if we have a Tab specified? if (command.GetUserName().Length > 0) { description += " INBOX: " + command.GetUserName(); } break; } return(description); }