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

            if (path == null)
            {
                return;
            }

            MainWorld.SaveMapToDirectory(path);
        }
示例#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("");
        }
示例#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);
            }
        }
示例#4
0
 public void OnApplicationRequestSaveProject()
 {
     MainWorld.SaveMapToDirectory("");
 }