public LoadProgressState(GameStateMachine gameStateMachine, IPersistentProgressService progressService, ISaveLoadService saveLoadService) { _gameStateMachine = gameStateMachine; _progressService = progressService; _saveLoadService = saveLoadService; }
public ToDoListViewModel(INavigationService navigation, ISaveLoadService saveLoa) { Navigation = navigation; SaveLoadService = saveLoa; Messenger.Default.Register <ContactDetailsMessage>(this, param => { List.Add(new ToDo { Title = param.Message, Done = false }); }); }
public SaveLoadGuiCommands(Lazy <IMainForm> mainFormLazy, ISaveLoadService saveLoadService, IReadOnlyList <ISaveLoadFormat> formats, IReadOnlyList <IPresentationImporter> presentationImporters) { this.mainFormLazy = mainFormLazy; this.saveLoadService = saveLoadService; this.formats = formats; saveFileDialog = new SaveFileDialog(); openFileDialog = new OpenFileDialog(); foreach (var format in formats) { var filter = new FileDialogFilter(format.Name, format.FileExtension); saveFileDialog.Filters.Add(filter); openFileDialog.Filters.Add(filter); } New = Create("New", ExecNew, Keys.Control | Keys.N); Save = Create("Save", ExecSave, Keys.Control | Keys.S); SaveAs = Create("Save As", ExecSaveAs); Open = Create("Open", ExecOpen, Keys.Control | Keys.O); ImportCommands = presentationImporters.Select(i => Create(i.Name, (s, a) => ExecImport(i))).ToArray(); }