public void OnApplicationRequestSaveAsProject() { string path = GetUserPath(); if (path == null) { return; } MainWorld.SaveMapToDirectory(path); }
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(""); }
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); } }
public void OnApplicationRequestSaveProject() { MainWorld.SaveMapToDirectory(""); }