Exemplo n.º 1
0
        public void ImportObjectsDialog(string fileName)
        {
            _log.Debug("Showing import window for file {0}", fileName);

            var importWindow = new ImportedObjectsWindow();

            ImportedObjectsModel model;
            using (var stream = File.OpenRead(fileName))
            {
                model = new ImportedObjectsModel(stream, new XmlImporter(), this);
                model.Initialize();
                importWindow.Initialize(model);
            }

            importWindow.ShowDialog();
        }
 public void Initialize(ImportedObjectsModel model)
 {
     _model = model;
     this.DataContext = model;
 }