コード例 #1
0
 static LineFragment()
 {
     Sample = new LineFragments(
         new LineFragment(new Line("Line # 1 of text", 0, 10), 0, null, String.Empty),
         new LineFragment(new Line("Line # 1 of text", 0, 10), 0, null, String.Empty),
         new LineFragment(new Line("Line # 1 of text", 0, 10), 0, null, String.Empty),
         new LineFragment(new Line("Line # 2 of text", 0, 10), 1, 0, "Chunk #1"),
         new LineFragment(new Line("Line # 2 of text", 0, 10), 1, 1, "Chunk #2"),
         new LineFragment(new Line("Line # 2 of text", 0, 10), 1, 2, "Chunk #3"),
         new LineFragment(new Line("Line # 6 of text", 0, 10), 2, 0, "Replacement #6"),
         new LineFragment(new Line("Line # 7 of text", 0, 10), 3, 0, "Replacement #7"));
 }
コード例 #2
0
        static ResultsViewModel()
        {
            //SampleGrid = new InputFragments(
            //  new InputFragment(null, String.Empty),
            //  new InputFragment(0, "Chunk #1"),
            //  new InputFragment(1, "Chunk #2"),
            //  new InputFragment(2, "Chunk #3"),
            //  new InputFragment(3, "Chunk #4"),
            //  new InputFragment(4, "Chunk #5"),
            //  new InputFragment(5, "Chunk #6"),
            //  new InputFragment(6, "Chunk #7"));
            SampleGrid = new LineFragments(
                new LineFragment(new Line("Line # 1 of text", 0, 10), 0, null, String.Empty),
                new LineFragment(new Line("Line # 1 of text", 0, 10), 0, null, String.Empty),
                new LineFragment(new Line("Line # 1 of text", 0, 10), 0, null, String.Empty),
                new LineFragment(new Line("Line # 2 of text", 0, 10), 1, 0, "Chunk #1"),
                new LineFragment(new Line("Line # 2 of text", 0, 10), 1, 1, "Chunk #2"),
                new LineFragment(new Line("Line # 2 of text", 0, 10), 1, 2, "Chunk #3"),
                new LineFragment(new Line("Line # 6 of text", 0, 10), 2, 0, "Replacement #6"),
                new LineFragment(new Line("Line # 7 of text", 0, 10), 3, 0, "Replacement #7"));
            // SampleGrid = new LineReplacements(
            //   new LineReplacement(new Line("Line # 1 of text", 0, 10), 0, "Replacement #1"),
            //   new LineReplacement(new Line("Line # 2 of text", 0, 10), 1, "Replacement #2"),
            //   new LineReplacement(new Line("Line # 3 of text", 0, 10), 2, "Replacement #3"),
            //   new LineReplacement(new Line("Line # 4 of text", 0, 10), 3, "Replacement #4"),
            //   new LineReplacement(new Line("Line # 5 of text", 0, 10), 4, "Replacement #5"),
            //   new LineReplacement(new Line("Line # 6 of text", 0, 10), 5, "Replacement #6"),
            //   new LineReplacement(new Line("Line # 7 of text", 0, 10), 6, "Replacement #7"));

            SampleText =
                "Line # 1 of text\r\n" +
                "Line # 2 of text\r\n" +
                "Line # 3 of text\r\n" +
                "Line # 4 of text\r\n" +
                "Line # 5 of text\r\n" +
                "Line # 6 of text\r\n";

            SampleTree = LineNode.GetSamples().ToArray();
        }