コード例 #1
0
            public static void CopyGameFiles(bool ignoreComplete = false)
            {
                // ignore these types: rgssad, rgss2a, rgss3a

                string path = Path.GetDirectoryName(Program.ProjectPath);

                if (!path.EndsWith('\\'))
                {
                    path += "\\";
                }

                files = Directory.GetFiles(path)
                        .Where(x => !x.Contains("rgssad"))
                        .Where(x => !x.Contains("rgss2a"))
                        .Where(x => !x.Contains("rgss3a"))
                        .ToList();

                FileDialog.CreateSaveDialog("Copy to...", "Pick a place", new string[] { "rgssad", "rgss2a", "rgss3a" }, () => { return; });

                if (!Directory.Exists(FileDialog._SaveDialog.DirectoryPath.ToString() + "\\"))
                {
                    Directory.CreateDirectory(FileDialog._SaveDialog.DirectoryPath.ToString() + "\\");
                }

                Misc.CopyAll(new DirectoryInfo(path), new DirectoryInfo(FileDialog._SaveDialog.DirectoryPath.ToString() + "\\"));

                if (!ignoreComplete)
                {
                    Application.Run(Operation.Complete);
                }
            }
コード例 #2
0
            public static void MakeProjectIndeterministic(RPGMakerVersion type, bool ignoreComplete = false)
            {
                try
                {
                    FileDialog.CreateSaveDialog("Project File", "Pick a directory.", new string[] { Path.GetExtension(Program.ProjectPath) }, () => {
                        Misc.EnsurePathExists(FileDialog._SaveDialog.DirectoryPath.ToString());
                        ProjectGenerator.GenerateProject(type, FileDialog._SaveDialog.DirectoryPath.ToString());

                        if (!ignoreComplete)
                        {
                            Application.Run(Operation.Complete);
                        }
                    });
                }
                catch (Exception ex)
                {
                    Application.RequestStop(); Operation.ShowError(ex.Message);
                }
            }
コード例 #3
0
            public static void MakeProject(bool ignoreComplete = false)
            {
                try
                {
                    Functions.Operation.ExecuteIfProjectSelected(() =>
                    {
                        FileDialog.CreateSaveDialog("Project File", "Pick a directory.", new string[] { Path.GetExtension(Program.ProjectPath) }, () =>
                        {
                            Misc.EnsurePathExists(FileDialog._SaveDialog.DirectoryPath.ToString());
                            ProjectGenerator.GenerateProject(RGSSAD.GetVersion(Program.ProjectPath), FileDialog._SaveDialog.DirectoryPath.ToString());

                            if (!ignoreComplete)
                            {
                                Application.Run(Operation.Complete);
                            }
                        });
                    });
                }
                catch (Exception ex)
                {
                    Application.RequestStop(); Operation.ShowError(ex.Message);
                }
            }