private void ExecuteSaveAsCommand(Texture texture) { if (texture == null) { return; } BusyIndicatorService.Run(() => { string fileName = FileDialogService.GetSaveTextureFileName(texture.Name); if (fileName == null) { return; } try { texture.Save(fileName); } catch (Exception ex) { Messenger.Instance.Notify(new MessageBoxMessage(texture.Name, ex)); } }); }
private void ExecuteSaveAsCommand(Texture texture) { if (texture == null) { return; } BusyIndicatorService.Run(dispatcher => { string fileName = FileDialogService.GetSaveTextureFileName(texture.Name); if (fileName == null) { return; } try { texture.Save(fileName); dispatcher(() => this.OptModel.UndoStackPush("save " + System.IO.Path.GetFileName(fileName))); } catch (Exception ex) { Messenger.Instance.Notify(new MessageBoxMessage(texture.Name, ex)); } }); }