/// <summary> /// Makes the selected assets the current version in the current branch /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MakeCurrentMenuItem_Click(object sender, System.EventArgs e) { try { ArrayList selectedItems = ControlGetSelectedItems(); ArrayList assetFilenames = new ArrayList(); // Scan the list and prepare it for delivery to the DLL string message = ""; foreach (guiAssetTreeTag tag in selectedItems) { if (tag.Execute) { MOG_Filename filename = new MOG_Filename(tag.FullFilename); if (filename.GetFilenameType() == MOG_FILENAME_TYPE.MOG_FILENAME_Asset) { assetFilenames.Add(filename); } message = message + filename.GetAssetFullName() + "\n"; } } // Check if this request effects more than 1 asset?? if (selectedItems.Count > 1) { if (MOG_Prompt.PromptResponse("Are you sure you want to make all of these assets the current versions?", message, MOGPromptButtons.OKCancel) != MOGPromptResult.OK) { return; } } // Stamp all the specified assets if (MOG_ControllerProject.MakeAssetCurrentVersion(assetFilenames, "Made current by " + MOG_ControllerProject.GetUserName_DefaultAdmin())) { // Check if this request effects more than 1 asset?? if (selectedItems.Count > 1) { // Inform the user this may take a while MOG_Prompt.PromptResponse("Completed", "This change requires Slave processing.\n" + "The project will not reflect these changes until all slaves have finished processing the generated commands.\n" + "The progress of this task can be monitored in the Connections Tab."); } } else { MOG_Prompt.PromptMessage("Make Current Failed", "The system was unable to fully complete the task!", Environment.StackTrace); } } catch (Exception ex) { MOG_Report.ReportMessage("MakeCurrent Exception", ex.Message, ex.StackTrace, MOG.PROMPT.MOG_ALERT_LEVEL.CRITICAL); } }