예제 #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

              if (e.Args.Length == 11)
              {
            WriteToConsole("Called with args:");
            for (int i = 0; i < e.Args.Length; i++)
            {
              WriteToConsole((i + 1) + ": " + e.Args[i]);
            }

             ((MainWindow)Current.MainWindow).ViewModel.LoadMusicXMLFileCommand.Execute();

            var doc = new ScoreDocument(e.Args[0]);
            doc.Title = e.Args[1];
            doc.SubTitle = e.Args[2];
            doc.Pattern = int.Parse(e.Args[3]);
            doc.Composer = e.Args[4];
            doc.Texter = e.Args[5];
            doc.ArrangedBy = e.Args[6];
            doc.ExportPDF = e.Args[7] == "True";
            doc.ExportPNG = e.Args[8] == "True";
            doc.ExtractVoice = e.Args[9] == "True";
            doc.RemoveLabels = e.Args[10] == "True";
              }
        }
예제 #2
0
 public HistoryEntry(ScoreDocument doc)
 {
     Title = doc.Title.Trim();
       SubTitle = doc.SubTitle.Trim();
       Composer = doc.Composer.Trim();
       Pattern = doc.Pattern;
       ExportPNG = doc.ExportPNG;
       ExportPDF = doc.ExportPDF;
       ExtractVoice = doc.ExtractVoice;
       RemoveLabels = doc.RemoveLabels;
       Texter = doc.Texter.Trim();
       ArrangedBy = doc.ArrangedBy.Trim();
 }
예제 #3
0
        public void Add(ScoreDocument doc)
        {
            _isUpdating = true;
              var historyEntry = new HistoryEntry(doc);
              foreach (var olderEntry in History.Where(e => e.Title == historyEntry.Title).ToList())
              {
            History.Remove(olderEntry);
              }

              History.Add(historyEntry);
              _isUpdating = false;

              SaveHistory();
        }
예제 #4
0
 public void ApplyToScoreDocument(ScoreDocument doc)
 {
     doc.Title = Title;
       doc.SubTitle = SubTitle;
       doc.Composer = Composer;
       doc.Pattern = Pattern;
       doc.ExportPNG = ExportPNG;
       doc.ExportPDF = ExportPDF;
       doc.ExtractVoice = ExtractVoice;
       doc.RemoveLabels = RemoveLabels;
       doc.Texter = Texter;
       doc.ArrangedBy = ArrangedBy;
 }
예제 #5
0
        private void TrySaveNext(string xmlFileName, int pattern)
        {
            if (!File.Exists(xmlFileName))
              {
            return;
              }

              var tempDoc = new ScoreDocument(xmlFileName, true);
              tempDoc.Title = Title;
              tempDoc.SubTitle = SubTitle;
              tempDoc.ArrangedBy = ArrangedBy;
              tempDoc.Composer = Composer;
              tempDoc.Texter = Texter;
              tempDoc.Pattern = pattern;
              tempDoc.ExportPDF = ExportPDF;
              tempDoc.ExportPNG = ExportPNG;
              tempDoc.ExtractVoice = false;
              tempDoc.RemoveLabels = RemoveLabels;
              tempDoc.Save();
        }