- rssfeeder_src.zip
- RSSFeeder
- RSSBlogAPI
- RSSCommon
- RSSFeeder.sln
- RSSFeeder
- RSSFeederResources
- RSSFeederSetup
- Messages.ico
- RSSFeederSetup.vdproj
- Test
- RSSStarter
- RSSTests
- Thirdparty
- AxInterop.DHTMLEDLib.dll
- AxInterop.SHDocVw.dll
- Eyefinder.dll
- GotDotNet.Exslt.dll
- HttpDownloader.dll
- Interop.DHTMLEDLib.dll
- Interop.SHDocVw.dll
- Interop.WindowsInstaller.dll
- Microsoft.ApplicationBlocks.Updater.ActivationProcessors.dll
- Microsoft.ApplicationBlocks.Updater.dll
- Microsoft.ApplicationBlocks.Updater.Downloaders.dll
- Microsoft.Practices.EnterpriseLibrary.Caching.dll
- Microsoft.Practices.EnterpriseLibrary.Common.dll
- Microsoft.Practices.EnterpriseLibrary.Configuration.dll
- Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
- Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
- Microsoft.Practices.EnterpriseLibrary.Logging.dll
- Microsoft.Practices.EnterpriseLibrary.Security.Cache.CachingStore.dll
- Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll
- Microsoft.Practices.EnterpriseLibrary.Security.dll
- NotifyIconBalloon.dll
- SandBar.dll
- SandDock.dll
- SgmlReaderDll.dll
|
// Copyright � 2005 by Omar Al Zabir. All rights are reserved.
//
// If you like this code then feel free to go ahead and use it.
// The only thing I ask is that you don't remove or alter my copyright notice.
//
// Your use of this software is entirely at your own risk. I make no claims or
// warrantees about the reliability or fitness of this code for any particular purpose.
// If you make changes or additions to this code please mark your code as being yours.
//
// website http://www.oazabir.com, email OmarAlZabir@gmail.com, msn oazabir@hotmail.com
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace RSSFeeder
{
/// <summary>
/// Summary description for DateFilterControl.
/// </summary>
public class DateFilterControl : System.Windows.Forms.ComboBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public DateFilterControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitializeComponent call
base.Items.Clear();
base.Items.Add( new Date( "Today", DateTime.Now.Date ) );
base.Items.Add( new Date( "Yesterday", DateTime.Now.Date.AddDays(-1) ) );
base.Items.Add( new Date( "Last 3 days", DateTime.Now.Date.AddDays(-3) ) );
base.Items.Add( new Date( "Last 7 days", DateTime.Now.Date.AddDays( -7 ) ) );
base.Items.Add( new Date( "This month", new DateTime( DateTime.Now.Year, DateTime.Now.Month, 1 ) ) );
base.Items.Add( new Date( "Anytime", DateTime.MinValue ) );
base.SelectedIndex = 3;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// DateFilterControl
//
this.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.Size = new System.Drawing.Size(288, 32);
}
#endregion
public new Date SelectedItem
{
get
{
return base.SelectedItem as Date;
}
}
public class Date
{
public DateTime DateTime;
public string Title;
public Date( string title, DateTime date )
{
this.Title = title;
this.DateTime = date;
}
public override string ToString()
{
return this.Title;
}
}
}
}
|
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.