Esempio n. 1
0
 public void ResultTwoLevelTree()
 {
     var clsCSS = new CssParser();
     var filePath = Common.DirectoryPathReplace(testPath + "/twolevelsample1.css");
     var Node = clsCSS.BuildTree(filePath);
     resultTLNode.Nodes.Add((TreeNode)Node.Clone());
 }
Esempio n. 2
0
        /// <summary>
        /// Browse button allows user to enter file and then produces results.
        /// </summary>
        /// <param name="sender">originator of message</param>
        /// <param name="e">arguments for message</param>
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.DefaultExt = "CSS";
            dlg.Filter = "Cascading Style Sheet (*.css)|*.css";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                var clsBL = new CssParser();
                TreeNode node = clsBL.BuildTree(dlg.FileName);
                treeView1.Nodes.Clear();
                treeView1.Nodes.Add((TreeNode)node.Clone());

                textBox1.Text = clsBL.ErrorText;

                CSSinput.Text = dlg.FileName;
            }
        }
Esempio n. 3
0
 public Dictionary<string, Dictionary<string, string>> CreateCssProperty(string cssSourceFile, bool setDefaultPageValue)
 {
     var cssTree = new CssParser();
     cssTree.OutputType = OutputType;
     Common._outputType = OutputType;
     TreeNode node = cssTree.BuildTree(cssSourceFile);
     _cssClass.Clear();
     ProcessCSSTree(node);
     if (OutputType != Common.OutputType.EPUB)
     {
         SetLeftRightFirstPage(setDefaultPageValue);
     }
     cssBorderColor = _mapProperty.CssBorderColor;
     if (OutputType != Common.OutputType.EPUB)
     {
         SetDefaultTagProperty();
     }
     return _cssClass;
 }
Esempio n. 4
0
 public void ResultDoubleClassCSS()
 {
     var clsCSS = new CssParser();
     var filePath = Common.DirectoryPathReplace(testPath + "/DoubleClassFile.css");
     var Node = clsCSS.BuildTree(filePath);
     resultDCNode.Nodes.Add((TreeNode)Node.Clone());
 }
Esempio n. 5
0
 public void BuildTreeTest3()
 {
     _methodName = "BuildTreeTest3 - EmptyCSSValidate1 ";
     RemoveCSS();
     var clsCSS = new CssParser();
     var filePath = testPath + "/emptyCSS.css";
     var Node = clsCSS.BuildTree(filePath);
     EmptyNode.Nodes.Add((TreeNode)Node.Clone());
     var cnt = EmptyNode.Nodes[0].Nodes.Count;
     Assert.AreEqual(0, cnt, _methodName + " test failed");
 }
Esempio n. 6
0
 public void ResultOxesPropertyTree()
 {
     var clsCSS = new CssParser();
     var filePath = Common.DirectoryPathReplace(testPath + "/OxesCase.css");
     var Node = clsCSS.BuildTree(filePath);
     resultOSNode.Nodes.Add((TreeNode)Node.Clone());
 }
Esempio n. 7
0
 public void ResultMultiLineSyntaxTree()
 {
     var clsCSS = new CssParser();
     var filePath = Common.DirectoryPathReplace(testPath + "/MultiLineSyntax.css");
     var Node = clsCSS.BuildTree(filePath);
     resultMLSNode.Nodes.Add((TreeNode)Node.Clone());
 }
Esempio n. 8
0
 public void ResultRemoveUnderscoreTree()
 {
     var clsCSS = new CssParser();
     var filePath = Common.DirectoryPathReplace(testPath + "/Underscore.css");
     var Node = clsCSS.BuildTree(filePath);
     resultRUSNode.Nodes.Add((TreeNode)Node.Clone());
 }
Esempio n. 9
0
 public void ResultInhertitParentClassPropertyTree()
 {
     var clsCSS = new CssParser();
     var filePath = Common.DirectoryPathReplace(testPath + "/InhertitParentClassPropertyFile.css");
     var Node = clsCSS.BuildTree(filePath);
     resultIPCPNode.Nodes.Add((TreeNode)Node.Clone());
 }