This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
using Eto.Forms; | ||
using App.AdventureMaker.Core.Interfaces; | ||
using Distance.AdventureMaker.Common.Models; | ||
using Eto.Forms; | ||
using System; | ||
using static Dialogs; | ||
|
||
namespace App.AdventureMaker.Core.Commands | ||
{ | ||
public class ExportFileCommand : Command | ||
{ | ||
public ExportFileCommand() | ||
private readonly IEditor<CampaignFile> editor; | ||
private readonly SaveFileDialog dialog; | ||
|
||
public ExportFileCommand(IEditor<CampaignFile> editor) | ||
{ | ||
this.editor = editor; | ||
|
||
MenuText = "&Export"; | ||
ToolBarText = "Export"; | ||
Shortcut = Application.Instance.CommonModifier | Keys.Shift | Keys.E; | ||
|
||
dialog = ExportCampaignDialog("Export campaign as..."); | ||
|
||
Enabled = false; | ||
editor.OnLoaded += (_) => Enabled = editor.CurrentFile != null; | ||
} | ||
|
||
protected override void OnExecuted(EventArgs e) | ||
{ | ||
if (dialog.ShowDialog(null) == DialogResult.Ok) | ||
{ | ||
MessageBox.Show("Unimplemented :("); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters