Пример #1
0
        private void ToolPatchCreateClick(object sender, EventArgs e)
        {
            var export = new DBExport()
            {
                Mode   = ExportMode.Patch,
                Stamp  = DateTime.Today.AddDays(-7),
                Source = DBService.Schems.DefaultSchema,
                Target = new DBSchema()
                {
                    Name       = "patch",
                    Connection = new DBConnection()
                    {
                        System = DBSystem.SQLite,
                        Host   = "dataPatch" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".sdb"
                    }
                }
            };
            var editor = new DataExport {
                Export = export
            };

            editor.ExportComplete += (oo, ee) =>
            {
                editor.Patch();
                editor.ParentWindow.Close();
            };
            editor.ShowWindow(this);
            editor.Initialise();
        }
Пример #2
0
        private void ToolDBExportClick(object sender, EventArgs e)
        {
            //var schema = dataTree.SelectedDBItem as DBSchema;
            //if (schema != null)
            //{
            //    using (var dialog = new SaveFileDialog())
            //    {
            //        dialog.Filters.Add(new FileDialogFilter("Web Page(*.xhtml)", "*.xhtml"));
            //        if (dialog.Run(ParentWindow))
            //            schema.ExportXHTML(dialog.FileName);
            //    }
            //}
            //ProjectHandler ph = new ProjectHandler();
            if (CurrentSchema == null)
            {
                return;
            }
            var export = new DBExport()
            {
                Source = CurrentSchema
            };
            var exportEditor = new DataExport()
            {
                Export = export
            };

            GuiService.Main.DockPanel.Put(exportEditor);
        }
Пример #3
0
 private void ToolPatchLoadClick(object sender, EventArgs e)
 {
     using (var dialog = new OpenFileDialog())
     {
         dialog.Filters.Add(new FileDialogFilter("Patch(zip)", "*.zip"));
         if (dialog.Run(ParentWindow))
         {
             var editor = new DataExport {
                 Export = DBExport.PatchRead(dialog.FileName)
             };
             editor.ShowWindow(this);
         }
     }
 }