示例#1
0
        void loadButton_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new OpenFileDialog
             {
            Filter = EmberFileDialogFilter,
             };

             if(dialog.ShowDialog() == true)
             {
            using(var stream = dialog.File.OpenRead())
            {
               var input = new BerStreamInput(stream);
               var reader = new EmberReader(input);
               var glow = EmberNode.Decode(reader, new GlowApplicationInterface()) as GlowContainer;

               if(glow != null)
                  DecodeGlow(glow);
            }
             }
        }
示例#2
0
        void Test_InteropDom()
        {
            Console.WriteLine("\r\n------------------------ Interop DOM");

             var testFilePath = @"N:\Temp\test.ber";
             using(var stream = File.OpenRead(testFilePath))
             {
            var input = new BerStreamInput(stream);
            var reader = new EmberReader(input);

            var root = EmberNode.Decode(reader, this);
            Console.WriteLine(GetXml(root));
             }
        }