Beispiel #1
0
        private void btOpenFileFolder_Click(object sender, RoutedEventArgs e)
        {
            TreeView tr = this.FindName("treeVResource") as TreeView;

            System.Xml.XmlCharacterData kk = tr.SelectedItem as System.Xml.XmlCharacterData;
            MessageBox.Show(kk.Value);
        }
Beispiel #2
0
 protected TextFlowLayout(IContainer parent, XmlCharacterData t, int start)
     : this(parent, t)
 {
     // TODO: L: this is confusing since TrimStart changes ignoreStart
     TrimStart(start);
     ignoreStart=0;
     Debug.Assert(len > 0, "TextFragment must be non-empty!");
 }
        private void Serialize(XmlCharacterData node)
        {
            var val = node.Value.Trim();
            var len = val.Length;

            if (len <= 0) {
                return;
            }

            var done = 0;
            do {
                var remains = Math.Min(len - done, 0x7FFF);
                Serialize(TEXT_NODE);
                Serialize(val.Substring(done, remains));
                done += remains;
            } while (done < len);
        }
Beispiel #4
0
        public void core0001T()
        {
            string computedValue = "";
            string expectedValue = "Roger\n Jones";

            System.Xml.XmlNode          testNode     = null;
            System.Xml.XmlCharacterData testNodeData = null;

            testResults results = new testResults("Core0001T");

            try
            {
                results.description = "If there is no markup language in a block of text, " +
                                      "then the content of the text is contained into " +
                                      "an object implementing the Text interface that is " +
                                      "the only child of the element.";
                //
                // Retrieve the second child of the second employee and access its
                // textual data.
                //
                testNode = util.nodeObject(util.THIRD, util.SECOND);
                testNode.Normalize();
                testNodeData  = (System.Xml.XmlCharacterData)testNode.FirstChild;
                computedValue = testNodeData.Value;
            }
            catch (System.Exception ex)
            {
                computedValue = "Exception " + ex.Message;
            }

            //
            // Write out results
            //
            results.expected = expectedValue;
            results.actual   = computedValue;

            Assert.AreEqual(results.expected, results.actual);
        }
 void ValidateText(XmlCharacterData text)
 {
     this.nsResolver.Context = text;
     CheckCharacters();
     validator.ValidateText(new XmlValueGetter(GetText));
 }
 public XmlCharacterDataTreeNode(XmlCharacterData characterData)
 {
     this.characterData = characterData;
 }
Beispiel #7
0
 public TextLiteralLayout(IContainer parent, XmlCharacterData t, int start)
     : this(parent, t)
 {
     TrimStart(start);
     Debug.Assert(len > 0, "TextFragment must be non-empty!");
 }
Beispiel #8
0
 public TextLiteralLayout(IContainer parent, XmlCharacterData t)
     : base(parent, t)
 {
 }
Beispiel #9
0
        public TextLayoutBase(IContainer parent, XmlCharacterData t)
            : base(parent)
        {
            width=-1;
            height=-1;
            ascent=-1;

            textNode=t;
            len=t.Value.Length;
        }
 protected XmlCharacterDataTreeNode(XmlCharacterData characterData)
 {
     this.characterData = characterData;
 }
 /// <summary>
 /// Compares textual content.
 /// </summary>
 private ComparisonResult CompareCharacterData(XmlCharacterData control,
                                               XPathContext controlContext,
                                               XmlCharacterData test,
                                               XPathContext testContext)
 {
     return Compare(new Comparison(ComparisonType.TEXT_VALUE, control,
                                   GetXPath(controlContext),
                                   control.Data,
                                   test, GetXPath(testContext),
                                   test.Data));
 }
Beispiel #12
0
 /// <summary>
 /// Creates a new XML doc text node.
 /// </summary>
 /// <param name="text">The raw XML data to wrap.</param>
 public XmlDocTextNode(XmlCharacterData text)
     : base(text)
 {
     Contract.Requires(text != null);
 }