예제 #1
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            string file = FileService.OpenFile("Open XML Configuration", "XML files (*.xml)|*.xml");

            if (!string.IsNullOrEmpty(file))
            {
                var conf = FdoDataStoreConfiguration.FromFile(file);
                if (!_context.IsConnected)
                {
                    using (var cur = new TempCursor(Cursors.WaitCursor))
                    {
                        _context.SetConfiguration(conf);
                        schemaView.Reset();
                    }
                }
                else
                {
                    //Prompt for elements to import
                    var impDiag = new ImportElementsDialog(conf, _context);
                    impDiag.ShowDialog();
                }
            }
        }
예제 #2
0
 private void btnImport_Click(object sender, EventArgs e)
 {
     string file = FileService.OpenFile("Open XML Configuration", "XML files (*.xml)|*.xml");
     if (!string.IsNullOrEmpty(file))
     {
         var conf = FdoDataStoreConfiguration.FromFile(file);
         if (!_context.IsConnected)
         {
             using (var cur = new TempCursor(Cursors.WaitCursor))
             {
                 _context.SetConfiguration(conf);
                 schemaView.Reset();
             }
         }
         else
         {
             //Prompt for elements to import
             var impDiag = new ImportElementsDialog(conf, _context);
             impDiag.ShowDialog();
         }
     }
 }