コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BuildStyle"/> class with
        /// the specified style type.
        /// </summary>
        /// <param name="type">
        /// An enumeration of the type <see cref="BuildStyleType"/> specifying the type
        /// of the transformation and presentation style.
        /// </param>
        public BuildStyle(BuildStyleType type)
        {
            _styleType   = type;
            _scripts     = new ScriptContent("CommonScripts");
            _styleSheets = new StyleSheetContent("CommonStyleSheets");
            _snippets    = new SnippetContent("CommonSnippets");

            _mathPackages = new MathPackageContent();
            _mathCommands = new MathCommandContent();

            string sandAssistDir = Path.GetDirectoryName(
                Assembly.GetExecutingAssembly().Location);

            string codeStyleFile = Path.Combine(sandAssistDir,
                                                @"Styles\IrisModifiedVS.css");
            string assistStyleFile = Path.Combine(sandAssistDir,
                                                  String.Format(@"Styles\{0}\SandAssist.css",
                                                                BuildStyle.StyleFolder(type)));

            StyleSheetItem codeStyle = new StyleSheetItem("CodeStyle",
                                                          codeStyleFile);

            codeStyle.Condition = "CodeHighlight";
            _styleSheets.Add(codeStyle);
            StyleSheetItem assistStyle = new StyleSheetItem("AssistStyle",
                                                            assistStyleFile);

            _styleSheets.Add(assistStyle);

            string assistScriptFile = Path.Combine(sandAssistDir,
                                                   String.Format(@"Scripts\{0}\SandAssist.js",
                                                                 BuildStyle.StyleFolder(type)));
            ScriptItem assistScript = new ScriptItem("AssistScripts",
                                                     assistScriptFile);

            _scripts.Add(assistScript);
        }