using System.Windows.Forms; using WindowsLive.Writer.Api; namespace LiveWriterUploader { [WriterPlugin ("18d43e01-4549-4fde-8ca6-c7b4b7385fac", "FileUploaded", PublisherUrl = "http://blog.benhall.me.uk", Description = "Plugin", ImagePath = "writer.png", HasEditableOptions = false)] [InsertableContentSource("FileUploaded")] public class Plugin : SmartContentSource { public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent) { return DialogResult.OK; } public override SmartContentEditor CreateEditor(ISmartContentEditorSite editorSite) { return new ContentEditor(); } public override string GeneratePublishHtml(ISmartContent content, IPublishingContext publishingContext) { string filename = "ZipTest.zip"; string fullpath = "F:\\ZipTest.zip"; content.Files.Add(filename, fullpath); string filePath = content.Files.GetUri(content.Files.Filenames[0]).ToString(); return string.Format("

Download File - {1}", filePath, filename); } } }