|
10 | 10 | using System.Collections.Generic;
|
11 | 11 | using System.ComponentModel;
|
12 | 12 | using System.ComponentModel.DataAnnotations;
|
13 |
| -using System.IO; |
14 | 13 | using System.Linq;
|
15 |
| -using System.Threading.Tasks; |
16 | 14 |
|
17 | 15 | namespace OpenLoco.Gui.ViewModels
|
18 | 16 | {
|
@@ -174,35 +172,35 @@ void DrawMap()
|
174 | 172 | }
|
175 | 173 | }
|
176 | 174 |
|
177 |
| - //public override void Save() => logger?.Warning("Save is not currently implemented"); |
| 175 | + public override void Save() => logger?.Warning("Save is not currently implemented"); |
178 | 176 |
|
179 |
| - //public override void SaveAs() => logger?.Warning("SaveAs is not currently implemented"); |
| 177 | + public override void SaveAs() => logger?.Warning("SaveAs is not currently implemented"); |
180 | 178 |
|
181 |
| - public override void Save() |
182 |
| - => Save(CurrentFile.Filename); |
| 179 | + //public override void Save() |
| 180 | + // => Save(CurrentFile.Filename); |
183 | 181 |
|
184 |
| - public override void SaveAs() |
185 |
| - { |
186 |
| - var saveFile = Task.Run(async () => await PlatformSpecific.SaveFilePicker(PlatformSpecific.SCV5FileTypes)).Result; |
187 |
| - if (saveFile == null) |
188 |
| - { |
189 |
| - return; |
190 |
| - } |
| 182 | + //public override void SaveAs() |
| 183 | + //{ |
| 184 | + // var saveFile = Task.Run(async () => await PlatformSpecific.SaveFilePicker(PlatformSpecific.SCV5FileTypes)).Result; |
| 185 | + // if (saveFile == null) |
| 186 | + // { |
| 187 | + // return; |
| 188 | + // } |
191 | 189 |
|
192 |
| - Save(saveFile.Path.LocalPath); |
193 |
| - } |
| 190 | + // Save(saveFile.Path.LocalPath); |
| 191 | + //} |
194 | 192 |
|
195 |
| - void Save(string filename) |
196 |
| - { |
197 |
| - logger?.Info($"Saving scenario/save/landscape to {filename}"); |
| 193 | + //void Save(string filename) |
| 194 | + //{ |
| 195 | + // logger?.Info($"Saving scenario/save/landscape to {filename}"); |
198 | 196 |
|
199 |
| - var newFile = CurrentS5File with |
200 |
| - { |
201 |
| - RequiredObjects = [.. RequiredObjects.Select(x => x.GetAsUnderlyingType())], |
202 |
| - }; |
| 197 | + // var newFile = CurrentS5File with |
| 198 | + // { |
| 199 | + // RequiredObjects = [.. RequiredObjects.Select(x => x.GetAsUnderlyingType())], |
| 200 | + // }; |
203 | 201 |
|
204 |
| - var bytes = newFile.Write(); |
205 |
| - File.WriteAllBytes(filename, bytes); |
206 |
| - } |
| 202 | + // var bytes = newFile.Write(); |
| 203 | + // File.WriteAllBytes(filename, bytes); |
| 204 | + //} |
207 | 205 | }
|
208 | 206 | }
|
0 commit comments