Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        private void DisplayError(string message)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            OutputLog.Error(message);
            MessageWindow.Display(new MessageContent(message));
        }
Esempio n. 3
0
        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));
            }
        }