Ejemplo n.º 1
0
        private bool SaveAs()
        {
            try
            {
                if (_envFh.IsNew)
                {
                    SaveNewFile dl = new SaveNewFile();

                    if (dl.ShowDialog() == DialogResult.Cancel)
                    {
                        return(false);
                    }
                    saveFileDialog.FileName = dl.FileName;
                }
                else
                {
                    saveFileDialog.FileName = _envFh.Filename;
                }
                if (saveFileDialog.ShowDialog() == DialogResult.OK)
                {
                    openFileDialog.FileName         = saveFileDialog.FileName;
                    openFileDialog.InitialDirectory = saveFileDialog.InitialDirectory;
                    return(_envFh.Save(saveFileDialog.FileName));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            return(false);
        }