Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Samples » Downloads
 
Add your own
alternative version

RSS 2.0 Framework

, 19 Jan 2013 LGPL3
RSS 2.0 framework implements the RSS 2.0 specification in strongly typed classes. The framework enables you to create and consume valid RSS 2.0 feeds in your code in just a few minutes.
rssframework_bin.zip
Raccoom.Xml.dll
Raccoom.Xml.Editors.exe
DockingManagerExtender.dll
MagicLibrary.DLL
Raccoom.Windows.Forms.dll
rssframework_demo.zip
Raccoom.Bin
DockingManagerExtender.dll
MagicLibrary.DLL
nunit.framework.dll
Raccoom.Windows.Forms
Windows
Forms
Design
Raccoom.Xml
Properties
Raccoom.Xml.csproj.user
Xml
atom.xsx
Raccoom.Xml.Editors
ActionList
Actions
Design
App.ico
Raccoom.Xml.Editors.csproj.user
Windows
Forms
Raccoom.Xml.Test
Resources
rsschannel.rss
bin
rssframework_help.zip
Raccoom.Xml.chm
rssframework_src.zip
rsschannel.rss
Raccoom.Xml.csproj.user
atom.xsx
setup.zip
setup.exe
// Copyright � 2006 by Christoph Richner. All rights are reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//
// website http://www.raccoom.net, email support@raccoom.net, msn chrisdarebell@msn.com

using System;

namespace Raccoom.Windows.Forms
{
	/// <summary>
	/// Summary description for UrlDragDropManager.
	/// </summary>
	public class UrlDragDropManager
	{
		#region fields
		#region delegate
		public class UrlDragDropEventArgs : EventArgs
		{
			private Uri _uri;

			public UrlDragDropEventArgs(Uri uri)
			{
				this._uri = uri;
			}
			public Uri Uri
			{
				get
				{
					return _uri;
				}
			}
		}
		public delegate void UrlDragDropDelegate(object sender, UrlDragDropEventArgs e);
		#endregion
		public UrlDragDropDelegate UrlDragDrop;
		#endregion

		#region constructors
		public UrlDragDropManager(System.Windows.Forms.Control control)
		{
			System.Diagnostics.Debug.Assert(control!=null);
			//
			control.AllowDrop = true;
			control.DragEnter += new System.Windows.Forms.DragEventHandler(OnDragEnter);
			control.DragDrop +=new System.Windows.Forms.DragEventHandler(OnDragDrop);
		}
		#endregion

		#region public interface
		/// <summary>
		/// Allow draging of UniformResourceLocator (Hyperlinks)
		/// </summary>		
		private void OnDragEnter(object sender, System.Windows.Forms.DragEventArgs e)
		{			
			if(e.Data.GetData("UniformResourceLocator",true)!=null)
			{
				e.Effect = System.Windows.Forms.DragDropEffects.Link;
			} 
			else
			{
				e.Effect = System.Windows.Forms.DragDropEffects.None;
			}
		
		}
		/// <summary>
		/// If valid UniformResourceLocator was dropped, load it
		/// </summary>
		private void OnDragDrop(object sender, System.Windows.Forms.DragEventArgs e)
		{
			// FileContents
			// UniformResourceLocator			
			//
			try
			{	
				string url = e.Data.GetData(typeof(string)) as string;
				// some browser deliver url and text in UniformResourceLocator
				string[] tokens =url.Split('\n');
				if(tokens.Length>1)
				{
					url= tokens[0];					
				}
				//
				if(UrlDragDrop!=null) UrlDragDrop(this, new UrlDragDropEventArgs(new Uri(url)));				
			} 
			catch (System.Exception ex)
			{
				System.Diagnostics.Trace.WriteLine(ex.Message);
			}		
		}
		
		#endregion
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)

Share

About the Author

Chris Richner
Software Developer (Senior) Zeit AG
Switzerland Switzerland
Biography
  • 1996 - 1998 PC Board PPL, HTML, DHTML, Javascript and ASP
  • 1999 - 2001 coding Centura against Sql Database (SqlBase,MSSQL,Oracle)
  • 2002 - 2004 C# Windows Forms
  • 2005 - 2006 C# ASP.NET, Windows Forms
  • 2006 - 2009 C#, WCF, WF, WPF
  • 2010 - 2012 C#, Dynamics CRM, Sharepoint, Silverlight
  • 2013 - now C#, WCF DS (OData), WF, WPF
Interests
  • family & friends
  • chilaxing ,)
  • coding
Follow on   Twitter   Google+   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 20 Jan 2013
Article Copyright 2003 by Chris Richner
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid