static public void ShowActiveTimeline() { ThreadHelper.ThrowIfNotOnUIThread(); Document doc = GetActiveDocument(); if (doc == null) { MessageWindow.Display(new MessageContent("Unable to get the active document.")); return; } string filename = Path.GetFileName(doc.FullName).ToLower(); var compilerData = CompilerData.Instance; var unit = compilerData.GetUnitByName(filename); if (unit != null) { Timeline.CompilerTimeline.Instance.DisplayTimeline(unit); return; } var value = compilerData.GetValue(CompilerData.CompileCategory.Include, filename); if (value != null) { Timeline.CompilerTimeline.Instance.DisplayTimeline(value.MaxUnit, value); return; } MessageWindow.Display(new MessageContent("Unable to find the compile score timeline for " + filename)); }
private void DisplayError(string message) { ThreadHelper.ThrowIfNotOnUIThread(); OutputLog.Error(message); MessageWindow.Display(new MessageContent(message)); }
static public void OpenFile(string filename) { ThreadHelper.ThrowIfNotOnUIThread(); //TODO ~ ramonv ~ try first as a full path ( export full paths if possible from the score data on new version ) var item = FindFilenameInProject(filename); if (item != null) { var win = item.Open(); if (win != null) { win.Activate(); } } else { MessageWindow.Display(new MessageContent("Unable to find the file: " + filename)); } }