Example #1
0
        public bool Save_FMap_Prompt()
        {
            SaveFileDialog Dialog = new SaveFileDialog();

            Dialog.InitialDirectory = GetDirectory();
            Dialog.FileName = "";
            Dialog.Filter = Constants.ProgramName + " Map Files (*.fmap)|*.fmap";
            if ( Dialog.ShowDialog(Program.frmMainInstance) != DialogResult.OK )
            {
                return false;
            }
            SettingsManager.Settings.SavePath = Path.GetDirectoryName(Dialog.FileName);
            clsResult Result = default(clsResult);
            Result = Write_FMap(Dialog.FileName, true, true);
            if ( !Result.HasProblems )
            {
                PathInfo = new clsPathInfo(Dialog.FileName, true);
                ChangedSinceSave = false;
            }
            App.ShowWarnings(Result);
            return !Result.HasProblems;
        }
Example #2
0
        public bool Save_FMap_Prompt()
        {
            var Dialog = new SaveFileDialog();

            Dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            Dialog.FileName = "";
            Dialog.Filter = Constants.ProgramName + " Map Files (*.fmap)|*.fmap";
            if ( Dialog.ShowDialog(Program.frmMainInstance) != DialogResult.OK )
            {
                return false;
            }
            SettingsManager.Settings.SavePath = Path.GetDirectoryName(Dialog.FileName);
            var fMap = new FMap (this);
            var result = fMap.Save(Dialog.FileName, true, true);
            if ( !result.HasProblems )
            {
                PathInfo = new clsPathInfo(Dialog.FileName, true);
                ChangedSinceSave = false;
            }
            App.ShowWarnings(result);
            return !result.HasProblems;
        }