Beispiel #1
0
        public void Configure(IWin32Window parent)
        {
            /* check to see if Windows Live Writer installed */
            if (!this.IsWriterInstalled)
            {
                throw new ApplicationException(Resource.Manager["RES_ExceptionLiveWriterNotFound"]);
            }

            /* instantiate Live Writer object */
            IWindowsLiveWriterApplication liveWriter = (IWindowsLiveWriterApplication) new WindowsLiveWriterApplicationClass();

            liveWriter.ShowOptions("blogthis");
        }
Beispiel #2
0
        public void BlogItem(System.Xml.XPath.IXPathNavigable rssFragment, bool edited)
        {
            /* check to see if Windows Live Writer installed */
            if (!this.IsWriterInstalled)
            {
                throw new ApplicationException(Resource.Manager["RES_ExceptionLiveWriterNotFound"]);
            }

            /* instantiate Live Writer object */
            IWindowsLiveWriterApplication liveWriter = (IWindowsLiveWriterApplication) new WindowsLiveWriterApplicationClass();

            string title       = rssFragment.CreateNavigator().Evaluate("string(//item/title/text())").ToString();
            string description = rssFragment.CreateNavigator().Evaluate("string(//item/description/text())").ToString();
            string link        = rssFragment.CreateNavigator().Evaluate("string(//item/link/text())").ToString();
            string feedName    = rssFragment.CreateNavigator().Evaluate("string(//channel/title/text())").ToString();

            liveWriter.BlogThisFeedItem(feedName, title, link, description, String.Empty, String.Empty, String.Empty, String.Empty);
        }