Esempio n. 1
0
 private void btnTestImport_Click(object sender, EventArgs e)
 {
     OpenFileDialog openFileDialog = new OpenFileDialog();
     openFileDialog.DefaultExt = "xml";
     openFileDialog.FileName = "NetSqlAzMan.xml";
     openFileDialog.Filter = "Xml files|*.xml|All files|*.*";
     openFileDialog.SupportMultiDottedExtensions = true;
     openFileDialog.Title = "Import from ...";
     DialogResult dr = openFileDialog.ShowDialog(this);
     if (dr == DialogResult.OK)
     {
         frmImportOptions frm = new frmImportOptions();
         IAzManStorage storage = new SqlAzManStorage("data source=.;Initial Catalog=NetSqlAzManStorage;Integrated Security = SSPI;");
         IAzManStore store = storage.GetStore("Eidos");
         frm.importIntoObject = store;
         frm.fileName = openFileDialog.FileName;
         frm.ShowDialog();
     }
 }
 void importAction_Triggered(object sender, MMC.SyncActionEventArgs e)
 {
     OpenFileDialog openFileDialog = new OpenFileDialog();
     openFileDialog.DefaultExt = "xml";
     openFileDialog.FileName = "NetSqlAzMan.xml";
     openFileDialog.Filter = "Xml files|*.xml|All files|*.*";
     openFileDialog.SupportMultiDottedExtensions = true;
     openFileDialog.Title = Globalization.MultilanguageResource.GetString("ApplicationGroupsScopeNode_Msg10");
     DialogResult dr = this.SnapIn.Console.ShowDialog(openFileDialog);
     if (dr == DialogResult.OK)
     {
         frmImportOptions frm = new frmImportOptions();
         frm.importIntoObject = this.storage;
         frm.fileName = openFileDialog.FileName;
         this.SnapIn.Console.ShowDialog(frm);
         this.Render();
     }
 }