public ExportContext(IScoreBookExportPlugin plugin, string dest, bool isQuick, Func <string> getCustomData, Action <string> setCustomData) { ExportPlugin = plugin; IsQuick = isQuick; OutputPath = dest; GetCustomData = getCustomData; SetCustomData = setCustomData; }
protected void ExportAs(IScoreBookExportPlugin exportPlugin) { var dialog = new SaveFileDialog() { Filter = exportPlugin.FileFilter }; if (dialog.ShowDialog(this) != DialogResult.OK) { return; } HandleExport(ScoreBook, ExportManager.PrepareExport(exportPlugin, dialog.FileName)); }
protected string ResolvePluginName(IScoreBookExportPlugin plugin) => plugin.GetType().FullName;
protected ExportContext PrepareExport(IScoreBookExportPlugin plugin, string dest, bool isQuick) { string name = ResolvePluginName(plugin); return(new ExportContext(plugin, dest, isQuick, () => CustomDataCache.ContainsKey(name) ? CustomDataCache[name] : "", data => CustomDataCache[name] = data)); }
public ExportContext PrepareExport(IScoreBookExportPlugin plugin, string dest) { return(PrepareExport(plugin, dest, false)); }
public Exporter(IScoreBookExportPlugin plugin, ScoreBookExportPluginArgs args) { LastUsedPlugin = plugin; LastUsedArgs = args; }