Ejemplo n.º 1
0
        private void SaveAsTasMenuItem_Click(object sender, EventArgs e)
        {
            var filename = CurrentTasMovie.Filename;

            if (string.IsNullOrWhiteSpace(filename) || filename == DefaultTasProjName())
            {
                filename = SuggestedTasProjName();
            }

            var file = ToolHelpers.SaveFileDialog(
                filename,
                PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null),
                "Tas Project Files",
                "tasproj");

            if (file != null)
            {
                CurrentTasMovie.Filename = file.FullName;

                if (_exiting)
                {
                    CurrentTasMovie.Save();
                }
                else
                {
                    _saveBackgroundWorker.RunWorkerAsync();
                }

                Settings.RecentTas.Add(CurrentTasMovie.Filename);
                SetTextProperty();
            }
        }
Ejemplo n.º 2
0
        void RunSaveAs()
        {
            if (_cdl == null)
            {
                MessageBox.Show(this, "Cannot save with no CDL loaded!", "Alert");
            }
            else
            {
                var file = ToolHelpers.SaveFileDialog(
                    _currentFilename,
                    PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPathFragment, null),
                    "Code Data Logger Files",
                    "cdl");

                if (file != null)
                {
                    using (var fs = new FileStream(file.FullName, FileMode.Create, FileAccess.Write))
                    {
                        _cdl.Save(fs);
                        _recent.Add(file.FullName);
                        SetCurrentFilename(file.FullName);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private static bool SaveAs()
        {
            var file = ToolHelpers.SaveFileDialog(
                Global.CheatList.CurrentFileName,
                PathManager.GetCheatsPath(Global.Game),
                "Cheat Files",
                "cht");

            return(file != null && Global.CheatList.SaveFile(file.FullName));
        }
Ejemplo n.º 4
0
        private void SaveAsMenuItem_Click(object sender, EventArgs e)
        {
            var file = ToolHelpers.SaveFileDialog(
                CurrentFileName,
                PathManager.GetRomsPath(Global.Game.System),                         // TODO: bot path
                "Bot files",
                "bot"
                );

            if (file != null)
            {
                SaveBotFile(file.FullName);
                _currentFileName = file.FullName;
            }
        }