Exemplo n.º 1
0
        public void Execute(ExportDatabaseCommand command)
        {
            var export = new uFrameExport();
            var items  = command.Database.Repository.AllOf <IDataRecord>().Where(p => !(p is uFrameDatabaseConfig)).ToList();

            var contents = ExportItems(items, command.Database.Repository, export);
            var fileSave = new ShowSaveFileDialog()
            {
                Extension   = "ufdata",
                DefaultName = command.Database.Title
            };

            Execute(fileSave);
            if (fileSave.Result != null)
            {
                File.WriteAllText(fileSave.Result, contents);
            }
        }
Exemplo n.º 2
0
        public void Execute(ExportWorkspaceCommand command)
        {
            var export = new uFrameExport();
            var items  = new List <IDataRecord>();

            Traverse(command.Workspace, items);
            var contents = ExportItems(items, command.Workspace.Repository, export);
            var fileSave = new ShowSaveFileDialog()
            {
                Extension   = "ufdata",
                DefaultName = command.Workspace.Name
            };

            Execute(fileSave);
            if (fileSave.Result != null)
            {
                File.WriteAllText(fileSave.Result, contents);
            }
        }