Beispiel #1
0
        public void OnApplicationRequestSaveAsProject()
        {
            string path = GetUserPath();

            if (path == null)
            {
                return;
            }

            MainWorld.SaveMapToDirectory(path);
        }
Beispiel #2
0
        public void OnApplicationRequestSaveProject()
        {
            // Data was loaded from archives to a temp folder. We need a new folder to copy this data to!
            if (MainWorld.Map.SavePath == null)
            {
                string path = GetUserPath();
                if (path == null)
                {
                    return;
                }

                string newMapDir = $"{ path }\\{ MainWorld.Map.MapName }";
                CopyTempDataToPermanentDir(m_sourceDataPath, newMapDir);

                MainWorld.Map.SavePath = newMapDir;
            }

            MainWorld.SaveMapToDirectory("");
        }
Beispiel #3
0
        public void OnApplicationRequestSaveAsProject()
        {
            var ofd = new CommonOpenFileDialog();

            ofd.Title                     = "Choose Directory";
            ofd.IsFolderPicker            = true;
            ofd.AddToMostRecentlyUsedList = false;
            ofd.AllowNonFileSystemItems   = false;
            ofd.EnsureFileExists          = true;
            ofd.EnsurePathExists          = true;
            ofd.EnsureReadOnly            = false;
            ofd.EnsureValidNames          = true;
            ofd.Multiselect               = false;
            ofd.ShowPlacesList            = true;

            if (ofd.ShowDialog() == CommonFileDialogResult.Ok)
            {
                // Just assume the folder paths are valid now.
                MainWorld.SaveMapToDirectory(ofd.FileName);
            }
        }
Beispiel #4
0
 public void OnApplicationRequestSaveProject()
 {
     MainWorld.SaveMapToDirectory("");
 }