private void mnuFileImport_Click(object sender, RoutedEventArgs e) { System.Windows.Forms.OpenFileDialog OFD = new System.Windows.Forms.OpenFileDialog(); if (OFD.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (_ConfigDocument == null) { _ConfigDocument = new TConfigDocument(); } _ConfigDocument.Import(OFD.FileName); TreeViewRssItem RootItem = new TreeViewRssItem(_ConfigDocument.RootGroup); tvChannels.ItemsSource = RootItem.Items; } }
static void Main(string[] args) { SplitArgs oArgs = new SplitArgs(args); string SourceOpml = oArgs.GetValue <string>("source"); TOpmlDocument ImportDocument = new TOpmlDocument(SourceOpml); Console.WriteLine(ImportDocument.Outlines.ToString(true)); ConsoleExtension.Pause(); TConfigDocument ConfigDocument = new TConfigDocument(); ConfigDocument.Import(SourceOpml); Console.WriteLine(ConfigDocument.ToString()); ConsoleExtension.Pause(); }