Example #1
0
        /// <summary>
        /// This function
        /// 1) creates the score, 
        /// 2) opens it in the program currently set in Windows for opening SVG files.
        /// </summary>
        private void CreateSVGScore()
        {
            try
            {
                List<Krystal> krystals = null;
                List<Palette> palettes = null;
                GetKrystalsAndPalettes(out krystals, out palettes);
                PageFormat pageFormat = GetPageFormat();
                ComposableSvgScore score =
                    new KrystalPaletteScore(_scoreTitle,
                                            _algorithm,
                                            pageFormat,
                                            krystals, palettes,
                                            _settingsFolderPath,
                                            _dimensionsAndMetadataForm.Keywords,
                                            _dimensionsAndMetadataForm.Comment);

                if(score != null && score.Systems.Count > 0)
                {
                    score.SaveMultiPageScore();
                    score.SaveSingleSVGScore();
                    // Opens the multi-page score in the program which is set by the system to open .svg files.
                    global::System.Diagnostics.Process.Start(score.FilePath);
                }
            }
            catch(Exception ex)
            {
                string msg = "Failed to create score, or to open it in the browser.\r\n\r\n"
                    + "Exception message: " + ex.Message;
                MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Example #2
0
        /// <summary>
        /// This function
        /// 1) creates the score, 
        /// 2) opens it in the program currently set in Windows for opening SVG files.
        /// </summary>
        private void CreateSVGScore()
        {
            List<Krystal> krystals = null;
            List<Palette> palettes = null;
            GetKrystalsAndPalettes(out krystals, out palettes);
            PageFormat pageFormat = GetPageFormat();
            _algorithm.GetInitialClefPerChannel(pageFormat);
            ComposableScore score =
                new KrystalPaletteScore(_scoreTitle,
                                        _algorithm,
                                        pageFormat,
                                        krystals, palettes,
                                        _settingsFolderPath,
                                        _dimensionsAndMetadataForm.Keywords,
                                        _dimensionsAndMetadataForm.Comment);

            if(score != null && score.Systems.Count > 0)
            {
                score.SaveMultiPageScore();
                score.SaveSingleSVGScore();
                // Opens the multi-page score in the program which is set by the system to open .svg files.
                global::System.Diagnostics.Process.Start(score.FilePath);
            }
        }