Exemple #1
0
        private void menuSaveAs_Click(object sender, System.EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            if (mapping != null && mapping.FileName != string.Empty)
            {
                sfd.InitialDirectory = Path.GetDirectoryName(mapping.FileName);
            }
            sfd.CheckFileExists = false;
            sfd.DefaultExt      = "xml";
            sfd.Filter          = "Mapping Files (*.xml)|*.xml";
            sfd.FileName        = "NDOMapping.xml";
            if (sfd.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            mapping.SaveAs(sfd.FileName);
            this.Text = sfd.FileName;
        }