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;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Raccoom.Xml;

namespace Raccoom.Windows.Forms
{
	/// <summary>
	/// ManageFavorites belongs to a set of dialogs that are Internet Explorer Favorite clones.
	/// </summary>
	public class FavoritesManageDialog : System.Windows.Forms.Form
	{
		#region fields
		private System.Windows.Forms.Button _btCreateFolder;
		private System.Windows.Forms.Button _btRename;
		private System.Windows.Forms.Button _btMoveToFolder;
		private System.Windows.Forms.Button _btDelete;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button _btClose;
		private TreeViewOpmlDocument _tvFavorites;
		private System.Windows.Forms.GroupBox groupBox1;
		private OpmlDocument _opmlDocument;		
		private System.Windows.Forms.Label _labelDescription;
		private System.ComponentModel.IContainer components;
		#endregion

		public FavoritesManageDialog(OpmlDocument opmlDocument)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			_opmlDocument = opmlDocument;
		}


		#region events
		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad (e);
			//
			this._tvFavorites.Populate(this._opmlDocument);
		}
		private void OnRename_Click(object sender, System.EventArgs e)
		{
			if(this._tvFavorites.SelectedNode!=null) this._tvFavorites.SelectedNode.BeginEdit();
		}
		private void OnCreateFolder_Click(object sender, System.EventArgs e)
		{
			OpmlOutline outline = new OpmlOutline();
			outline.Text = "New Folder";
			this._tvFavorites.CreateNewFolder(null, outline).BeginEdit();
		}
		private void OnDelete_Click(object sender, System.EventArgs e)
		{
			this._tvFavorites.DeleteNode(this._tvFavorites.SelectedNode as TreeNodeOpmlOutline);
		}
		private void _tvFavorites_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
		{
			TreeNodeOpmlOutline node =  e.Node as TreeNodeOpmlOutline;
			if(node==null | node.OpmlOutlineItem == null) return;
			//
			_labelDescription.Text = node.OpmlOutlineItem.ToString();
		}
		#endregion

		#region Windows Form Designer generated code
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this._btCreateFolder = new System.Windows.Forms.Button();
			this._btRename = new System.Windows.Forms.Button();
			this._btMoveToFolder = new System.Windows.Forms.Button();
			this._btDelete = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this._btClose = new System.Windows.Forms.Button();
			this._tvFavorites = new Raccoom.Windows.Forms.TreeViewOpmlDocument(this.components);
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this._labelDescription = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// _btCreateFolder
			// 
			this._btCreateFolder.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this._btCreateFolder.Location = new System.Drawing.Point(16, 80);
			this._btCreateFolder.Name = "_btCreateFolder";
			this._btCreateFolder.Size = new System.Drawing.Size(96, 23);
			this._btCreateFolder.TabIndex = 0;
			this._btCreateFolder.Text = "&Create Folder";
			this._btCreateFolder.Click += new System.EventHandler(this.OnCreateFolder_Click);
			// 
			// _btRename
			// 
			this._btRename.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this._btRename.Location = new System.Drawing.Point(120, 80);
			this._btRename.Name = "_btRename";
			this._btRename.Size = new System.Drawing.Size(96, 23);
			this._btRename.TabIndex = 1;
			this._btRename.Text = "&Rename";
			this._btRename.Click += new System.EventHandler(this.OnRename_Click);
			// 
			// _btMoveToFolder
			// 
			this._btMoveToFolder.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this._btMoveToFolder.Location = new System.Drawing.Point(16, 104);
			this._btMoveToFolder.Name = "_btMoveToFolder";
			this._btMoveToFolder.Size = new System.Drawing.Size(96, 23);
			this._btMoveToFolder.TabIndex = 2;
			this._btMoveToFolder.Text = "&Move to folder";
			// 
			// _btDelete
			// 
			this._btDelete.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this._btDelete.Location = new System.Drawing.Point(120, 104);
			this._btDelete.Name = "_btDelete";
			this._btDelete.Size = new System.Drawing.Size(96, 23);
			this._btDelete.TabIndex = 3;
			this._btDelete.Text = "&Delete";
			this._btDelete.Click += new System.EventHandler(this.OnDelete_Click);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(16, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(200, 48);
			this.label1.TabIndex = 4;
			this.label1.Text = "To create a new folder, click on the Create Folder button. To rename or delete an" +
				" item, select the item and click Rename or Delete.";
			// 
			// _btClose
			// 
			this._btClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this._btClose.DialogResult = System.Windows.Forms.DialogResult.OK;
			this._btClose.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this._btClose.Location = new System.Drawing.Point(320, 256);
			this._btClose.Name = "_btClose";
			this._btClose.Size = new System.Drawing.Size(96, 23);
			this._btClose.TabIndex = 5;
			this._btClose.Text = "&Close";
			// 
			// _tvFavorites
			// 
			this._tvFavorites.AllowDrop = true;
			this._tvFavorites.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this._tvFavorites.FullRowSelect = true;
			this._tvFavorites.HideSelection = false;
			this._tvFavorites.HotTracking = true;
			this._tvFavorites.LabelEdit = true;
			this._tvFavorites.Location = new System.Drawing.Point(232, 24);
			this._tvFavorites.Name = "_tvFavorites";
			this._tvFavorites.ShowLines = false;
			this._tvFavorites.ShowPlusMinus = false;
			this._tvFavorites.ShowRootLines = false;
			this._tvFavorites.Size = new System.Drawing.Size(184, 224);
			this._tvFavorites.TabIndex = 6;
			this._tvFavorites.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this._tvFavorites_AfterSelect);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this._labelDescription);
			this.groupBox1.Location = new System.Drawing.Point(16, 136);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(200, 112);
			this.groupBox1.TabIndex = 7;
			this.groupBox1.TabStop = false;
			// 
			// _labelDescription
			// 
			this._labelDescription.Dock = System.Windows.Forms.DockStyle.Fill;
			this._labelDescription.Location = new System.Drawing.Point(3, 16);
			this._labelDescription.Name = "_labelDescription";
			this._labelDescription.Size = new System.Drawing.Size(194, 93);
			this._labelDescription.TabIndex = 0;
			// 
			// FavoritesManageDialog
			// 
			this.AcceptButton = this._btClose;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(432, 302);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this._tvFavorites);
			this.Controls.Add(this._btClose);
			this.Controls.Add(this.label1);
			this.Controls.Add(this._btDelete);
			this.Controls.Add(this._btMoveToFolder);
			this.Controls.Add(this._btRename);
			this.Controls.Add(this._btCreateFolder);
			this.HelpButton = true;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "FavoritesManageDialog";
			this.ShowInTaskbar = false;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "ManageFavorites";
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#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 - 2013 C#, WCF DS (OData), WF, WPF
  • 2014 - now C#, Azure PaaS, Identity, OWIN, OData, Web Api
Interests
  • family & friends
  • chilaxing ,)
  • coding
Follow on   Twitter   Google+   LinkedIn

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