Files
mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SelectionRange.cs
T
Peter Dennis Bartok 04d2148a00 2005-02-13 Peter Bartok <[email protected]>
- MouseButtons.cs: Added missing attributes
	- XplatUIStructs.cs: Added enumeration for title styles
	- LeftRightAlignment.cs: Added missing attributes
	- Hwnd.cs: Switched to use client_window as handle (slower, but makes
	  it compatible with Graphics.FromHwnd()
	- SelectedGridItemChangedEventArgs.cs: Fixed property type
	- Keys.cs: Added missing attributes
	- SelectionRange.cs: Added missing attributes
	- SelectionRangeConverter.cs: Added
	- XplatUI.cs: 
	  - Introduced SetBorderStyle, SetMenu, GetMenuDC and 
	    ReleaseMenuDC methods
	  - Renamed ReleaseWindow to UngrabWindow
	  - Added proper startup notice to allow version identification
	- Form.cs: 
	  - Added missing attributes
	  - Removed FormParent concept
	- Label.cs: Removed border_style field, now in Control
	- RadioButton.cs: Now properly selects RadioButton when focus is 
	  received
	- ThemeGtk.cs: Fixed SetDisplay call to match new X11 behaviour
	- Control.cs:
	  - Added missing attributes
	  - Added borderstyle handling
	  - Removed FormParent concept support
	  - Fixed calls to XplatUI to match changed APIs
	  - Fixed bug that would case us to use disposed Graphics objects
	  - Removed unneeded internal methods
	  - PerformLayout(): Fixed to handle DockStyle.Fill properly
	  - SelectNextControl(): Fixed to properly check common parents
	- TextBoxBase.cs: Removed border_style field (now in Control)
	- MessageBox.cs:
	  - Patch by Robert Thompson ([email protected]): Added icon support,
	    fixed calculations for form size
	  - Added support for localized strings and icons
	  - Improved form size calculations, added border
	- ListView.cs: Removed border_style field (now in Control)
	- X11Structs.cs: Moved several structs from X11 driver here
	- X11Keyboard.cs: Changed debug message
	- Application.cs: Removed FormParent concept support
	- CommonDialog.cs:
	  - Resetting end_modal flag
	  - Removed FormParent concept support
	- NativeWindow.cs: Removed FormParent concept support
	- XplatUIX11.cs: Rewritten, now using the new Hwnd class, implementing
	  Client area and Non-Client whole window to allow support for WM_NC
	  messages
	- XplatUIOSX.cs: Updated to match latest driver spec; added exception
	  prevent using it until it supports Hwnd as per Geoff Norton's request
	- ToolBar.cs: Fixed drawing, was not doing proper drawing
	- PictureBox.cs: Removed border_style field, now in Control
	- XplatUIWin32.cs: Added new driver methods


svn path=/trunk/mcs/; revision=40588
2005-02-13 21:27:41 +00:00

101 lines
2.6 KiB
C#

//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// Copyright (c) 2004-2005 Novell, Inc.
//
// Authors:
// John BouAntoun [email protected]
//
using System.ComponentModel;
namespace System.Windows.Forms {
[TypeConverter(typeof(SelectionRangeConverter))]
public sealed class SelectionRange {
#region local members
DateTime end;
DateTime start;
#endregion // local members
#region public constructors
// default parameterless construcor, use default values
public SelectionRange () {
}
// constructor that receives another range, copies it's Start and End values
public SelectionRange (SelectionRange selectionRange) {
end = selectionRange.End;
start = selectionRange.Start;
}
// constructor that receives two dates, uses the lower of the two as start
public SelectionRange (DateTime lower, DateTime upper) {
if (lower <= upper) {
end = upper;
start = lower;
} else {
end = lower;
start = upper;
}
}
#endregion // public constructors
#region public properties
// end date of this range
public DateTime End {
set {
if (end != value) {
end = value;
}
}
get {
return end;
}
}
// start date of this range
public DateTime Start {
set {
if (start != value) {
start = value;
}
}
get {
return start;
}
}
#endregion // public properties
#region public methods
public override string ToString() {
return "SelectionRange: Start: " + Start.ToString() + ", End: " + End.ToString();
}
#endregion // public methods
}
}