public DictionaryForMidsProperties(PublicationInformation projInfo, DictionaryForMIDsStyle contentStyles)
 {
     var myPath = Path.GetDirectoryName(projInfo.DefaultXhtmlFileWithPath);
     Debug.Assert(myPath != null);
     _styles = contentStyles;
     Sw = new StreamWriter(Common.PathCombine(myPath, "DictionaryForMIDs.properties"));
     DictionaryAbbreviation = "SIL";
     Language1NumberOfContentDeclarations = _styles.NumStyles;
 }
        public DictionaryForMidsProperties(PublicationInformation projInfo, DictionaryForMIDsStyle contentStyles)
        {
            var myPath = Path.GetDirectoryName(projInfo.DefaultXhtmlFileWithPath);

            Debug.Assert(myPath != null);
            _styles = contentStyles;
            Sw      = new StreamWriter(Common.PathCombine(myPath, "DictionaryForMIDs.properties"));
            DictionaryAbbreviation = "SIL";
            Language1NumberOfContentDeclarations = _styles.NumStyles;
        }
Ejemplo n.º 3
0
 public void AddAfterTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("sena3-ipa.xhtml");
     projInfo.DefaultCssFileWithPath = _testFiles.Input("sena3-ipa.css");
     var cssTree = new CssTree();
     CssClass = cssTree.CreateCssProperty(projInfo.DefaultCssFileWithPath, true);
     var ContentStyles = new DictionaryForMIDsStyle();
     var rec = new DictionaryForMIDsRec { CssClass = CssClass, Styles = ContentStyles };
     var input = new DictionaryForMIDsInput(projInfo);
     var node = input.SelectNodes("//*[@class = 'xsensenumber']")[0];
     rec.AddAfter(node);
     Assert.AreEqual(") ", rec.Rec);
 }
Ejemplo n.º 4
0
 public void AddStyleTagTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("sena3-imba.xhtml");
     projInfo.DefaultCssFileWithPath = _testFiles.Input("sena3-imba.css");
     var cssTree = new CssTree();
     CssClass = cssTree.CreateCssProperty(projInfo.DefaultCssFileWithPath, true);
     var ContentStyles = new DictionaryForMIDsStyle();
     var rec = new DictionaryForMIDsRec {CssClass = CssClass, Styles = ContentStyles};
     var input = new DictionaryForMIDsInput(projInfo);
     var node = input.SelectNodes("//*[@class = 'partofspeech']//text()")[0];
     rec.AddStyleTag(node);
     Assert.AreEqual(2, ContentStyles.NumStyles);
 }
Ejemplo n.º 5
0
 public void AddStyleTagLangTest()
 {
     PublicationInformation projInfo = new PublicationInformation();
     projInfo.DefaultXhtmlFileWithPath = _testFiles.Input("wasp.xhtml");
     projInfo.DefaultCssFileWithPath = _testFiles.Input("wasp.css");
     var cssTree = new CssTree();
     CssClass = cssTree.CreateCssProperty(projInfo.DefaultCssFileWithPath, true);
     var ContentStyles = new DictionaryForMIDsStyle();
     var rec = new DictionaryForMIDsRec { CssClass = CssClass, Styles = ContentStyles };
     var input = new DictionaryForMIDsInput(projInfo);
     var node = input.SelectNodes("(//*[@class='xitem'])/*")[1];
     rec.AddStyleTag(node);
     Assert.AreEqual(2, ContentStyles.NumStyles);
     Assert.AreEqual("153,51,102", rec.Styles.FontColor(2));
 }