├── StdControls
├── Grid
│ └── empty.txt
├── Images
│ ├── Eq.ico
│ ├── Na.ico
│ ├── Ok.png
│ ├── Up.ico
│ ├── Up.png
│ ├── Down.ico
│ ├── Down.png
│ ├── Fail.png
│ ├── Na2.ico
│ ├── Question.png
│ ├── ActiveBell.ico
│ ├── AnalogClock.bmp
│ ├── InactiveBell.ico
│ ├── RingingBell.ico
│ ├── LoadingCircle.bmp
│ └── reviewcomment.bmp
├── Common
│ ├── LoadingCircle.cs
│ ├── GroupableListView.cs
│ ├── LoadingCircle.Designer.cs
│ ├── LoadingCircleToolStripMenuItem.cs
│ ├── ScrollingLabelToolStripMenuItem.cs
│ ├── GaugeControl.Designer.cs
│ ├── IPAddressControl.designer.cs
│ ├── WatermarkedTextBox.Designer.cs
│ ├── WatermarkedRichTextBox.Designer.cs
│ ├── ImageCombo.resx
│ ├── ImageComboItem.cs
│ └── ImageCombo.cs
├── GridView
│ ├── DataGridViewPrint.cs
│ ├── DataGridViewImageCellEmptyRow.cs
│ ├── DataGridViewBackgroudImage.cs
│ └── DataGridViewColoredTextBox.cs
├── LView
│ ├── ListViewPrint.cs
│ └── ListViewItemComparer.cs
├── LBox
│ ├── FixedSizeCache.cs
│ └── KryptonVirtualListBox.resx
└── TView
│ └── ShellIcon.cs
├── sgKey.snk
├── GlassButton.bmp
├── Resources
├── Ok.bmp
├── Up.png
├── Down.png
├── Fail.bmp
├── Arrow_Up.ico
├── Grip2003.ico
├── Grip2007.ico
├── palette.bmp
├── Arrow_Down.ico
├── DefaultIcon.ico
├── DropDown2003.ico
└── DropDown2007.ico
├── Wizard
├── Wizard.bmp
├── wizBigOnlineFolder.gif
├── HeaderDesigner.cs
├── InfoPageDesigner.cs
├── InfoContainerDesigner.cs
├── WizardPageDesigner.cs
├── WizardPage.resx
├── PageEventHandler.cs
└── InfoPage.cs
├── Charting
├── DataBar.bmp
├── DataChart.bmp
├── AquaGauge.Designer.cs
├── KryptonAquaGauge.cs
├── DataBar.cs
└── KryptonLxLedControlcs.cs
├── ExtendedRenderer.suo
├── GroupableKryptonListView.cs
├── VSTemplates
├── OutlookBar.zip
├── OutlookBarVB.zip
├── OutlookBarProject.zip
├── OutlookBarVBProject.zip
└── VS_HowTol.txt
├── AC.ExtendedRenderer.Toolkit.suo
├── README.md
├── AC.ExtendedRenderer.Toolkit.v11.suo
├── KryptonOutlookGrid
├── Resources
│ ├── element.png
│ ├── star0.png
│ ├── star1.png
│ ├── star2.png
│ ├── star3.png
│ ├── star4.png
│ ├── star5.png
│ ├── starhot0.png
│ ├── starhot1.png
│ ├── starhot2.png
│ ├── starhot3.png
│ ├── starhot4.png
│ ├── starhot5.png
│ ├── CollapseIcon.png
│ ├── ExpandIcon.png
│ ├── fit_to_size.png
│ ├── star_yellow.png
│ ├── ExpandIcon2010.png
│ ├── element_delete.png
│ ├── navigate_minus.png
│ ├── navigate_plus.png
│ ├── CollapseIcon2010.png
│ ├── sort_az_ascending2.png
│ ├── sort_az_descending2.png
│ ├── star_yellow_half_16.png
│ ├── sort_up_down_delete_16.png
│ ├── star_yellow_disabled.png
│ └── element_selection_delete.png
├── OutlookGridColumnEventArgs.cs
├── OutlookGrid.designer.cs
├── KryptonOutlookGridGroupBox.Designer.cs
├── OutlookGridGroupBoxColumn.cs
├── OutlookGridColumnCollection.cs
├── OutlookGridGroupCollection.cs
└── IOutlookGridGroup.cs
├── AC.ExtendedRenderer.Toolkit.sln.docstates
├── AC.ExtendedRenderer.Toolkit.sln.docstates.suo
├── Drawing
├── Office2007ColorPickerToolStripMenuItem.cs
├── ColorChangedEventArgs.cs
├── Office2007ColorPicker.Designer.cs
├── Office2007ColorPlate.Designer.cs
└── Office2007MenuHelper.cs
├── AC.ExtendedRenderer.Toolkit.csproj.user
├── Calendar
├── MonthViewMontEventArgs.cs
├── CalendarDaysMode.cs
├── ISelectableElement.cs
├── ICalendarSelectableElement.cs
├── CalendarItemImageAlign.cs
├── CalendarItemEventArgs.cs
├── CalendarItemCancelEventArgs.cs
├── CalendarRendererItemEventArgs.cs
├── CalendarDayEventArgs.cs
├── CalendarTextBox.cs
├── CalendarTimeScale.cs
├── CalendarRendererDayEventArgs.cs
├── CalendarRendererTimeUnitEventArgs.cs
├── CalendarLoadEventArgs.cs
├── CalendarDayTop.cs
├── CalendarRendererItemBoundsEventArgs.cs
├── KryptonCalendar-how to Kryptonize.txt
├── MonthViewDay.cs
├── CalendarSelectableElement.cs
├── CalendarHighlightRange.cs
└── CalendarRendererEventArgs.cs
├── CalendarLibrary
├── CalendarTimeSpan.cs
├── Calendar.Designer.cs
├── WeekDayColumn.cs
├── WeekRow.cs
├── DayColumnHeaderCell.cs
├── HalfWeekColumn.cs
├── AppointmentAdd.cs
├── CalendarItem.cs
├── DayRowHeaderCell.cs
└── WeekRowHeaderCell.cs
├── Palette
├── CustomKryptonPalette.cs
└── CreamPalette.cs
├── TreeGridView
├── TreeGridNodeParentBuilder.cs
└── TreeGridEvents.cs
├── Scrollbar
└── CustomScrollBar
│ ├── ScrollBarOrientation.cs
│ ├── ScrollBarState.cs
│ ├── ScrollBarArrowButtonState.cs
│ └── ScrollBarControlDesigner.cs
├── Utils
├── ToolStripControlHostFixed.cs
├── FadeForm.cs
└── Utility.cs
├── KryptonMonthCalendar.cs
├── AC.ExtendedRenderer.Toolkit.sln
├── KryptonViewBar.Designer.cs
├── KryptonSliderBar.Designer.cs
├── KryptonComboBoxEnhanced.Designer.cs
├── Navigator
├── KryptonFlatTabControl.Designer.cs
└── CustomNavigatorButton.cs
├── Properties
└── AssemblyInfo.cs
├── KryptonViewButtons.cs
├── KryptonBorderedLabel.cs
├── GlassButton.Designer.cs
├── KryptonCollapseContainer.Designer.cs
├── KryptonSliderButton.Designer.cs
├── Renderer
├── DisplayInformation.cs
└── ThemedControls
│ ├── ThemedLabel.cs
│ └── ThemedButton.cs
├── KryptonProgress.cs
├── KryptonCustomButton.cs
├── KryptonTimeFrame.cs
└── KryptonImageComboBox.cs
/StdControls/Grid/empty.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sgKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/sgKey.snk
--------------------------------------------------------------------------------
/GlassButton.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/GlassButton.bmp
--------------------------------------------------------------------------------
/Resources/Ok.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Ok.bmp
--------------------------------------------------------------------------------
/Resources/Up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Up.png
--------------------------------------------------------------------------------
/Wizard/Wizard.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Wizard/Wizard.bmp
--------------------------------------------------------------------------------
/Charting/DataBar.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Charting/DataBar.bmp
--------------------------------------------------------------------------------
/ExtendedRenderer.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/ExtendedRenderer.suo
--------------------------------------------------------------------------------
/Resources/Down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Down.png
--------------------------------------------------------------------------------
/Resources/Fail.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Fail.bmp
--------------------------------------------------------------------------------
/Charting/DataChart.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Charting/DataChart.bmp
--------------------------------------------------------------------------------
/Resources/Arrow_Up.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Arrow_Up.ico
--------------------------------------------------------------------------------
/Resources/Grip2003.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Grip2003.ico
--------------------------------------------------------------------------------
/Resources/Grip2007.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Grip2007.ico
--------------------------------------------------------------------------------
/Resources/palette.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/palette.bmp
--------------------------------------------------------------------------------
/Resources/Arrow_Down.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/Arrow_Down.ico
--------------------------------------------------------------------------------
/Resources/DefaultIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/DefaultIcon.ico
--------------------------------------------------------------------------------
/StdControls/Images/Eq.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Eq.ico
--------------------------------------------------------------------------------
/StdControls/Images/Na.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Na.ico
--------------------------------------------------------------------------------
/StdControls/Images/Ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Ok.png
--------------------------------------------------------------------------------
/StdControls/Images/Up.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Up.ico
--------------------------------------------------------------------------------
/StdControls/Images/Up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Up.png
--------------------------------------------------------------------------------
/GroupableKryptonListView.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/GroupableKryptonListView.cs
--------------------------------------------------------------------------------
/Resources/DropDown2003.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/DropDown2003.ico
--------------------------------------------------------------------------------
/Resources/DropDown2007.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Resources/DropDown2007.ico
--------------------------------------------------------------------------------
/StdControls/Images/Down.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Down.ico
--------------------------------------------------------------------------------
/StdControls/Images/Down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Down.png
--------------------------------------------------------------------------------
/StdControls/Images/Fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Fail.png
--------------------------------------------------------------------------------
/StdControls/Images/Na2.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Na2.ico
--------------------------------------------------------------------------------
/VSTemplates/OutlookBar.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/VSTemplates/OutlookBar.zip
--------------------------------------------------------------------------------
/VSTemplates/OutlookBarVB.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/VSTemplates/OutlookBarVB.zip
--------------------------------------------------------------------------------
/Wizard/wizBigOnlineFolder.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Wizard/wizBigOnlineFolder.gif
--------------------------------------------------------------------------------
/AC.ExtendedRenderer.Toolkit.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/AC.ExtendedRenderer.Toolkit.suo
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ExtendedRenderer
2 | A toolkit companion for Krypton Toolkit (https://github.com/ComponentFactory/Krypton)
3 |
--------------------------------------------------------------------------------
/StdControls/Images/Question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/Question.png
--------------------------------------------------------------------------------
/AC.ExtendedRenderer.Toolkit.v11.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/AC.ExtendedRenderer.Toolkit.v11.suo
--------------------------------------------------------------------------------
/StdControls/Common/LoadingCircle.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Common/LoadingCircle.cs
--------------------------------------------------------------------------------
/StdControls/Images/ActiveBell.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/ActiveBell.ico
--------------------------------------------------------------------------------
/StdControls/Images/AnalogClock.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/AnalogClock.bmp
--------------------------------------------------------------------------------
/StdControls/Images/InactiveBell.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/InactiveBell.ico
--------------------------------------------------------------------------------
/StdControls/Images/RingingBell.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/RingingBell.ico
--------------------------------------------------------------------------------
/VSTemplates/OutlookBarProject.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/VSTemplates/OutlookBarProject.zip
--------------------------------------------------------------------------------
/VSTemplates/OutlookBarVBProject.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/VSTemplates/OutlookBarVBProject.zip
--------------------------------------------------------------------------------
/StdControls/Images/LoadingCircle.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/LoadingCircle.bmp
--------------------------------------------------------------------------------
/StdControls/Images/reviewcomment.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Images/reviewcomment.bmp
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/element.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/element.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star0.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star1.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star2.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star3.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star4.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star5.png
--------------------------------------------------------------------------------
/StdControls/Common/GroupableListView.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Common/GroupableListView.cs
--------------------------------------------------------------------------------
/AC.ExtendedRenderer.Toolkit.sln.docstates:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/AC.ExtendedRenderer.Toolkit.sln.docstates
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/starhot0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/starhot0.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/starhot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/starhot1.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/starhot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/starhot2.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/starhot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/starhot3.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/starhot4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/starhot4.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/starhot5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/starhot5.png
--------------------------------------------------------------------------------
/StdControls/GridView/DataGridViewPrint.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/GridView/DataGridViewPrint.cs
--------------------------------------------------------------------------------
/AC.ExtendedRenderer.Toolkit.sln.docstates.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/AC.ExtendedRenderer.Toolkit.sln.docstates.suo
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/CollapseIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/CollapseIcon.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/ExpandIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/ExpandIcon.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/fit_to_size.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/fit_to_size.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star_yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star_yellow.png
--------------------------------------------------------------------------------
/StdControls/Common/LoadingCircle.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Common/LoadingCircle.Designer.cs
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/ExpandIcon2010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/ExpandIcon2010.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/element_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/element_delete.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/navigate_minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/navigate_minus.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/navigate_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/navigate_plus.png
--------------------------------------------------------------------------------
/Drawing/Office2007ColorPickerToolStripMenuItem.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/Drawing/Office2007ColorPickerToolStripMenuItem.cs
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/CollapseIcon2010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/CollapseIcon2010.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/sort_az_ascending2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/sort_az_ascending2.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/sort_az_descending2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/sort_az_descending2.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star_yellow_half_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star_yellow_half_16.png
--------------------------------------------------------------------------------
/StdControls/Common/LoadingCircleToolStripMenuItem.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Common/LoadingCircleToolStripMenuItem.cs
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/sort_up_down_delete_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/sort_up_down_delete_16.png
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/star_yellow_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/star_yellow_disabled.png
--------------------------------------------------------------------------------
/StdControls/Common/ScrollingLabelToolStripMenuItem.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/StdControls/Common/ScrollingLabelToolStripMenuItem.cs
--------------------------------------------------------------------------------
/KryptonOutlookGrid/Resources/element_selection_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncarp/ExtendedRenderer/HEAD/KryptonOutlookGrid/Resources/element_selection_delete.png
--------------------------------------------------------------------------------
/AC.ExtendedRenderer.Toolkit.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ShowAllFiles
5 |
6 |
--------------------------------------------------------------------------------
/Calendar/MonthViewMontEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | public class MonthViewMontEventArgs
8 |
9 | {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/CalendarLibrary/CalendarTimeSpan.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
6 | {
7 | public class CalendarTimeSpan
8 | {
9 | public DateTime Start { get; set; }
10 | public DateTime Ende { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Palette/CustomKryptonPalette.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using ComponentFactory.Krypton.Toolkit;
6 | using System.Reflection;
7 |
8 | namespace AC.ExtendedRenderer.Toolkit
9 | {
10 | class CustomKryptonPalette:KryptonPalette
11 | {
12 | CustomKryptonPalette()
13 | {
14 | }
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/TreeGridView/TreeGridNodeParentBuilder.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualBasic;
2 | using System;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 | using System.Data;
6 | using System.Diagnostics;
7 | using System.Windows.Forms;
8 | using System.Text;
9 |
10 | namespace AC.ExtendedRenderer.Toolkit
11 | {
12 | public class TreeGridNodeParentBuilder
13 | {
14 |
15 | }
16 | }
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/VSTemplates/VS_HowTol.txt:
--------------------------------------------------------------------------------
1 | - Add the AC.ExtendedRenderer.Toolkit assembly to the toolkit (open a project, on the toolkit, right click and then, choose items ... browse to the dll folder)
2 |
3 | - Copy the zip files (xxxproject.zip files) to the VisualStudio template directory in the "My Documents" folder, ie: C:\Users\UserName\Documents\Visual Studio 2008\Templates\ProjectTemplates
4 |
5 | - Copy the other two zip files to the item template folder, ie: C:\Users\UserName\Documents\Visual Studio 2008\Templates\ItemTemplates
--------------------------------------------------------------------------------
/Scrollbar/CustomScrollBar/ScrollBarOrientation.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.ScrollBar
2 | {
3 | ///
4 | /// Enum for the scrollbar orientation.
5 | ///
6 | public enum ScrollBarOrientation
7 | {
8 | ///
9 | /// Indicates a horizontal scrollbar.
10 | ///
11 | Horizontal,
12 |
13 | ///
14 | /// Indicates a vertical scrollbar.
15 | ///
16 | Vertical
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Drawing/ColorChangedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | public class ColorChangedEventArgs:EventArgs
4 | {
5 |
6 | private ColorHandler.RGB mRGB;
7 | private ColorHandler.HSV mHSV;
8 |
9 | public ColorChangedEventArgs ( ColorHandler.RGB RGB, ColorHandler.HSV HSV)
10 | {
11 | mRGB = RGB;
12 | mHSV = HSV;
13 | }
14 |
15 | public ColorHandler.RGB RGB
16 | {
17 | get
18 | {
19 | return mRGB;
20 | }
21 | }
22 |
23 | public ColorHandler.HSV HSV
24 | {
25 | get
26 | {
27 | return mHSV;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/Utils/ToolStripControlHostFixed.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 | using System.Windows.Forms.Design;
6 | using System.ComponentModel;
7 | using System.Drawing;
8 |
9 | namespace AC.ExtendedRenderer.Toolkit.Utils
10 | {
11 | public class ToolStripControlHostFixed : ToolStripControlHost
12 | {
13 | public ToolStripControlHostFixed()
14 | : base(new Control())
15 | {
16 | }
17 |
18 | public ToolStripControlHostFixed(Control c)
19 | : base(c)
20 | {
21 | }
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Calendar/CalendarDaysMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Enumerates the possible modes of the days visualization on the
9 | ///
10 | public enum CalendarDaysMode
11 | {
12 | ///
13 | /// A short version of the day is visible without time scale.
14 | ///
15 | Short,
16 |
17 | ///
18 | /// The day is fully visible with time scale.
19 | ///
20 | Expanded
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Calendar/ISelectableElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | ///
9 | /// Represents a clickable element of control
10 | ///
11 | public interface ISelectableElement
12 | {
13 |
14 | ///
15 | /// Gets the bounds of the element
16 | ///
17 | Rectangle Bounds { get; }
18 |
19 | ///
20 | /// Gets if the element is currently selected
21 | ///
22 | bool Selected { get; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/StdControls/LView/ListViewPrint.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Drawing.Printing;
8 | using System.Text;
9 | using System.Windows.Forms;
10 | using System.Windows.Forms.VisualStyles;
11 | using System.Collections;
12 | using System.Reflection;
13 | using Microsoft.VisualBasic.CompilerServices;
14 | using Microsoft.VisualBasic;
15 | using System.Runtime.InteropServices;
16 |
17 | namespace AC.StdControls.Toolkit.LView
18 | {
19 | [ToolboxBitmap(typeof(System.Windows.Forms.ListView)), ToolboxItem(false)]
20 | public class ListViewPrint : PrintDocument
21 | {
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Calendar/ICalendarSelectableElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | ///
9 | /// Interface implemented by every selectable element of the calendar
10 | ///
11 | public interface ICalendarSelectableElement
12 | : ISelectableElement, IComparable
13 | {
14 |
15 | ///
16 | /// Gets the calendar this element belongs to
17 | ///
18 | Calendar Calendar { get; }
19 |
20 | ///
21 | /// Gets the calendar
22 | ///
23 | DateTime Date { get; }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Calendar/CalendarItemImageAlign.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Possible alignment for images
9 | ///
10 | public enum CalendarItemImageAlign
11 | {
12 | ///
13 | /// Image is drawn at north of text
14 | ///
15 | North,
16 |
17 | ///
18 | /// Image is drawn at south of text
19 | ///
20 | South,
21 |
22 | ///
23 | /// Image is drawn at east of text
24 | ///
25 | East,
26 |
27 | ///
28 | /// Image is drawn at west of text
29 | ///
30 | West,
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Scrollbar/CustomScrollBar/ScrollBarState.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.ScrollBar
2 | {
3 | ///
4 | /// The scrollbar states.
5 | ///
6 | internal enum ScrollBarState
7 | {
8 | ///
9 | /// Indicates a normal scrollbar state.
10 | ///
11 | Normal,
12 |
13 | ///
14 | /// Indicates a hot scrollbar state.
15 | ///
16 | Hot,
17 |
18 | ///
19 | /// Indicates an active scrollbar state.
20 | ///
21 | Active,
22 |
23 | ///
24 | /// Indicates a pressed scrollbar state.
25 | ///
26 | Pressed,
27 |
28 | ///
29 | /// Indicates a disabled scrollbar state.
30 | ///
31 | Disabled
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/KryptonMonthCalendar.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using System.Drawing;
6 | using System.Drawing.Drawing2D;
7 | using System.Windows.Forms;
8 | using ComponentFactory.Krypton.Toolkit;
9 |
10 | namespace AC.ExtendedRenderer.Toolkit
11 | {
12 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.MonthCalendar))]
13 | public class KryptonMonthCalendar : ComponentFactory.Krypton.Toolkit.KryptonMonthCalendar
14 | {
15 |
16 | public KryptonMonthCalendar()
17 | {
18 | //set some Styles
19 | SetStyle(ControlStyles.SupportsTransparentBackColor |ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
20 | UpdateStyles();
21 |
22 | //Init today date
23 | this.TodayDate = DateTime.Today;
24 | }
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Wizard/HeaderDesigner.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms.Design;
3 |
4 | namespace AC.ExtendedRenderer.Toolkit.Wizard
5 | {
6 | ///
7 | ///
8 | ///
9 | public class HeaderDesigner : ParentControlDesigner
10 | {
11 |
12 | ///
13 | /// Prevents the grid from being drawn on the Wizard
14 | ///
15 | protected override bool DrawGrid
16 | {
17 | get { return false; }
18 | }
19 |
20 | ///
21 | /// Drops the BackgroundImage property
22 | ///
23 | /// properties to remove BackGroundImage from
24 | protected override void PreFilterProperties(System.Collections.IDictionary properties)
25 | {
26 | base.PreFilterProperties (properties);
27 | if (properties.Contains("BackgroundImage") == true)
28 | properties.Remove("BackgroundImage");
29 | if (properties.Contains("DrawGrid") == true)
30 | properties.Remove("DrawGrid");
31 | }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Calendar/CalendarItemEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.ComponentModel;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | public class CalendarItemEventArgs
9 | : EventArgs
10 | {
11 | #region Ctor
12 |
13 | ///
14 | /// Creates a new
15 | ///
16 | /// Related Item
17 | public CalendarItemEventArgs(CalendarItem item)
18 | {
19 | _item = item;
20 | }
21 |
22 | #endregion
23 |
24 | #region Props
25 |
26 | private CalendarItem _item;
27 |
28 | ///
29 | /// Gets the related to the event
30 | ///
31 | public CalendarItem Item
32 | {
33 | get { return _item; }
34 | }
35 |
36 |
37 | #endregion
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/AC.ExtendedRenderer.Toolkit.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AC.ExtendedRenderer.Toolkit", "AC.ExtendedRenderer.Toolkit.csproj", "{8DAB2F17-3B7C-4324-ABF7-CF52CEC098F3}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {8DAB2F17-3B7C-4324-ABF7-CF52CEC098F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {8DAB2F17-3B7C-4324-ABF7-CF52CEC098F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {8DAB2F17-3B7C-4324-ABF7-CF52CEC098F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {8DAB2F17-3B7C-4324-ABF7-CF52CEC098F3}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/Calendar/CalendarItemCancelEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.ComponentModel;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | public class CalendarItemCancelEventArgs
9 | : CancelEventArgs
10 | {
11 | #region Ctor
12 |
13 | ///
14 | /// Creates a new
15 | ///
16 | /// Related Item
17 | public CalendarItemCancelEventArgs(CalendarItem item)
18 | {
19 | _item = item;
20 | }
21 |
22 | #endregion
23 |
24 | #region Props
25 |
26 | private CalendarItem _item;
27 |
28 | ///
29 | /// Gets the related to the event
30 | ///
31 | public CalendarItem Item
32 | {
33 | get { return _item; }
34 | }
35 |
36 |
37 | #endregion
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Calendar/CalendarRendererItemEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Contains information to render an item
9 | ///
10 | public class CalendarRendererItemEventArgs
11 | : CalendarRendererEventArgs
12 | {
13 | #region Fields
14 | private CalendarItem _item;
15 | #endregion
16 |
17 | #region Ctor
18 |
19 |
20 | public CalendarRendererItemEventArgs(CalendarRendererEventArgs original, CalendarItem item)
21 | : base(original)
22 | {
23 | _item = item;
24 | }
25 |
26 | #endregion
27 |
28 | #region Props
29 |
30 | ///
31 | /// Gets the Item being rendered
32 | ///
33 | public CalendarItem Item
34 | {
35 | get { return _item; }
36 | }
37 |
38 |
39 | #endregion
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Wizard/InfoPageDesigner.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms.Design;
3 | //If you are misssing ParentControlDesigner, then don't forget that you need a reference in
4 | //this project to System.Design
5 |
6 | namespace AC.ExtendedRenderer.Toolkit.Wizard
7 | {
8 | ///
9 | ///
10 | ///
11 | public class InfoPageDesigner : ParentControlDesigner
12 | {
13 |
14 | ///
15 | /// Prevents the grid from being drawn on the Wizard
16 | ///
17 | protected override bool DrawGrid
18 | {
19 | get { return false; }
20 | }
21 |
22 | ///
23 | /// Drops the BackgroundImage property
24 | ///
25 | /// properties to remove BackGroundImage from
26 | protected override void PreFilterProperties(System.Collections.IDictionary properties)
27 | {
28 | base.PreFilterProperties (properties);
29 | if (properties.Contains("BackgroundImage") == true)
30 | properties.Remove("BackgroundImage");
31 | }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CalendarLibrary/Calendar.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
2 | {
3 | partial class Calendar
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Calendar/CalendarDayEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Event data with a element
9 | ///
10 | public class CalendarDayEventArgs
11 | :EventArgs
12 | {
13 | #region Ctor
14 |
15 | ///
16 | /// Creates a new event with the specified day
17 | ///
18 | /// Day of the event
19 | public CalendarDayEventArgs(CalendarDay day)
20 | {
21 | _calendarDay = day;
22 | }
23 |
24 | #endregion
25 |
26 | #region Props
27 | private CalendarDay _calendarDay;
28 |
29 | ///
30 | /// Gets the day related to the event
31 | ///
32 | public CalendarDay CalendarDay
33 | {
34 | get { return _calendarDay; }
35 | }
36 |
37 | #endregion
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Wizard/InfoContainerDesigner.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms.Design;
3 | //If you are misssing ParentControlDesigner, then don't forget that you need a reference in
4 | //this project to System.Design
5 |
6 | namespace AC.ExtendedRenderer.Toolkit.Wizard
7 | {
8 | ///
9 | ///
10 | ///
11 | public class InfoContainerDesigner : ParentControlDesigner
12 | {
13 |
14 | // ///
15 | // /// Prevents the grid from being drawn on the Wizard
16 | // ///
17 | // protected override bool DrawGrid
18 | // {
19 | // get { return false; }
20 | // }
21 |
22 | ///
23 | /// Drops the BackgroundImage property
24 | ///
25 | /// properties to remove BackGroundImage from
26 | protected override void PreFilterProperties(System.Collections.IDictionary properties)
27 | {
28 | base.PreFilterProperties (properties);
29 | if (properties.Contains("BackgroundImage") == true)
30 | properties.Remove("BackgroundImage");
31 | }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Drawing/Office2007ColorPicker.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.Drawing
2 | {
3 | partial class Office2007ColorPicker
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/StdControls/GridView/DataGridViewImageCellEmptyRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Windows.Forms.VisualStyles;
10 | using System.Collections;
11 | using System.Reflection;
12 | using Microsoft.VisualBasic.CompilerServices;
13 | using AC.ExtendedRenderer.Toolkit.Drawing;
14 |
15 | namespace AC.StdControls.Toolkit.GridView
16 | {
17 | public class DataGridViewImageCellEmptyRow : DataGridViewImageCell
18 | {
19 | // Methods
20 | public DataGridViewImageCellEmptyRow()
21 | {
22 | }
23 |
24 | public DataGridViewImageCellEmptyRow(bool valueIsIcon)
25 | : base(valueIsIcon)
26 | {
27 | }
28 |
29 | // Properties
30 | public override object DefaultNewRowValue
31 | {
32 | get
33 | {
34 | return DBNull.Value;
35 | }
36 | }
37 | }
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/Calendar/CalendarTextBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | public class CalendarTextBox
9 | : TextBox
10 | {
11 | #region Fields
12 | private Calendar _calendar;
13 | #endregion
14 |
15 | #region Ctor
16 |
17 | ///
18 | /// Creates a new for the specified
19 | ///
20 | /// Calendar where this control lives
21 | public CalendarTextBox(Calendar calendar)
22 | {
23 | _calendar = calendar;
24 | }
25 |
26 | #endregion
27 |
28 | #region Props
29 |
30 | ///
31 | /// Gets the calendar where this control lives
32 | ///
33 | public Calendar Calendar
34 | {
35 | get { return _calendar; }
36 | }
37 |
38 |
39 | #endregion
40 |
41 | #region Methods
42 |
43 |
44 |
45 | #endregion
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/KryptonViewBar.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit
2 | {
3 | partial class KryptonViewBar
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/KryptonSliderBar.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit
2 | {
3 | partial class KryptonSliderBar
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/KryptonComboBoxEnhanced.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit
2 | {
3 | partial class KryptonComboBoxEnhanced
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/StdControls/Common/GaugeControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.StdControls.Toolkit.Common
2 | {
3 |
4 | partial class Gauge
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Component Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | components = new System.ComponentModel.Container();
33 | }
34 |
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/StdControls/Common/IPAddressControl.designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.StdControls.Toolkit.Common
2 | {
3 | partial class IPAddressControl
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected new void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | }
21 |
22 | #region Component Designer generated code
23 |
24 | ///
25 | /// Required method for Designer support - do not modify
26 | /// the contents of this method with the code editor.
27 | ///
28 | private void InitializeComponent()
29 | {
30 | this.SuspendLayout();
31 | this.ResumeLayout(false);
32 |
33 | }
34 |
35 | #endregion
36 |
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Calendar/CalendarTimeScale.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Enumerates possible timescales for control
9 | ///
10 | public enum CalendarTimeScale
11 | {
12 | ///
13 | /// Makes calendar show intervals of 60 minutes
14 | ///
15 | SixtyMinutes = 60,
16 |
17 | ///
18 | /// Makes calendar show intervals of 30 minutes
19 | ///
20 | ThirtyMinutes = 30,
21 |
22 | ///
23 | /// Makes calendar show intervals of 15 minutes
24 | ///
25 | FifteenMinutes = 15,
26 |
27 | ///
28 | /// Makes calendar show intervals of 10 minutes
29 | ///
30 | TenMinutes = 10,
31 |
32 | ///
33 | /// Makes calendar show intervals of 6 minutes
34 | ///
35 | SixMinutes = 6,
36 |
37 | ///
38 | /// Makes calendar show intervals of 5 minutes
39 | ///
40 | FiveMinutes = 5
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Calendar/CalendarRendererDayEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Contains information about a day to draw on the calendar
9 | ///
10 | public class CalendarRendererDayEventArgs
11 | : CalendarRendererEventArgs
12 | {
13 | #region Fields
14 | private CalendarDay _day;
15 | #endregion
16 |
17 | #region Ctor
18 |
19 | ///
20 | /// Creates a new object
21 | ///
22 | /// Orignal object to copy basic paramters
23 | /// Day to render
24 | public CalendarRendererDayEventArgs(CalendarRendererEventArgs original, CalendarDay day)
25 | : base(original)
26 | {
27 | _day = day;
28 | }
29 |
30 | #endregion
31 |
32 | #region Props
33 |
34 | ///
35 | /// Gets the day to paint
36 | ///
37 | public CalendarDay Day
38 | {
39 | get { return _day; }
40 | }
41 |
42 |
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Navigator/KryptonFlatTabControl.Designer.cs:
--------------------------------------------------------------------------------
1 | using ComponentFactory.Krypton.Toolkit;
2 |
3 | namespace AC.ExtendedRenderer.Navigator
4 | {
5 | partial class KryptonFlatTabControl
6 | {
7 | ///
8 | /// Required designer variable.
9 | ///
10 | private System.ComponentModel.IContainer components = null;
11 |
12 | ///
13 | /// Clean up any resources being used.
14 | ///
15 | /// true if managed resources should be disposed; otherwise, false.
16 | protected override void Dispose(bool disposing)
17 | {
18 | if (disposing && (components != null))
19 | {
20 | components.Dispose();
21 | }
22 | base.Dispose(disposing);
23 | }
24 |
25 | #region Component Designer generated code
26 |
27 | ///
28 | /// Required method for Designer support - do not modify
29 | /// the contents of this method with the code editor.
30 | ///
31 | private void InitializeComponent()
32 | {
33 | components = new System.ComponentModel.Container();
34 |
35 | }
36 |
37 | #endregion
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/OutlookGridColumnEventArgs.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Drawing;
7 |
8 | using System.Reflection;
9 | using System.Windows.Forms;
10 | using ComponentFactory.Krypton.Toolkit;
11 | using System.Diagnostics;
12 |
13 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
14 | {
15 | ///
16 | /// Class for events of the column in the groupbox.
17 | ///
18 | public class OutlookGridColumnEventArgs : EventArgs
19 | {
20 | private OutlookGridColumn column;
21 |
22 | ///
23 | /// Constructor
24 | ///
25 | /// The OutlookGridColumn.
26 | public OutlookGridColumnEventArgs(OutlookGridColumn col)
27 | {
28 | this.column = col;
29 | }
30 |
31 | ///
32 | /// Gets or sets the name of the column.
33 | ///
34 | public OutlookGridColumn Column
35 | {
36 | get
37 | {
38 | return this.column;
39 | }
40 | set
41 | {
42 | this.column = value;
43 | }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/OutlookGrid.designer.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 |
3 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
4 | {
5 | partial class KryptonOutlookGrid
6 | {
7 | ///
8 | /// Required designer variable.
9 | ///
10 | private System.ComponentModel.IContainer components = null;
11 |
12 | /////
13 | ///// Clean up any resources being used.
14 | /////
15 | ///// true if managed resources should be disposed; otherwise, false.
16 | //protected override void Dispose(bool disposing)
17 | //{
18 | // if (disposing && (components != null))
19 | // {
20 | // components.Dispose();
21 | // }
22 | // base.Dispose(disposing);
23 | //}
24 |
25 | #region Component Designer generated code
26 |
27 | ///
28 | /// Required method for Designer support - do not modify
29 | /// the contents of this method with the code editor.
30 | ///
31 | private void InitializeComponent()
32 | {
33 | components = new System.ComponentModel.Container();
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/StdControls/Common/WatermarkedTextBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.StdControls.Toolkit.Common
2 | {
3 | partial class WatermarkedTextBox
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | }
34 |
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/KryptonOutlookGridGroupBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
2 | {
3 | partial class KryptonOutlookGridGroupBox
4 | {
5 | ///
6 | /// Variable nécessaire au concepteur.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | #region Code généré par le Concepteur de composants
11 |
12 | ///
13 | /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
14 | /// le contenu de cette méthode avec l'éditeur de code.
15 | ///
16 | private void InitializeComponent()
17 | {
18 | this.SuspendLayout();
19 | //
20 | // KryptonOutlookGridGroupBox
21 | //
22 | this.AllowDrop = true;
23 | this.Name = "KryptonOutlookGridGroupBox";
24 | this.Size = new System.Drawing.Size(744, 46);
25 | this.DragDrop += new System.Windows.Forms.DragEventHandler(this.KryptonOutlookGridGroupBox_DragDrop);
26 | this.DragEnter += new System.Windows.Forms.DragEventHandler(this.KryptonOutlookGridGroupBox_DragEnter);
27 | this.ResumeLayout(false);
28 |
29 | }
30 |
31 | #endregion
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/StdControls/Common/WatermarkedRichTextBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.StdControls.Toolkit.Common
2 | {
3 | partial class WatermarkedRichTextBox
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | }
34 |
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Calendar/CalendarRendererTimeUnitEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Contains information about a that is about to be painted
9 | ///
10 | public class CalendarRendererTimeUnitEventArgs
11 | : CalendarRendererEventArgs
12 | {
13 | #region Events
14 |
15 | #endregion
16 |
17 | #region Fields
18 | private CalendarTimeScaleUnit _unit;
19 | #endregion
20 |
21 | #region Ctor
22 |
23 | public CalendarRendererTimeUnitEventArgs(CalendarRendererEventArgs original, CalendarTimeScaleUnit unit)
24 | : base(original)
25 | {
26 | _unit = unit;
27 | }
28 |
29 | #endregion
30 |
31 | #region Properties
32 |
33 | ///
34 | /// Gets the unit that is about to be painted
35 | ///
36 | public CalendarTimeScaleUnit Unit
37 | {
38 | get { return _unit; }
39 | }
40 |
41 |
42 | #endregion
43 |
44 | #region Public Methods
45 |
46 | #endregion
47 |
48 | #region Private Methods
49 |
50 | #endregion
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Drawing/Office2007ColorPlate.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.Drawing
2 | {
3 | internal partial class Office2007ColorPlate
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // Office2007ColorPlate
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.Name = "Office2007ColorPlate";
38 | this.Paint += new System.Windows.Forms.PaintEventHandler(this.Office2007ColorPlate_Paint);
39 | this.ResumeLayout(false);
40 |
41 | }
42 |
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Charting/AquaGauge.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.Charting
2 | {
3 | partial class AquaGauge
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // AquaGauge
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.Name = "AquaGauge";
38 | this.ResumeLayout(false);
39 |
40 | }
41 |
42 | #endregion
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Scrollbar/CustomScrollBar/ScrollBarArrowButtonState.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.ScrollBar
2 | {
3 | ///
4 | /// The scrollbar arrow button states.
5 | ///
6 | internal enum ScrollBarArrowButtonState
7 | {
8 | ///
9 | /// Indicates the up arrow is in normal state.
10 | ///
11 | UpNormal,
12 |
13 | ///
14 | /// Indicates the up arrow is in hot state.
15 | ///
16 | UpHot,
17 |
18 | ///
19 | /// Indicates the up arrow is in active state.
20 | ///
21 | UpActive,
22 |
23 | ///
24 | /// Indicates the up arrow is in pressed state.
25 | ///
26 | UpPressed,
27 |
28 | ///
29 | /// Indicates the up arrow is in disabled state.
30 | ///
31 | UpDisabled,
32 |
33 | ///
34 | /// Indicates the down arrow is in normal state.
35 | ///
36 | DownNormal,
37 |
38 | ///
39 | /// Indicates the down arrow is in hot state.
40 | ///
41 | DownHot,
42 |
43 | ///
44 | /// Indicates the down arrow is in active state.
45 | ///
46 | DownActive,
47 |
48 | ///
49 | /// Indicates the down arrow is in pressed state.
50 | ///
51 | DownPressed,
52 |
53 | ///
54 | /// Indicates the down arrow is in disabled state.
55 | ///
56 | DownDisabled
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Wizard/WizardPageDesigner.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms.Design;
3 | using System.ComponentModel.Design;
4 |
5 |
6 | namespace AC.ExtendedRenderer.Toolkit.Wizard
7 | {
8 | ///
9 | /// Summary description for WizardPageDesigner.
10 | ///
11 | public class WizardPageDesigner : ParentControlDesigner
12 | {
13 |
14 |
15 | public override DesignerVerbCollection Verbs
16 | {
17 | get
18 | {
19 | DesignerVerbCollection verbs = new DesignerVerbCollection();
20 | verbs.Add(new DesignerVerb("Remove Page", new EventHandler(handleRemovePage)));
21 |
22 | return verbs;
23 | }
24 | }
25 |
26 | private void handleRemovePage(object sender, EventArgs e)
27 | {
28 | WizardPage page = this.Control as WizardPage;
29 |
30 | IDesignerHost h = (IDesignerHost) GetService(typeof(IDesignerHost));
31 | IComponentChangeService c = (IComponentChangeService) GetService(typeof (IComponentChangeService));
32 |
33 | DesignerTransaction dt = h.CreateTransaction("Remove Page");
34 |
35 | if (page.Parent is Wizard)
36 | {
37 | Wizard wiz = page.Parent as Wizard;
38 |
39 | c.OnComponentChanging(wiz, null);
40 | //Drop from wizard
41 | wiz.Pages.Remove(page);
42 | wiz.Controls.Remove(page);
43 | c.OnComponentChanged(wiz, null, null, null);
44 | h.DestroyComponent(page);
45 | }
46 | else
47 | {
48 | c.OnComponentChanging(page, null);
49 | //Mark for destruction
50 | page.Dispose();
51 | c.OnComponentChanged(page, null, null, null);
52 | }
53 | dt.Commit();
54 | }
55 |
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Calendar/CalendarLoadEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Holds data of a Calendar Loading Items of certain date range
9 | ///
10 | public class CalendarLoadEventArgs
11 | : EventArgs
12 | {
13 | #region Fields
14 | private Calendar _calendar;
15 | private DateTime _dateStart;
16 | private DateTime _dateEnd;
17 |
18 | #endregion
19 |
20 | #region Ctor
21 |
22 | public CalendarLoadEventArgs(Calendar calendar, DateTime dateStart, DateTime dateEnd)
23 | {
24 | _calendar = calendar;
25 | _dateEnd = dateEnd;
26 | _dateStart = dateStart;
27 | }
28 |
29 | #endregion
30 |
31 | #region Props
32 |
33 | ///
34 | /// Gets the calendar that originated the event
35 | ///
36 | public Calendar Calendar
37 | {
38 | get { return _calendar; }
39 | }
40 |
41 | ///
42 | /// Gets the start date of the load
43 | ///
44 | public DateTime DateStart
45 | {
46 | get { return _dateStart; }
47 | set { _dateStart = value; }
48 | }
49 |
50 | ///
51 | /// Gets the end date of the load
52 | ///
53 | public DateTime DateEnd
54 | {
55 | get { return _dateEnd; }
56 | }
57 |
58 |
59 | #endregion
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /********************************************************************/
2 | /* ExtendedRenderer Renderer Project */
3 | /* */
4 | /* Use the ExtendedRenderer class as a custom renderer by */
5 | /* providing it to the ToolStripManager.Renderer property. Then */
6 | /* all tool strips, menu strips, status strips etc will be drawn */
7 | /* using the Office 2007 style renderer in your application. */
8 | /* */
9 | /* Author: Angelo Cresta */
10 | /* Website: www.angelonline.net */
11 | /* Contact: angelo@angelonline.net */
12 | /********************************************************************/
13 |
14 | using System.Reflection;
15 | using System.Runtime.CompilerServices;
16 | using System.Runtime.InteropServices;
17 |
18 | [assembly: AssemblyTitle("AC.ExtendedRenderer.Toolkit")]
19 | [assembly: AssemblyDescription("AC.ExtendedRenderer.Toolkit")]
20 | [assembly: AssemblyConfiguration("")]
21 | [assembly: AssemblyCompany("AdvancedComputing.Ch")]
22 | [assembly: AssemblyProduct("AC.ExtendedRenderer.Toolkit")]
23 | [assembly: AssemblyCopyright("Copyright © AdvancedComputing 2006-2012")]
24 | [assembly: AssemblyTrademark("")]
25 | [assembly: AssemblyCulture("")]
26 | [assembly: ComVisible(false)]
27 | [assembly: Guid("f4bdef7e-9163-40da-9482-0df3bb9a4bfa")]
28 | [assembly: AssemblyVersion("4.4.0.2")]
29 | [assembly: AssemblyFileVersion("4.4.0.2")]
30 |
--------------------------------------------------------------------------------
/KryptonViewButtons.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace AC.ExtendedRenderer.Toolkit
10 | {
11 | [ToolboxItem(true)]
12 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.Button))]
13 | public partial class KryptonViewButtons : UserControl
14 | {
15 |
16 | private string _percentageLabel = "100%";
17 | [Category("ViewButtons"), DefaultValue(typeof(string), "100%")]
18 | public string PercentageLabel
19 | {
20 | get { return _percentageLabel; }
21 | set
22 | {
23 | this.kcmdpercentage.Text = value;
24 | _percentageLabel = value;
25 | Invalidate();
26 | }
27 | }
28 |
29 |
30 | public KryptonViewButtons()
31 | {
32 | InitializeComponent();
33 | //(1) To remove flicker we use double buffering for drawing
34 | SetStyle(ControlStyles.SupportsTransparentBackColor, true);
35 | SetStyle(ControlStyles.AllPaintingInWmPaint, true);
36 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
37 | SetStyle(ControlStyles.ResizeRedraw, true);
38 | SetStyle(ControlStyles.UserPaint, true);
39 |
40 | //Set Back Color
41 | this.BackColor = System.Drawing.Color.Transparent;
42 |
43 | //Set Label Text
44 | this.kcmdpercentage.Text = _percentageLabel;
45 | }
46 |
47 |
48 |
49 |
50 | }
51 | }
--------------------------------------------------------------------------------
/KryptonBorderedLabel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Drawing;
4 | using System.Drawing.Drawing2D;
5 | using System.Drawing.Imaging;
6 | using System.Drawing.Text;
7 | using System.Windows.Forms;
8 | using ComponentFactory.Krypton.Toolkit;
9 |
10 | namespace AC.ExtendedRenderer.Toolkit
11 | {
12 | public class KryptonBorderedLabel : ComponentFactory.Krypton.Toolkit.KryptonLabel
13 | {
14 | public KryptonBorderedLabel()
15 | {
16 | this.SetStyle(ControlStyles.DoubleBuffer, true);
17 | this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
18 | this.SetStyle(ControlStyles.ResizeRedraw, true);
19 | this.SetStyle(ControlStyles.UserPaint, true);
20 | this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
21 | UpdateStyles();
22 |
23 | BackColor = Color.Transparent;
24 | }
25 |
26 |
27 | protected override void OnPaint(PaintEventArgs e)
28 | {
29 | //default Paint
30 | base.OnPaint(e);
31 | //get Forecolor
32 | ForeColor = KryptonManager.CurrentGlobalPalette.GetBorderColor1(PaletteBorderStyle.InputControlCustom1, PaletteState.Normal);
33 | //get Graphics
34 | Graphics screenGraphics = e.Graphics;
35 | //Set Rectangle to draw
36 | Rectangle rect = new Rectangle(e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width - 1, e.ClipRectangle.Height - 1);
37 | //Draw the border
38 | screenGraphics.DrawRectangle(new Pen(ForeColor), rect);
39 |
40 |
41 | }
42 |
43 | }
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/StdControls/GridView/DataGridViewBackgroudImage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Windows.Forms.VisualStyles;
10 | using System.Collections;
11 | using System.Reflection;
12 |
13 | namespace AC.StdControls.Toolkit.GridView
14 | {
15 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.DataGridView)), ToolboxItem(false)]
16 | public class DataGridViewBackgroudImage : DataGridView
17 | {
18 | // Fields
19 | private Image m_Image;
20 |
21 | // Methods
22 | public DataGridViewBackgroudImage()
23 | {
24 | this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
25 | }
26 |
27 | protected override void PaintBackground(Graphics graphics, Rectangle clipBounds, Rectangle gridBounds)
28 | {
29 | if (this.m_Image != null)
30 | {
31 | base.PaintBackground(graphics, clipBounds, gridBounds);
32 | graphics.DrawImage(this.m_Image, gridBounds);
33 | }
34 | else
35 | {
36 | base.PaintBackground(graphics, clipBounds, gridBounds);
37 | }
38 | }
39 |
40 | // Properties
41 | [Category("Appearance"), Description("Set Background Image")]
42 | public Image BackImage
43 | {
44 | get
45 | {
46 | return this.m_Image;
47 | }
48 | set
49 | {
50 | this.m_Image = value;
51 | }
52 | }
53 | }
54 |
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/CalendarLibrary/WeekDayColumn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 | using System.Threading;
10 |
11 |
12 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
13 | {
14 | ///
15 | /// This column is used for Month mode
16 | ///
17 | public class WeekDayColumn : DataGridViewColumn
18 | {
19 | public WeekDayColumn()
20 | {
21 | this.CellTemplate = new DayCell();
22 | this.SortMode = DataGridViewColumnSortMode.NotSortable;
23 | }
24 |
25 | protected override void OnDataGridViewChanged()
26 | {
27 | SetHeaderText();
28 | }
29 |
30 | private void SetHeaderText()
31 | {
32 | try
33 | {
34 | this.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
35 | DateTime dt = new DateTime(2010, 3, 15);
36 | dt = dt.AddDays(Index);
37 | if (this.Index == 0)
38 | this.HeaderCell.Value = dt.ToString("dddd");
39 | else if (this.Index == 1)
40 | this.HeaderCell.Value = dt.ToString("dddd");
41 | else if (this.Index == 2)
42 | this.HeaderCell.Value = dt.ToString("dddd");
43 | else if (this.Index == 3)
44 | this.HeaderCell.Value = dt.ToString("dddd");
45 | else if (this.Index == 4)
46 | this.HeaderCell.Value = dt.ToString("dddd");
47 | else if (this.Index == 5)
48 | this.HeaderCell.Value = dt.ToString("ddd") +"/" + dt.AddDays(1).ToString("ddd"); ;
49 | }
50 | catch (Exception ex)
51 | {
52 | Trace.WriteLine(ex.ToString());
53 | }
54 | }
55 |
56 | }// class
57 | }
58 |
--------------------------------------------------------------------------------
/StdControls/LBox/FixedSizeCache.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 |
4 | namespace AC.StdControls.Toolkit.LBox
5 | {
6 | ///
7 | /// A very simple implementation of a cache for a limited number
8 | /// of objects.
9 | ///
10 | public class FixedSizeCache
11 | {
12 | private const int DEFAULT_CACHE_CAPACITY = 200;
13 |
14 | private int size;
15 | private Hashtable cache;
16 | private Queue keyHistory;
17 |
18 | public void Add(object key, object item)
19 | {
20 | if (cache.Contains(key))
21 | {
22 | // this item may end up being removed inappropriately
23 | // early, since we haven't adjusted the keyHistory
24 | // queue. The assumption is that it is
25 | // quicker to do an additional lookup than rewrite
26 | // the keyHistory queue.
27 | cache[key] = item;
28 | }
29 | else
30 | {
31 | keyHistory.Enqueue(key);
32 | cache.Add(key, item);
33 | if (cache.Count > size)
34 | {
35 | // remove oldest item
36 | object removeKey = keyHistory.Dequeue();
37 | cache.Remove(removeKey);
38 | }
39 | }
40 | }
41 |
42 | public void Clear()
43 | {
44 | cache.Clear();
45 | keyHistory.Clear();
46 | }
47 |
48 | public bool Contains(object key)
49 | {
50 | return cache.Contains(key);
51 | }
52 |
53 | public object this[object key]
54 | {
55 | get
56 | {
57 | return cache[key];
58 | }
59 | }
60 |
61 | public FixedSizeCache(int capacity)
62 | {
63 | if (capacity <= 0)
64 | {
65 | throw new ArgumentException("Cache capacity must be >= 1", "capacity");
66 | }
67 | size = capacity;
68 | cache = new Hashtable();
69 | keyHistory = new Queue();
70 | }
71 |
72 | public FixedSizeCache() : this(DEFAULT_CACHE_CAPACITY)
73 | {
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Wizard/WizardPage.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | text/microsoft-resx
32 |
33 |
34 | 1.0.0.0
35 |
36 |
37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
38 |
39 |
40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
41 |
42 |
43 |
--------------------------------------------------------------------------------
/StdControls/Common/ImageCombo.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | text/microsoft-resx
32 |
33 |
34 | 1.0.0.0
35 |
36 |
37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
38 |
39 |
40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
41 |
42 |
43 |
--------------------------------------------------------------------------------
/StdControls/LBox/KryptonVirtualListBox.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | text/microsoft-resx
32 |
33 |
34 | 1.0.0.0
35 |
36 |
37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
38 |
39 |
40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
41 |
42 |
43 |
--------------------------------------------------------------------------------
/GlassButton.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit
2 | {
3 | partial class GlassButton
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing)
17 | {
18 | if (imageButton != null)
19 | {
20 | imageButton.Parent.Dispose();
21 | imageButton.Parent = null;
22 | imageButton.Dispose();
23 | imageButton = null;
24 | }
25 | DestroyFrames();
26 | if (components != null)
27 | {
28 | components.Dispose();
29 | }
30 | }
31 | base.Dispose(disposing);
32 | }
33 |
34 | #region Component Designer generated code
35 |
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.components = new System.ComponentModel.Container();
43 | this.timer = new System.Windows.Forms.Timer(this.components);
44 | this.SuspendLayout();
45 | //
46 | // timer
47 | //
48 | this.timer.Tick += new System.EventHandler(this.timer_Tick);
49 | this.ResumeLayout(false);
50 |
51 | }
52 |
53 | #endregion
54 |
55 | private System.Windows.Forms.Timer timer;
56 | }
57 | }
--------------------------------------------------------------------------------
/Wizard/PageEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace AC.ExtendedRenderer.Toolkit.Wizard
5 | {
6 | ///
7 | /// Delegate definition for handling NextPageEvents
8 | ///
9 | public delegate void PageEventHandler(object sender, PageEventArgs e);
10 |
11 | ///
12 | /// Arguments passed to an application when Page is closed in a wizard. The Next page to be displayed
13 | /// can be changed, by the application, by setting the NextPage to a wizardPage which is part of the
14 | /// wizard that generated this event.
15 | ///
16 | public class PageEventArgs : EventArgs
17 | {
18 | private int vPage;
19 | private PageCollection vPages;
20 | ///
21 | /// Constructs a new event
22 | ///
23 | /// The index of the next page in the collection
24 | /// Pages in the wizard that are acceptable to be
25 | public PageEventArgs(int index, PageCollection pages) : base()
26 | {
27 | vPage = index;
28 | vPages = pages;
29 | }
30 |
31 | ///
32 | /// Gets/Sets the wizard page that will be displayed next. If you set this it must be to a wizardPage from the wizard.
33 | ///
34 | public WizardPage Page
35 | {
36 | get
37 | {
38 | //Is this a valid page
39 | if (vPage >=0 && vPage
59 | /// Gets the index of the page
60 | ///
61 | public int PageIndex
62 | {
63 | get
64 | {
65 | return vPage;
66 | }
67 | }
68 |
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/KryptonCollapseContainer.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit
2 | {
3 | partial class KryptonCollapseContainer
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KryptonCollapseContainer));
33 | this.imgButtons = new System.Windows.Forms.ImageList(this.components);
34 | this.SuspendLayout();
35 | //
36 | // imgButtons
37 | //
38 | this.imgButtons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgButtons.ImageStream")));
39 | this.imgButtons.TransparentColor = System.Drawing.Color.Transparent;
40 | this.imgButtons.Images.SetKeyName(0, "UpArrow.gif");
41 | this.imgButtons.Images.SetKeyName(1, "DownArrow.gif");
42 | this.ResumeLayout(false);
43 |
44 | }
45 |
46 | #endregion
47 |
48 | internal System.Windows.Forms.ImageList imgButtons;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/OutlookGridGroupBoxColumn.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | using System;
4 | using System.ComponentModel;
5 | using System.Drawing;
6 |
7 | using System.Windows.Forms;
8 |
9 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
10 | {
11 | ///
12 | /// Column for the OutlookGrid GroupBox
13 | ///
14 | public class OutlookGridGroupBoxColumn : IEquatable
15 | {
16 | #region "Constructor"
17 | /////
18 | ///// Constructor
19 | /////
20 | //public OutlookGridGroupBoxColumn()
21 | //{}
22 |
23 | ///
24 | /// Constructor
25 | ///
26 | /// The column name.
27 | /// The display text of the column.
28 | /// The column sort order.
29 | public OutlookGridGroupBoxColumn(string columnName, string columnText, SortOrder sort)
30 | {
31 | Text = columnText;
32 | ColumnName = columnName;
33 | SortOrder = sort;
34 | }
35 | #endregion
36 |
37 | #region "Properties"
38 |
39 | public Rectangle Rect { get; set; }
40 | public string Text { get; set;}
41 | public bool Pressed { get; set; }
42 | public SortOrder SortOrder { get; set; }
43 | public string ColumnName { get; set; }
44 | public bool IsMoving { get; set; }
45 | public bool IsHovered { get; set; }
46 |
47 | #endregion
48 |
49 | #region "Implements"
50 | ///
51 | /// Defines Equals method on the columnName
52 | ///
53 | /// The OutlookGridGroupBoxColumn to compare with.
54 | /// True or False.
55 | public bool Equals(OutlookGridGroupBoxColumn other)
56 | {
57 | return this.ColumnName.Equals(other.ColumnName);
58 | }
59 | #endregion
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/KryptonSliderButton.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit
2 | {
3 | partial class KryptonSliderButton
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 |
15 | #region Component Designer generated code
16 |
17 | ///
18 | /// Required method for Designer support - do not modify
19 | /// the contents of this method with the code editor.
20 | ///
21 | private void InitializeComponent()
22 | {
23 | this.components = new System.ComponentModel.Container();
24 | this.FireTimer = new System.Windows.Forms.Timer(this.components);
25 | this.SuspendLayout();
26 | //
27 | // FireTimer
28 | //
29 | this.FireTimer.Interval = 1000;
30 | this.FireTimer.Tick += new System.EventHandler(this.FireTimer_Tick);
31 | //
32 | // KryptonSliderButton
33 | //
34 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
35 | this.DoubleBuffered = true;
36 | this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
37 | this.Name = "KryptonSliderButton";
38 | this.Size = new System.Drawing.Size(16, 16);
39 | this.MouseLeave += new System.EventHandler(this.KryptonSliderButton_MouseLeave);
40 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.KryptonSliderButton_MouseDown);
41 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.KryptonSliderButton_MouseUp);
42 | this.MouseEnter += new System.EventHandler(this.KryptonSliderButton_MouseEnter);
43 | this.ResumeLayout(false);
44 |
45 | }
46 |
47 | #endregion
48 |
49 | internal System.Windows.Forms.Timer FireTimer;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Calendar/CalendarDayTop.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | ///
9 | /// Represents the top area of a day, where multiday and all day items are stored
10 | ///
11 | public class CalendarDayTop
12 | : CalendarSelectableElement
13 | {
14 | #region Events
15 |
16 | #endregion
17 |
18 | #region Fields
19 | private CalendarDay _day;
20 | private List _passingItems;
21 | #endregion
22 |
23 | #region Ctor
24 |
25 | ///
26 | /// Creates a new DayTop for the specified day
27 | ///
28 | ///
29 | public CalendarDayTop(CalendarDay day)
30 | : base(day.Calendar)
31 | {
32 | _day = day;
33 | _passingItems = new List();
34 | }
35 |
36 | #endregion
37 |
38 | #region Properties
39 |
40 | public override DateTime Date
41 | {
42 | get
43 | {
44 | return new DateTime(Day.Date.Year, Day.Date.Month, Day.Date.Day);
45 | }
46 | }
47 |
48 | ///
49 | /// Gets the Day of this DayTop
50 | ///
51 | public CalendarDay Day
52 | {
53 | get { return _day; }
54 | }
55 |
56 |
57 | ///
58 | /// Gets the list of items passing on this daytop
59 | ///
60 | public List PassingItems
61 | {
62 | get { return _passingItems; }
63 | }
64 |
65 |
66 | #endregion
67 |
68 | #region Public Methods
69 |
70 | #endregion
71 |
72 | #region Private Methods
73 |
74 | internal void AddPassingItem(CalendarItem item)
75 | {
76 | if (!PassingItems.Contains(item))
77 | {
78 | PassingItems.Add(item);
79 | }
80 | }
81 |
82 | #endregion
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/CalendarLibrary/WeekRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 |
10 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
11 | {
12 | ///
13 | /// This class is used for Month mode
14 | ///
15 | public class WeekRow : DataGridViewRow
16 | {
17 | private DateTime m_startTime = DateTime.MinValue;
18 |
19 | public WeekRow()
20 | {
21 | }
22 |
23 | public WeekRow(DateTime startTime) : this()
24 | {
25 | m_startTime = startTime;
26 | }
27 |
28 | public DateTime StartTime
29 | {
30 | get
31 | {
32 | return this.Calendar.StartTime.AddDays(7 * this.Index);
33 | }
34 | }
35 |
36 | public DateTime EndTime
37 | {
38 | get
39 | {
40 | return this.StartTime.AddDays(7);
41 | }
42 | }
43 |
44 | public Calendar Calendar
45 | {
46 | get
47 | {
48 | return this.DataGridView as Calendar;
49 | }
50 | }
51 |
52 | public List CalendarItems
53 | {
54 | get
55 | {
56 | try
57 | {
58 | if (this.Calendar.CalendarItems == null || this.Calendar.CalendarItems.Count <= 0)
59 | return null;
60 |
61 | List items = new List();
62 | for (int i = 0; i < this.Calendar.CalendarItems.Count; i++)
63 | {
64 | DateTime ciStartTime = this.Calendar.CalendarItems[i].StartTime;
65 | DateTime ciEndTime = this.Calendar.CalendarItems[i].EndTime;
66 |
67 | if (((ciStartTime.CompareTo(this.StartTime) <= 0) && (ciEndTime.CompareTo(this.StartTime) > 0))
68 | || ((ciStartTime.CompareTo(this.StartTime) >= 0) && (ciEndTime.CompareTo(this.EndTime) <= 0))
69 | || ((ciStartTime.CompareTo(this.EndTime) < 0) && (ciEndTime.CompareTo(this.EndTime) >= 0)))
70 | {
71 | items.Add(this.Calendar.CalendarItems[i]);
72 | }
73 | }
74 | return items;
75 | }
76 | catch (Exception ex)
77 | {
78 | Trace.WriteLine(ex.ToString());
79 | return null;
80 | }
81 | }
82 | }
83 |
84 | }// class
85 | }
86 |
--------------------------------------------------------------------------------
/Navigator/CustomNavigatorButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.ComponentModel;
4 | using System.ComponentModel.Design;
5 | using System.Drawing;
6 | using System.Drawing.Drawing2D;
7 | using System.Data;
8 | using System.Windows.Forms;
9 | using System.Drawing.Design;
10 | using System.Security.Permissions;
11 | using System.Runtime.InteropServices;
12 | using System.Diagnostics;
13 | using System.IO;
14 | using AC.ExtendedRenderer.Toolkit.Utils;
15 | using AC.ExtendedRenderer.Toolkit.Drawing;
16 | namespace AC.ExtendedRenderer.Toolkit.Navigator
17 | {
18 |
19 | #region ... KryptonNavigatorButton ...
20 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.Button)), ToolboxItem(false)]
21 | public class CustomNavigatorButton : AC.StdControls.Toolkit.Buttons.CustomButton
22 | {
23 |
24 | public CustomNavigatorButton(Color BorderColor, Color GradientStartColor, Color GradientEndColor, Color TextColor)
25 | {
26 |
27 | this.AutoSize = false;
28 |
29 | this.GradientBorderColor = BorderColor;
30 | this.GradientTop = GradientStartColor;
31 | this.GradientBottom = GradientEndColor;
32 | this.Size = new System.Drawing.Size(23, 23);
33 | this.ForeColor = TextColor;
34 | this.TextAlign = ContentAlignment.MiddleCenter;
35 | this.Font = new System.Drawing.Font("Marlett", 11.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)2);
36 |
37 | }
38 |
39 | public CustomNavigatorButton()
40 | {
41 | this.AutoSize = false;
42 | this.Size = new System.Drawing.Size(23, 23);
43 | this.TextAlign = ContentAlignment.MiddleCenter;
44 | this.Font = new System.Drawing.Font("Marlett", 11.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)2);
45 |
46 | }
47 |
48 | protected override void OnPaint(PaintEventArgs pevent)
49 | {
50 | base.OnPaint(pevent);
51 | }
52 |
53 | protected override void Dispose(bool disposing)
54 | {
55 | base.Dispose(disposing);
56 | }
57 | #endregion
58 |
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/TreeGridView/TreeGridEvents.cs:
--------------------------------------------------------------------------------
1 | //---------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | //THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
6 | //KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
7 | //IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
8 | //PARTICULAR PURPOSE.
9 | //---------------------------------------------------------------------
10 | using System;
11 | using System.Collections.Generic;
12 | using System.Text;
13 |
14 | namespace AC.ExtendedRenderer.Toolkit
15 | {
16 | public class TreeGridNodeEventBase
17 | {
18 | private TreeGridNode _node;
19 |
20 | public TreeGridNodeEventBase(TreeGridNode node)
21 | {
22 | this._node = node;
23 | }
24 |
25 | public TreeGridNode Node
26 | {
27 | get { return _node; }
28 | }
29 | }
30 | public class CollapsingEventArgs : System.ComponentModel.CancelEventArgs
31 | {
32 | private TreeGridNode _node;
33 |
34 | private CollapsingEventArgs() { }
35 | public CollapsingEventArgs(TreeGridNode node)
36 | : base()
37 | {
38 | this._node = node;
39 | }
40 | public TreeGridNode Node
41 | {
42 | get { return _node; }
43 | }
44 |
45 | }
46 | public class CollapsedEventArgs : TreeGridNodeEventBase
47 | {
48 | public CollapsedEventArgs(TreeGridNode node)
49 | : base(node)
50 | {
51 | }
52 | }
53 |
54 | public class ExpandingEventArgs:System.ComponentModel.CancelEventArgs
55 | {
56 | private TreeGridNode _node;
57 |
58 | private ExpandingEventArgs() { }
59 | public ExpandingEventArgs(TreeGridNode node):base()
60 | {
61 | this._node = node;
62 | }
63 | public TreeGridNode Node
64 | {
65 | get { return _node; }
66 | }
67 |
68 | }
69 | public class ExpandedEventArgs : TreeGridNodeEventBase
70 | {
71 | public ExpandedEventArgs(TreeGridNode node):base(node)
72 | {
73 | }
74 | }
75 |
76 | public delegate void ExpandingEventHandler(object sender, ExpandingEventArgs e);
77 | public delegate void ExpandedEventHandler(object sender, ExpandedEventArgs e);
78 |
79 | public delegate void CollapsingEventHandler(object sender, CollapsingEventArgs e);
80 | public delegate void CollapsedEventHandler(object sender, CollapsedEventArgs e);
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/CalendarLibrary/DayColumnHeaderCell.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 | using System.Drawing.Drawing2D;
10 |
11 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
12 | {
13 | public class DayColumnHeaderCell : DataGridViewColumnHeaderCell
14 | {
15 |
16 | protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates dataGridViewElementState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
17 | {
18 | try
19 | {
20 | DayColumn dc = this.OwningColumn as DayColumn;
21 | DateTime now = DateTime.Now;
22 | SolidBrush HeaderColorBrush = Calendar.ct.ForeBrush;
23 |
24 | if (now.CompareTo(dc.StartTime) >= 0 && now.CompareTo(dc.EndTime) <= 0)
25 | {
26 | LinearGradientBrush lgb = new LinearGradientBrush(cellBounds, Calendar.ct.HeaderLight, Calendar.ct.HeaderDark, LinearGradientMode.Vertical);
27 | graphics.FillRectangle(lgb, cellBounds);
28 | HeaderColorBrush = new SolidBrush(Calendar.ct.SelectedForeColor);
29 | }
30 | else
31 | {
32 | graphics.FillRectangle(new SolidBrush(Calendar.ct.BackColor), cellBounds);
33 | }
34 |
35 | graphics.DrawRectangle(new Pen(new SolidBrush(Calendar.ct.SeparatorDark)), cellBounds);
36 | graphics.DrawLine(new Pen(new SolidBrush(Calendar.ct.SeparatorDark)), cellBounds.Left, cellBounds.Bottom - 1, cellBounds.Right, cellBounds.Bottom - 1);
37 |
38 | StringFormat sf = new StringFormat();
39 | sf.Alignment = StringAlignment.Center;
40 | sf.LineAlignment = StringAlignment.Center;
41 | sf.Trimming = StringTrimming.EllipsisCharacter;
42 |
43 | RectangleF rect = new RectangleF(cellBounds.Left, cellBounds.Top, cellBounds.Width, cellBounds.Height);
44 | graphics.DrawString(this.Value.ToString(), Calendar.ct.FontStd, HeaderColorBrush, rect, sf);
45 |
46 | }
47 | catch (Exception ex)
48 | {
49 | Trace.WriteLine(ex.ToString());
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Calendar/CalendarRendererItemBoundsEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | public class CalendarRendererItemBoundsEventArgs
9 | : CalendarRendererItemEventArgs
10 | {
11 | #region Fields
12 | private Rectangle _bounds;
13 | private bool _isFirst;
14 | private bool _isLast;
15 | #endregion
16 |
17 | #region Ctor
18 |
19 | ///
20 | /// Creates a new Event
21 | ///
22 | ///
23 | ///
24 | ///
25 | ///
26 | internal CalendarRendererItemBoundsEventArgs(CalendarRendererItemEventArgs original, Rectangle bounds, bool isFirst, bool isLast)
27 | : base(original, original.Item)
28 | {
29 | _isFirst = isFirst;
30 | _isLast = isLast;
31 | _bounds = bounds;
32 | }
33 |
34 | #endregion
35 |
36 | #region Props
37 |
38 | ///
39 | /// Gets the bounds of the item to be rendered.
40 | ///
41 | ///
42 | /// Items may have more than one bounds due to week segmentation.
43 | ///
44 | public Rectangle Bounds
45 | {
46 | get { return _bounds; }
47 | }
48 |
49 | ///
50 | /// Gets a value indicating if the bounds are the first of the item.
51 | ///
52 | ///
53 | /// Items may have more than one bounds due to week segmentation.
54 | ///
55 | public bool IsFirst
56 | {
57 | get { return _isFirst; }
58 | }
59 |
60 | ///
61 | /// Gets a value indicating if the bounds are the last of the item.
62 | ///
63 | ///
64 | /// Items may have more than one bounds due to week segmentation.
65 | ///
66 | public bool IsLast
67 | {
68 | get { return _isLast; }
69 | set { _isLast = value; }
70 | }
71 |
72 |
73 | #endregion
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/CalendarLibrary/HalfWeekColumn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 |
10 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
11 | {
12 | ///
13 | /// This column is used in SevenDay mode
14 | ///
15 | public class HalfWeekColumn : DataGridViewColumn
16 | {
17 | private DateTime m_startTime = DateTime.MinValue;
18 |
19 | public HalfWeekColumn()
20 | {
21 | this.CellTemplate = new DayCell();
22 | }
23 |
24 |
25 | public HalfWeekColumn(DateTime startTime): this()
26 | {
27 | m_startTime = startTime;
28 | }
29 |
30 | public DateTime StartTime
31 | {
32 | get
33 | {
34 | return new DateTime(m_startTime.Year, m_startTime.Month, m_startTime.Day);
35 | }
36 | }
37 |
38 | public DateTime EndTime
39 | {
40 | get
41 | {
42 | if (this.Index == 0)
43 | return this.StartTime.AddDays(3);
44 | else
45 | return this.StartTime.AddDays(4);
46 | }
47 | }
48 |
49 | public Calendar Calendar
50 | {
51 | get
52 | {
53 | return this.DataGridView as Calendar;
54 | }
55 | }
56 |
57 | public List CalendarItems
58 | {
59 | get
60 | {
61 | try
62 | {
63 | if (this.Calendar.CalendarItems == null || this.Calendar.CalendarItems.Count <= 0)
64 | return null;
65 |
66 | List items = new List();
67 | for (int i = 0; i < this.Calendar.CalendarItems.Count; i++)
68 | {
69 | DateTime ciStartTime = this.Calendar.CalendarItems[i].StartTime;
70 | DateTime ciEndTime = this.Calendar.CalendarItems[i].EndTime;
71 |
72 | if (((ciStartTime.CompareTo(this.StartTime) <= 0) && (ciEndTime.CompareTo(this.StartTime) > 0))
73 | || ((ciStartTime.CompareTo(this.StartTime) >= 0) && (ciEndTime.CompareTo(this.EndTime) <= 0))
74 | || ((ciStartTime.CompareTo(this.EndTime) < 0) && (ciEndTime.CompareTo(this.EndTime) >= 0)))
75 | {
76 | items.Add(this.Calendar.CalendarItems[i]);
77 | }
78 | }
79 | return items;
80 | }
81 | catch (Exception ex)
82 | {
83 | Trace.WriteLine(ex.ToString());
84 | return null;
85 | }
86 | }
87 | }
88 |
89 | }// class
90 | }
91 |
--------------------------------------------------------------------------------
/Drawing/Office2007MenuHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Threading;
9 |
10 | namespace AC.ExtendedRenderer.Toolkit.Drawing
11 | {
12 | internal partial class Office2007MenuHelper : Form
13 | {
14 | Control _parentControl;
15 |
16 | private bool _freeze = false;
17 | public bool Freeze
18 | {
19 | get { return _freeze; }
20 | set { _freeze = value; }
21 | }
22 |
23 | public Office2007ColorPlate ColorPlate
24 | {
25 | get { return this.office2007ColorPlate1; }
26 | }
27 |
28 | public Office2007MenuHelper()
29 | {
30 | InitializeComponent();
31 | }
32 |
33 | public void Show(Control parent, Point location)
34 | {
35 | _parentControl = parent;
36 | this.Location = parent.PointToScreen(location);
37 | this.Show();
38 | }
39 |
40 | new public void Hide()
41 | {
42 | base.Hide();
43 | if (_parentControl != null)
44 | {
45 | Form parentForm = _parentControl.FindForm();
46 | if (parentForm != null)
47 | {
48 | parentForm.BringToFront();
49 | }
50 | }
51 | }
52 |
53 | private void Office2007MenuHelper_Deactivate(object sender, EventArgs e)
54 | {
55 | if (!_freeze)
56 | {
57 | Hide();
58 | }
59 | }
60 |
61 | private void Office2007MenuHelper_Leave(object sender, EventArgs e)
62 | {
63 | if (!_freeze)
64 | {
65 | Hide();
66 | }
67 | }
68 |
69 | private void office2007ColorPlate1_SelectedColorChanged(object sender, EventArgs e)
70 | {
71 | if (!_freeze)
72 | {
73 | Hide();
74 | }
75 | }
76 |
77 | DialogResult office2007ColorPlate1_ColorPaletteSelected(ref Color color)
78 | {
79 | _freeze = true;
80 | try
81 | {
82 | ColorDialog dlg = new ColorDialog();
83 | if (dlg.ShowDialog() == DialogResult.OK)
84 | {
85 | color = dlg.Color;
86 | _freeze = false;
87 | return DialogResult.OK;
88 | }
89 | }
90 | finally
91 | {
92 | _freeze = false;
93 | }
94 | return DialogResult.Cancel;
95 | }
96 |
97 | private void Office2007MenuHelper_Shown(object sender, EventArgs e)
98 | {
99 |
100 | }
101 |
102 | }
103 | }
--------------------------------------------------------------------------------
/Calendar/KryptonCalendar-how to Kryptonize.txt:
--------------------------------------------------------------------------------
1 | 0) download the base project: http://www.codeproject.com/KB/docview/WinFormsCalendarView.aspx
2 | 1) Create a CalendarKryptonRenderer, put the code for Krypton
3 |
4 | 2) change in Calendar.cs, section Ctor the line from:
5 | _renderer = new CalendarProfessionalRenderer(this);
6 | to:
7 | _renderer = new CalendarKryptonRenderer(this);
8 |
9 | 3) and add these handlers:
10 | InvalidateEventHandler IEH = new InvalidateEventHandler(Calendar_Invalidated);
11 |
12 | // add Palette Handler
13 | if (_palette != null)
14 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
15 |
16 | KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);
17 |
18 | _palette = KryptonManager.CurrentGlobalPalette;
19 | _paletteRedirect = new PaletteRedirect(_palette);
20 |
21 | 5) add this subs (always in Calendar.cs):
22 | #region "Reload Palette"
23 | private void Calendar_Invalidated(object sender, System.Windows.Forms.InvalidateEventArgs e)
24 | {
25 | this.Renderer.ReloadPalette();
26 | }
27 | #endregion
28 |
29 | #region ... Krypton ...
30 | private IPalette _palette;
31 | private PaletteRedirect _paletteRedirect;
32 |
33 | //Kripton Palette Events
34 | private void OnGlobalPaletteChanged(object sender, EventArgs e)
35 | {
36 | if (_palette != null)
37 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
38 |
39 | _palette = KryptonManager.CurrentGlobalPalette;
40 | _paletteRedirect.Target = _palette;
41 |
42 | if (_palette != null)
43 | {
44 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
45 | //repaint with new values
46 |
47 | }
48 |
49 | Invalidate();
50 | }
51 |
52 | //Kripton Palette Events
53 | private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
54 | {
55 | Invalidate();
56 | }
57 | #endregion
58 |
59 | 6) add thi sub at the end of the class CalendarRenderer.cs:
60 |
61 | public virtual void ReloadPalette()
62 | {
63 | }
64 |
65 | 7) (optional) rename the namespace System.Windows.Forms.Calendar --> AC.ExtendedRendere.Toolkit.Calendar
--------------------------------------------------------------------------------
/StdControls/LView/ListViewItemComparer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Windows.Forms.VisualStyles;
10 | using System.Collections;
11 | using System.Reflection;
12 | using Microsoft.VisualBasic.CompilerServices;
13 |
14 | namespace AC.StdControls.Toolkit.LView
15 | {
16 | public class ListViewItemComparer : IComparer
17 | {
18 | // Fields
19 | private int col;
20 |
21 | // Methods
22 | public ListViewItemComparer()
23 | {
24 | this.col = 0;
25 | }
26 |
27 | public ListViewItemComparer(int column)
28 | {
29 | this.col = column;
30 | }
31 |
32 | public int Compare(object x, object y)
33 | {
34 |
35 | //we do not want errors
36 | // ERROR: Not supported in C#: OnErrorStatement
37 |
38 |
39 | return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
40 | }
41 |
42 | }
43 |
44 | //From Z to A
45 | public class ListViewItemComparerReverser : IComparer
46 | {
47 | // Implements the manual sorting of items by columns.
48 |
49 | private int col;
50 |
51 | public ListViewItemComparerReverser()
52 | {
53 | col = 0;
54 | }
55 |
56 | public ListViewItemComparerReverser(int column)
57 | {
58 | col = column;
59 | }
60 |
61 | // Calls CaseInsensitiveComparer.[Compare] with the parameters reversed.
62 | public int Compare(object x, object y)
63 | {
64 |
65 | return new CaseInsensitiveComparer().Compare(((ListViewItem)y).SubItems[col].Text, ((ListViewItem)x).SubItems[col].Text);
66 | }
67 | //IComparer.[Compare]
68 |
69 | }
70 |
71 | public class ListViewColumn
72 | {
73 | private int _ColumnNumber = -1;
74 |
75 | public int ColumnNumber
76 | {
77 | get { return _ColumnNumber; }
78 | set { _ColumnNumber = value; }
79 | }
80 |
81 | public int DefaultColumnNumber
82 | {
83 | get { return -1; }
84 | }
85 | }
86 |
87 |
88 |
89 |
90 | }
91 |
--------------------------------------------------------------------------------
/StdControls/Common/ImageComboItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 |
4 | namespace AC.StdControls.Toolkit.Common
5 | {
6 |
7 | public class ImageComboItem : object
8 | {
9 | // forecolor: transparent = inherit
10 | private Color forecolor = Color.FromKnownColor(KnownColor.Transparent);
11 | private bool mark = false;
12 | private int imageindex = -1;
13 | private object tag = null;
14 | private string text = null;
15 |
16 | // constructors
17 | public ImageComboItem()
18 | {
19 | }
20 |
21 | public ImageComboItem(string Text)
22 | {
23 | text = Text;
24 | }
25 |
26 | public ImageComboItem(string Text, int ImageIndex)
27 | {
28 | text = Text;
29 | imageindex = ImageIndex;
30 | }
31 |
32 | public ImageComboItem(string Text, int ImageIndex, bool Mark)
33 | {
34 | text = Text;
35 | imageindex = ImageIndex;
36 | mark = Mark;
37 | }
38 |
39 | public ImageComboItem(string Text, int ImageIndex, bool Mark, Color ForeColor)
40 | {
41 | text = Text;
42 | imageindex = ImageIndex;
43 | mark = Mark;
44 | forecolor = ForeColor;
45 | }
46 |
47 | public ImageComboItem(string Text, int ImageIndex, bool Mark, Color ForeColor, object Tag)
48 | {
49 | text = Text;
50 | imageindex = ImageIndex;
51 | mark = Mark;
52 | forecolor = ForeColor;
53 | tag = Tag;
54 | }
55 |
56 | // forecolor
57 | public Color ForeColor
58 | {
59 | get
60 | {
61 | return forecolor;
62 | }
63 | set
64 | {
65 | forecolor = value;
66 | }
67 | }
68 |
69 | // image index
70 | public int ImageIndex
71 | {
72 | get
73 | {
74 | return imageindex;
75 | }
76 | set
77 | {
78 | imageindex = value;
79 | }
80 | }
81 |
82 | // mark (bold)
83 | public bool Mark
84 | {
85 | get
86 | {
87 | return mark;
88 | }
89 | set
90 | {
91 | mark = value;
92 | }
93 | }
94 |
95 | // tag
96 | public object Tag
97 | {
98 | get
99 | {
100 | return tag;
101 | }
102 | set
103 | {
104 | tag = value;
105 | }
106 | }
107 |
108 | // item text
109 | public string Text
110 | {
111 | get
112 | {
113 | return text;
114 | }
115 | set
116 | {
117 | text = value;
118 | }
119 | }
120 |
121 | // ToString() should return item text
122 | public override string ToString()
123 | {
124 | return text;
125 | }
126 |
127 | }
128 |
129 | }
130 |
--------------------------------------------------------------------------------
/StdControls/Common/ImageCombo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 | using System.ComponentModel;
5 |
6 | namespace AC.StdControls.Toolkit.Common
7 | {
8 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.ComboBox)), ToolboxItem(false)]
9 | public class ImageCombo : ComboBox
10 | {
11 | private ImageList imgs = new ImageList();
12 |
13 | // constructor
14 | public ImageCombo()
15 | {
16 | // set draw mode to owner draw
17 | this.DrawMode = DrawMode.OwnerDrawFixed;
18 | }
19 |
20 | // ImageList property
21 | public ImageList ImageList
22 | {
23 | get
24 | {
25 | return imgs;
26 | }
27 | set
28 | {
29 | imgs = value;
30 | }
31 | }
32 |
33 | // customized drawing process
34 | protected override void OnDrawItem(DrawItemEventArgs e)
35 | {
36 | // draw background & focus rect
37 | e.DrawBackground();
38 | e.DrawFocusRectangle();
39 |
40 | // check if it is an item from the Items collection
41 | if (e.Index < 0)
42 |
43 | // not an item, draw the text (indented)
44 | e.Graphics.DrawString(this.Text, e.Font, new SolidBrush(e.ForeColor), e.Bounds.Left + imgs.ImageSize.Width, e.Bounds.Top);
45 |
46 | else
47 | {
48 |
49 | // check if item is an ImageComboItem
50 | if (this.Items[e.Index].GetType() == typeof(ImageComboItem))
51 | {
52 |
53 | // get item to draw
54 | ImageComboItem item = (ImageComboItem) this.Items[e.Index];
55 |
56 | // get forecolor & font
57 | Color forecolor = (item.ForeColor != Color.FromKnownColor(KnownColor.Transparent)) ? item.ForeColor : e.ForeColor;
58 | Font font = item.Mark ? new Font(e.Font, FontStyle.Bold) : e.Font;
59 |
60 | // -1: no image
61 | if (item.ImageIndex != -1)
62 | {
63 | // draw image, then draw text next to it
64 | this.ImageList.Draw(e.Graphics, e.Bounds.Left, e.Bounds.Top, item.ImageIndex);
65 | e.Graphics.DrawString(item.Text, font, new SolidBrush(forecolor), e.Bounds.Left + imgs.ImageSize.Width, e.Bounds.Top);
66 | }
67 | else
68 | // draw text (indented)
69 | e.Graphics.DrawString(item.Text, font, new SolidBrush(forecolor), e.Bounds.Left + imgs.ImageSize.Width, e.Bounds.Top);
70 |
71 | }
72 | else
73 |
74 | // it is not an ImageComboItem, draw it
75 | e.Graphics.DrawString(this.Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds.Left + imgs.ImageSize.Width, e.Bounds.Top);
76 |
77 | }
78 |
79 | base.OnDrawItem (e);
80 | }
81 |
82 | }
83 |
84 | }
--------------------------------------------------------------------------------
/CalendarLibrary/AppointmentAdd.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using ComponentFactory.Krypton.Toolkit;
9 | using System.Diagnostics;
10 |
11 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
12 | {
13 | public partial class AppointmentAdd : ComponentFactory.Krypton.Toolkit.KryptonForm
14 | {
15 | private Calendar _calendar;
16 | public AppointmentAdd(ref Calendar Calendar)
17 | {
18 | InitializeComponent();
19 | _calendar = Calendar;
20 |
21 | datePicker.Value = DateTime.Now;
22 | startHour.Value = DateTime.Now.Hour;
23 | }
24 |
25 | private void addItem_Click(object sender, EventArgs e)
26 | {
27 | try
28 | {
29 | DateTime startTime = new DateTime(datePicker.Value.Year, datePicker.Value.Month, datePicker.Value.Day, (int)this.startHour.Value, Int32.Parse(this.startMinute.Text), 0);
30 | DateTime endTime = new DateTime(datePicker.Value.Year, datePicker.Value.Month, datePicker.Value.Day, (int)this.endHour.Value, Int32.Parse(this.endMinute.Text), 0);
31 |
32 | if (endTime.CompareTo(startTime) <= 0)
33 | {
34 | MessageBox.Show("End time is either same as or before the start time. Please check the times");
35 | return;
36 | }
37 |
38 | if (this.descriptionTextBox.Text == null || this.descriptionTextBox.Text.Trim() == String.Empty)
39 | {
40 | MessageBox.Show("Please enter some description of this item");
41 | return;
42 | }
43 |
44 | _calendar.CalendarItems.Add(new CalendarItem(startTime, endTime, this.descriptionTextBox.Text, this.tentativeCheckBox.Checked, this.txtKey.Text, this.txtColor.Text));
45 | _calendar.InitializeDisplay();
46 | }
47 | catch (Exception ex)
48 | {
49 | Trace.WriteLine(ex.ToString());
50 | }
51 | }
52 |
53 | private void startHour_ValueChanged(object sender, EventArgs e)
54 | {
55 | endHour.Value = (startHour.Value == 23) ? 23 : startHour.Value + 1;
56 | }
57 |
58 | private void startMinute_TextChanged(object sender, EventArgs e)
59 | {
60 | if (startMinute.Text == "00")
61 | endMinute.Text = "30";
62 | else
63 | endMinute.Text = "00";
64 | }
65 |
66 |
67 | }
68 | }
--------------------------------------------------------------------------------
/Scrollbar/CustomScrollBar/ScrollBarControlDesigner.cs:
--------------------------------------------------------------------------------
1 | namespace AC.ExtendedRenderer.Toolkit.ScrollBar.Design
2 | {
3 | using System.ComponentModel;
4 | using System.Windows.Forms.Design;
5 |
6 | ///
7 | /// The designer for the control.
8 | ///
9 | internal class ScrollBarControlDesigner : ControlDesigner
10 | {
11 | ///
12 | /// Gets the for the control.
13 | ///
14 | public override SelectionRules SelectionRules
15 | {
16 | get
17 | {
18 | // gets the property descriptor for the property "Orientation"
19 | PropertyDescriptor propDescriptor =
20 | TypeDescriptor.GetProperties(this.Component)["Orientation"];
21 |
22 | // if not null - we can read the current orientation of the scroll bar
23 | if (propDescriptor != null)
24 | {
25 | // get the current orientation
26 | ScrollBarOrientation orientation =
27 | (ScrollBarOrientation) propDescriptor.GetValue(this.Component);
28 |
29 | // if vertical orientation
30 | if (orientation == ScrollBarOrientation.Vertical)
31 | {
32 | return SelectionRules.Visible
33 | | SelectionRules.Moveable
34 | | SelectionRules.BottomSizeable
35 | | SelectionRules.TopSizeable;
36 | }
37 |
38 | return SelectionRules.Visible | SelectionRules.Moveable
39 | | SelectionRules.LeftSizeable | SelectionRules.RightSizeable;
40 | }
41 |
42 | return base.SelectionRules;
43 | }
44 | }
45 |
46 | ///
47 | /// Prefilters the properties so that unnecessary properties are hidden
48 | /// in the property browser of Visual Studio.
49 | ///
50 | /// The property dictionary.
51 | protected override void PreFilterProperties(
52 | System.Collections.IDictionary properties)
53 | {
54 | properties.Remove("Text");
55 | properties.Remove("BackgroundImage");
56 | properties.Remove("ForeColor");
57 | properties.Remove("ImeMode");
58 | properties.Remove("Padding");
59 | properties.Remove("BackgroundImageLayout");
60 | properties.Remove("BackColor");
61 | properties.Remove("Font");
62 | properties.Remove("RightToLeft");
63 |
64 | base.PreFilterProperties(properties);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Utils/FadeForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Runtime.InteropServices;
5 | using System.Windows.Forms;
6 |
7 | namespace AC.ExtendedRenderer.Toolkit.Utils
8 | {
9 | ///
10 | /// Base form class that provides fading/sliding effects on open/close of the form.
11 | ///
12 | public class FadeForm : Form
13 | {
14 | #region Win32
15 |
16 | const int AW_HIDE = 0X10000;
17 | const int AW_ACTIVATE = 0X20000;
18 | const int AW_HOR_POSITIVE = 0X1;
19 | const int AW_HOR_NEGATIVE = 0X2;
20 | const int AW_SLIDE = 0X40000;
21 | const int AW_BLEND = 0X80000;
22 |
23 | [DllImport("user32.dll", CharSet = CharSet.Auto)]
24 | private static extern int AnimateWindow
25 | (IntPtr hwand, int dwTime, int dwFlags);
26 |
27 | #endregion
28 |
29 | #region Variables
30 |
31 | private bool _UseSlideAnimation;
32 |
33 | #endregion
34 |
35 | #region Constructor
36 |
37 | ///
38 | /// Initializes a new instance of the class.
39 | ///
40 | public FadeForm() : this(false) { }
41 |
42 | ///
43 | /// Initializes a new instance of the class.
44 | ///
45 | /// if set to true [use slide animation].
46 | public FadeForm(bool useSlideAnimation)
47 | {
48 | _UseSlideAnimation = useSlideAnimation;
49 | }
50 |
51 | #endregion
52 |
53 | #region Overrides
54 |
55 | ///
56 | /// Raises the event.
57 | ///
58 | /// An that contains the event data.
59 | protected override void OnLoad(EventArgs e)
60 | {
61 | base.OnLoad(e);
62 | AnimateWindow(this.Handle, 1000, AW_ACTIVATE | (_UseSlideAnimation ? AW_HOR_POSITIVE | AW_SLIDE : AW_BLEND));
63 | }
64 |
65 | ///
66 | /// Raises the event.
67 | ///
68 | /// A that contains the event data.
69 | protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
70 | {
71 | base.OnClosing(e);
72 | if (e.Cancel == false)
73 | {
74 | AnimateWindow(this.Handle, 1000, AW_HIDE | (_UseSlideAnimation ? AW_HOR_NEGATIVE | AW_SLIDE : AW_BLEND));
75 | }
76 | }
77 |
78 | #endregion
79 |
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Renderer/DisplayInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using Microsoft.Win32;
5 | using System.Runtime.InteropServices;
6 | using System.Windows.Forms;
7 | using System.Windows.Forms.VisualStyles;
8 | using System.IO;
9 |
10 | namespace Office2007Renderer
11 | {
12 | static class DisplayInformation
13 | {
14 | #region FieldsPrivate
15 |
16 | [ThreadStatic]
17 | private static string m_strColorScheme;
18 | [ThreadStatic]
19 | private static bool m_bIsLunaTheme;
20 | private const string m_strLunaFileName = "luna.msstyles";
21 | private static bool m_bIsAeroTheme;
22 | private const string m_strAeroFileName = "aero.msstyles";
23 |
24 | #endregion
25 |
26 | #region Properties
27 |
28 | public static string ColorScheme
29 | {
30 | get { return m_strColorScheme; }
31 | }
32 |
33 | internal static bool IsLunaTheme
34 | {
35 | get { return m_bIsLunaTheme; }
36 | }
37 |
38 | internal static bool IsAeroTheme
39 | {
40 | get { return m_bIsAeroTheme; }
41 | }
42 |
43 | internal static bool IsTerminalServerSession
44 | {
45 | get { return SystemInformation.TerminalServerSession; }
46 | }
47 | #endregion
48 |
49 | #region MethodsPrivate
50 |
51 | static DisplayInformation()
52 | {
53 | SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(DisplayInformation.OnUserPreferenceChanged);
54 | DisplayInformation.SetScheme();
55 | }
56 |
57 | private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
58 | {
59 | DisplayInformation.SetScheme();
60 | }
61 |
62 | private static void SetScheme()
63 | {
64 | DisplayInformation.m_bIsLunaTheme = false;
65 | if (VisualStyleRenderer.IsSupported)
66 | {
67 | m_strColorScheme = VisualStyleInformation.ColorScheme;
68 |
69 | if (!VisualStyleInformation.IsEnabledByUser)
70 | {
71 | return;
72 | }
73 | StringBuilder stringBuilder = new StringBuilder(0x200);
74 | NativeMethods.GetCurrentThemeName(stringBuilder, stringBuilder.Capacity, null, 0, null, 0);
75 | m_bIsLunaTheme = string.Equals(m_strLunaFileName, Path.GetFileName(stringBuilder.ToString()), StringComparison.InvariantCultureIgnoreCase);
76 | m_bIsAeroTheme = string.Equals(m_strAeroFileName, Path.GetFileName(stringBuilder.ToString()), StringComparison.InvariantCultureIgnoreCase);
77 | }
78 | else
79 | {
80 | DisplayInformation.m_strColorScheme = null;
81 | }
82 | }
83 | #endregion
84 |
85 | static class NativeMethods
86 | {
87 | [DllImport("uxtheme.dll", CharSet = CharSet.Auto)]
88 | public static extern int GetCurrentThemeName(StringBuilder pszThemeFileName, int dwMaxNameChars, StringBuilder pszColorBuff, int dwMaxColorChars, StringBuilder pszSizeBuff, int cchMaxSizeChars);
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/Wizard/InfoPage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Windows.Forms;
6 |
7 | namespace AC.ExtendedRenderer.Toolkit.Wizard
8 | {
9 |
10 | ///
11 | /// An inherited that contains a
12 | /// with the description of the page.
13 | ///
14 | [ ToolboxItem(false)]
15 | public class InfoPage : InfoContainer
16 | {
17 | private System.Windows.Forms.Label lblDescription;
18 | private System.ComponentModel.IContainer components = null;
19 |
20 | ///
21 | /// Default Constructor
22 | ///
23 | public InfoPage()
24 | {
25 | // This call is required by the Windows Form Designer.
26 | InitializeComponent();
27 |
28 | // TODO: Add any initialization after the InitializeComponent call
29 | }
30 |
31 | ///
32 | /// Clean up any resources being used.
33 | ///
34 | protected override void Dispose( bool disposing )
35 | {
36 | if( disposing )
37 | {
38 | if (components != null)
39 | {
40 | components.Dispose();
41 | }
42 | }
43 | base.Dispose( disposing );
44 | }
45 |
46 | #region Designer generated code
47 | ///
48 | /// Required method for Designer support - do not modify
49 | /// the contents of this method with the code editor.
50 | ///
51 | private void InitializeComponent()
52 | {
53 | this.lblDescription = new System.Windows.Forms.Label();
54 | this.SuspendLayout();
55 | //
56 | // lblDescription
57 | //
58 | this.lblDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
59 | | System.Windows.Forms.AnchorStyles.Left)
60 | | System.Windows.Forms.AnchorStyles.Right)));
61 | this.lblDescription.FlatStyle = System.Windows.Forms.FlatStyle.System;
62 | this.lblDescription.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
63 | this.lblDescription.Location = new System.Drawing.Point(172, 56);
64 | this.lblDescription.Name = "lblDescription";
65 | this.lblDescription.Size = new System.Drawing.Size(304, 328);
66 | this.lblDescription.TabIndex = 8;
67 | this.lblDescription.Text = "This wizard enables you to...";
68 | //
69 | // InfoPage
70 | //
71 | this.Controls.Add(this.lblDescription);
72 | this.Name = "InfoPage";
73 | this.Controls.SetChildIndex(this.lblDescription, 0);
74 | this.ResumeLayout(false);
75 |
76 | }
77 | #endregion
78 |
79 | ///
80 | /// Gets/Sets the text on the info page
81 | ///
82 | [Category("Appearance")]
83 | public string PageText
84 | {
85 | get
86 | {
87 | return lblDescription.Text;
88 | }
89 | set
90 | {
91 | lblDescription.Text = value;
92 | }
93 | }
94 | }
95 | }
96 |
97 |
--------------------------------------------------------------------------------
/CalendarLibrary/CalendarItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
7 | {
8 | [Serializable]
9 | public class CalendarItem
10 | {
11 | [NonSerialized]
12 | private DateTime m_startTime = DateTime.MinValue;
13 | [NonSerialized]
14 | private DateTime m_endTime = DateTime.MinValue;
15 | [NonSerialized]
16 | private string m_description = String.Empty;
17 | [NonSerialized]
18 | private bool m_isTentative = false;
19 | [NonSerialized]
20 | private string m_key = String.Empty;
21 | [NonSerialized]
22 | private Color m_color = Color.White;
23 |
24 | public CalendarItem()
25 | {
26 | }
27 |
28 | public CalendarItem(DateTime startTime, DateTime endTime, string description, bool isTentative, string key, string color)
29 | {
30 | m_startTime = startTime;
31 | m_endTime = endTime;
32 | m_description = description;
33 | m_isTentative = isTentative;
34 | m_key = key;
35 |
36 | m_color = ColorTable.CheckColorFromNameRGB(color);
37 | }
38 |
39 | public DateTime StartTime
40 | {
41 | get
42 | {
43 | return m_startTime;
44 | }
45 | set
46 | {
47 | m_startTime = value;
48 | }
49 | }
50 |
51 | public DateTime EndTime
52 | {
53 | get
54 | {
55 | return m_endTime;
56 | }
57 | set
58 | {
59 | m_endTime = value;
60 | }
61 | }
62 |
63 | public string Description
64 | {
65 | get
66 | {
67 | return m_description;
68 | }
69 | set
70 | {
71 | m_description = value;
72 | }
73 | }
74 |
75 | public string Key
76 | {
77 | get
78 | {
79 | return m_key;
80 | }
81 | set
82 | {
83 | m_key = value;
84 | }
85 | }
86 |
87 | public Color Color
88 | {
89 | get
90 | {
91 | return m_color;
92 | }
93 | set
94 | {
95 | m_color = value;
96 | }
97 | }
98 |
99 | public bool IsTentative
100 | {
101 | get
102 | {
103 | return m_isTentative;
104 | }
105 | set
106 | {
107 | m_isTentative = value;
108 | }
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/Calendar/MonthViewDay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | public class MonthViewDay
9 | {
10 | #region Fields
11 |
12 | Rectangle _bounds;
13 | private DateTime _date;
14 | private MonthViewMonth _month;
15 | private MonthView _monthView;
16 |
17 | #endregion
18 |
19 | #region Ctor
20 |
21 | internal MonthViewDay(MonthViewMonth month, DateTime date)
22 | {
23 | _month = month;
24 | _monthView = month.MonthView;
25 | _date = date;
26 |
27 |
28 | }
29 |
30 | #endregion
31 |
32 | #region Props
33 |
34 | ///
35 | /// Gets the parent MonthView
36 | ///
37 | public MonthView MonthView
38 | {
39 | get { return _monthView; }
40 | set { _monthView = value; }
41 | }
42 |
43 | ///
44 | /// Gets the parent MonthViewMonth
45 | ///
46 | public MonthViewMonth Month
47 | {
48 | get { return _month; }
49 | }
50 |
51 | ///
52 | /// Gets the bounds of the day
53 | ///
54 | public Rectangle Bounds
55 | {
56 | get { return _bounds; }
57 | }
58 |
59 | ///
60 | /// Gets the date this day represents
61 | ///
62 | public DateTime Date
63 | {
64 | get { return _date; }
65 | }
66 |
67 | ///
68 | /// Gets or sets if the day is currently selected
69 | ///
70 | public bool Selected
71 | {
72 | get { return Date >= MonthView.SelectionStart && Date <= MonthView.SelectionEnd; }
73 | }
74 |
75 | ///
76 | /// Gets if the day is grayed
77 | ///
78 | public bool Grayed
79 | {
80 | get { return Month.Date.Month != Date.Month; }
81 | }
82 |
83 | ///
84 | /// Gets a value indicating if the day instance is visible on the calendar
85 | ///
86 | public bool Visible
87 | {
88 | get
89 | {
90 | return !(Grayed && (Date > MonthView.ViewStart && Date < MonthView.ViewEnd));
91 | }
92 | }
93 |
94 | #endregion
95 |
96 | #region Methods
97 |
98 | ///
99 | /// Sets the value of the property
100 | ///
101 | ///
102 | internal void SetBounds(Rectangle bounds)
103 | {
104 | _bounds = bounds;
105 | }
106 |
107 | #endregion
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/Renderer/ThemedControls/ThemedLabel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Windows.Forms;
4 |
5 | namespace Office2007Renderer.ThemedControls
6 | {
7 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.Label)), ToolboxItem(false)]
8 | public class ThemedLabel : System.Windows.Forms.Label
9 | {
10 |
11 | public override System.Drawing.Color ForeColor
12 | {
13 | get
14 | {
15 | return base.ForeColor;
16 | }
17 | set
18 | {
19 | base.ForeColor = value;
20 | }
21 | }
22 |
23 | public override System.Drawing.Color BackColor
24 | {
25 | get
26 | {
27 | return base.BackColor;
28 | }
29 | set
30 | {
31 | base.BackColor = value;
32 | }
33 | }
34 |
35 | public ThemedLabel()
36 | {
37 |
38 | // Set the SystemEvents class to receive event notification when a user
39 | // preference changes, the palette changes, or when display settings change.
40 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
41 | ToolStripManager.RendererChanged += new EventHandler(ToolStripManager_RendererChanged);
42 |
43 | InitColors();
44 | }
45 |
46 | private void InitColors()
47 | {
48 | try
49 | //myCustom Renderer
50 | {
51 | Office2007Renderer renderer = (Office2007Renderer)ToolStripManager.Renderer;
52 | ProfessionalColorTable colorTable = (ProfessionalColorTable)renderer.ColorTable;
53 | //Set Colors
54 | base.ForeColor = colorTable.MenuItemText;
55 | base.BackColor = colorTable.ToolStripContentPanelGradientBegin;
56 | }
57 | catch (Exception ex)
58 | {
59 | //Standard Renderer
60 | try
61 | {
62 | System.Windows.Forms.ToolStripProfessionalRenderer renderer = (System.Windows.Forms.ToolStripProfessionalRenderer)ToolStripManager.Renderer;
63 | System.Windows.Forms.ProfessionalColorTable colorTable = (System.Windows.Forms.ProfessionalColorTable)renderer.ColorTable;
64 | //Set Colors
65 | base.ForeColor = colorTable.GripDark;
66 | base.BackColor = colorTable.ToolStripContentPanelGradientBegin;
67 | }
68 | catch (Exception ex3)
69 | {
70 | Console.WriteLine(ex3.Message);
71 | }
72 | Console.WriteLine(ex.Message);
73 | }
74 | }
75 |
76 | void ToolStripManager_RendererChanged(object sender, EventArgs e)
77 | {
78 | InitColors();
79 | this.Invalidate();
80 | }
81 |
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/Charting/KryptonAquaGauge.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Text;
6 | using System.Windows.Forms;
7 | using System.Drawing;
8 | using System.Drawing.Drawing2D;
9 | using System.Runtime.InteropServices;
10 | using ComponentFactory.Krypton.Toolkit;
11 |
12 | namespace AC.ExtendedRenderer.Toolkit.Charting
13 | {
14 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.Timer))]
15 | public class KryptonAquaGauge : AquaGauge
16 | {
17 | private IPalette _palette;
18 | private PaletteRedirect _paletteRedirect;
19 |
20 | #region ... Constructor ...
21 | public KryptonAquaGauge()
22 | {
23 | SetStyle(ControlStyles.UserPaint, true);
24 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
25 | SetStyle(ControlStyles.SupportsTransparentBackColor, true);
26 | UpdateStyles();
27 | // add Palette Handler
28 | if (_palette != null)
29 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
30 |
31 | KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);
32 |
33 | _palette = KryptonManager.CurrentGlobalPalette;
34 | _paletteRedirect = new PaletteRedirect(_palette);
35 |
36 | InitColors();
37 |
38 |
39 | }
40 | #endregion
41 |
42 | private void InitColors()
43 | {
44 | this.DialColor = _palette.ColorTable.ToolStripGradientBegin;
45 | this.ForeColor = _palette.ColorTable.StatusStripText;
46 | this.DigitColor = _palette.ColorTable.StatusStripText;
47 | /*
48 | this.ThickCalibrationColor = _palette.ColorTable.StatusStripGradientEnd;
49 | this.ThinCalibrationColor = _palette.ColorTable.ToolStripGradientEnd;
50 | this.HandColor = _palette.ColorTable.MenuStripGradientEnd;
51 | this.CenterPointColor = _palette.ColorTable.MenuStripGradientEnd;
52 | */
53 | }
54 |
55 |
56 | #region ... Krypton ...
57 |
58 | //Kripton Palette Events
59 | private void OnGlobalPaletteChanged(object sender, EventArgs e)
60 | {
61 | if (_palette != null)
62 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
63 |
64 | _palette = KryptonManager.CurrentGlobalPalette;
65 | _paletteRedirect.Target = _palette;
66 |
67 | if (_palette != null)
68 | {
69 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
70 | //repaint with new values
71 |
72 | InitColors();
73 |
74 | }
75 |
76 | Invalidate();
77 | }
78 |
79 | //Kripton Palette Events
80 | private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
81 | {
82 | Invalidate();
83 | }
84 | #endregion
85 |
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/KryptonProgress.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Text;
6 | using System.Windows.Forms;
7 | using System.Drawing;
8 | using System.Drawing.Drawing2D;
9 | using System.Runtime.InteropServices;
10 | using ComponentFactory.Krypton.Toolkit;
11 |
12 | namespace AC.ExtendedRenderer.Toolkit
13 | {
14 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.ProgressBar)), ToolboxItem(true)]
15 | public class KryptonProgressBar : AC.StdControls.Toolkit.Common.ProgressBar
16 | {
17 | private IPalette _palette;
18 | private PaletteRedirect _paletteRedirect;
19 |
20 | #region ... Constructor ...
21 | public KryptonProgressBar()
22 | {
23 | SetStyle(ControlStyles.UserPaint, true);
24 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
25 | SetStyle(ControlStyles.SupportsTransparentBackColor, true);
26 | UpdateStyles();
27 | // add Palette Handler
28 | if (_palette != null)
29 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
30 |
31 | KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);
32 |
33 | _palette = KryptonManager.CurrentGlobalPalette;
34 | _paletteRedirect = new PaletteRedirect(_palette);
35 |
36 | InitColors();
37 |
38 |
39 | }
40 | #endregion
41 |
42 | private void InitColors()
43 | {
44 | this.StartColor = _palette.ColorTable.ButtonSelectedGradientEnd;
45 | this.EndColor = _palette.ColorTable.ButtonSelectedGradientEnd;
46 | this.ForeColor = _palette.ColorTable.MenuItemText;
47 | this.Font = _palette.ColorTable.MenuStripFont;
48 | }
49 |
50 |
51 | #region ... Krypton ...
52 |
53 | //Kripton Palette Events
54 | private void OnGlobalPaletteChanged(object sender, EventArgs e)
55 | {
56 | if (_palette != null)
57 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
58 |
59 | _palette = KryptonManager.CurrentGlobalPalette;
60 | _paletteRedirect.Target = _palette;
61 |
62 | if (_palette != null)
63 | {
64 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
65 | //repaint with new values
66 |
67 | InitColors();
68 |
69 | }
70 |
71 | Invalidate();
72 | }
73 |
74 | //Kripton Palette Events
75 | private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
76 | {
77 | Invalidate();
78 | }
79 | #endregion
80 |
81 | private void InitializeComponent()
82 | {
83 | this.SuspendLayout();
84 | //
85 | // KryptonProgressBar
86 | //
87 | this.Name = "KryptonProgressBar";
88 | this.ResumeLayout(false);
89 |
90 | }
91 |
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/CalendarLibrary/DayRowHeaderCell.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 | using System.Drawing.Drawing2D;
10 |
11 |
12 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
13 | {
14 | public class DayRowHeaderCell : DataGridViewRowHeaderCell
15 | {
16 | public int WeekNumber { get; set; }
17 | protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
18 | {
19 | try
20 | {
21 | int marginForDivider = 3;
22 | int marginForMinutes = 20;
23 |
24 | Pen pen = new Pen(Calendar.ct.BorderBrush);
25 |
26 | // Draw the background
27 | graphics.FillRectangle(new SolidBrush(Calendar.ct.BackColor), cellBounds);
28 |
29 | // Draw the gradient if it is the current time
30 | DateTime now = DateTime.Now;
31 | int hour1 = rowIndex / 2;
32 | int firstHalf = rowIndex % 2; // 0 means 0 to 30 minutes. 1 means 31 to 59 minutes
33 | if (now.Hour==hour1 && ((int)(now.Minute/30)==firstHalf))
34 | {
35 | LinearGradientBrush lgb = new LinearGradientBrush(cellBounds, Calendar.ct.HeaderLight, Calendar.ct.HeaderDark, LinearGradientMode.Vertical);
36 | graphics.FillRectangle(lgb, cellBounds);
37 | if (firstHalf==0)
38 | graphics.DrawLine(new Pen(Calendar.ct.TodayGradientBrush), cellBounds.Left, cellBounds.Bottom, cellBounds.Right, cellBounds.Bottom);
39 | }
40 |
41 | // Draw the separator for alternate rows
42 | graphics.DrawLine(new Pen(new SolidBrush(Calendar.ct.SeparatorDark)), cellBounds.Left + marginForDivider, cellBounds.Bottom - 1, cellBounds.Right - marginForDivider, cellBounds.Bottom - 1);
43 |
44 | // Draw the right vertical line for the cell
45 | graphics.DrawLine(new Pen(new SolidBrush(Calendar.ct.SeparatorDark)), cellBounds.Right - 1, cellBounds.Top, cellBounds.Right - 1, cellBounds.Bottom);
46 |
47 | // Draw the text
48 | int hour = WeekNumber;// GetHour(rowIndex);
49 | RectangleF rectHour = RectangleF.Empty;
50 | RectangleF rectMinutes = RectangleF.Empty;
51 | StringFormat sf = new StringFormat();
52 | sf.Alignment = StringAlignment.Far;
53 | sf.LineAlignment = StringAlignment.Center;
54 | sf.Trimming = StringTrimming.EllipsisCharacter;
55 |
56 | rectHour = new RectangleF(cellBounds.Left+5, cellBounds.Top , cellBounds.Width - marginForMinutes, cellBounds.Height);
57 | graphics.DrawString(hour.ToString(), new Font("Arial", 15, FontStyle.Regular), Calendar.ct.ForeBrush, rectHour, sf);
58 |
59 | }
60 | catch (Exception ex)
61 | {
62 | Trace.WriteLine(ex.ToString());
63 | }
64 | }
65 |
66 |
67 | public DayRowHeaderCell()
68 | {}
69 |
70 | public DayRowHeaderCell(int wknr)
71 | {
72 | WeekNumber = wknr;
73 | }
74 | }// class
75 | }
76 |
--------------------------------------------------------------------------------
/CalendarLibrary/WeekRowHeaderCell.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Diagnostics;
9 | using System.Drawing.Drawing2D;
10 |
11 |
12 | namespace AC.ExtendedRenderer.Toolkit.CalendarLibrary
13 | {
14 | public class WeekRowHeaderCell : DataGridViewRowHeaderCell
15 | {
16 | public int WeekNumber { get; set; }
17 | protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
18 | {
19 | try
20 | {
21 | //int marginForDivider = 3;
22 | int marginForMinutes = 20;
23 |
24 | Pen pen = new Pen(Calendar.ct.BorderBrush);
25 |
26 | // Draw the background
27 | graphics.FillRectangle(new SolidBrush(Calendar.ct.BackColor), cellBounds);
28 |
29 | // Draw the gradient if it is the current time
30 | DateTime now = DateTime.Now;
31 | int hour1 = rowIndex / 2;
32 | int firstHalf = rowIndex % 2; // 0 means 0 to 30 minutes. 1 means 31 to 59 minutes
33 | if (now.Hour==hour1 && ((int)(now.Minute/30)==firstHalf))
34 | {
35 | LinearGradientBrush lgb = new LinearGradientBrush(cellBounds, Calendar.ct.HeaderLight, Calendar.ct.HeaderDark, LinearGradientMode.Vertical);
36 | graphics.FillRectangle(lgb, cellBounds);
37 | if (firstHalf==0)
38 | graphics.DrawLine(new Pen(Calendar.ct.TodayGradientBrush), cellBounds.Left, cellBounds.Bottom, cellBounds.Right, cellBounds.Bottom);
39 | }
40 |
41 | // Draw the separator for alternate rows
42 | // graphics.DrawLine(new Pen(new SolidBrush(Calendar.ct.SeparatorDark)), cellBounds.Left + marginForDivider, cellBounds.Bottom - 1, cellBounds.Right - marginForDivider, cellBounds.Bottom - 1);
43 |
44 | // Draw the right vertical line for the cell
45 | graphics.DrawLine(new Pen(new SolidBrush(Calendar.ct.SeparatorDark)), cellBounds.Right - 1, cellBounds.Top, cellBounds.Right - 1, cellBounds.Bottom);
46 |
47 | // Draw the text
48 | int hour = WeekNumber;// GetHour(rowIndex);
49 | RectangleF rectHour = RectangleF.Empty;
50 | RectangleF rectMinutes = RectangleF.Empty;
51 | StringFormat sf = new StringFormat();
52 | sf.Alignment = StringAlignment.Far;
53 | sf.LineAlignment = StringAlignment.Center;
54 | sf.Trimming = StringTrimming.EllipsisCharacter;
55 |
56 | rectHour = new RectangleF(cellBounds.Left+5, cellBounds.Top , cellBounds.Width - marginForMinutes, cellBounds.Height);
57 | if(rowIndex==1)
58 | graphics.DrawString(hour.ToString(), new Font("Arial", 15, FontStyle.Regular), Calendar.ct.ForeBrush, rectHour, sf);
59 |
60 | }
61 | catch (Exception ex)
62 | {
63 | Trace.WriteLine(ex.ToString());
64 | }
65 | }
66 |
67 |
68 | public WeekRowHeaderCell()
69 | {}
70 |
71 | public WeekRowHeaderCell(int wknr)
72 | {
73 | WeekNumber = wknr;
74 | }
75 | }// class
76 | }
77 |
--------------------------------------------------------------------------------
/KryptonCustomButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.ComponentModel;
4 | using System.Collections.Generic;
5 | using System.Diagnostics;
6 | using System.Text;
7 | using ComponentFactory.Krypton.Toolkit;
8 |
9 | namespace AC.ExtendedRenderer.Toolkit
10 | {
11 | [ToolboxBitmap(typeof(System.Windows.Forms.Button))]
12 | public class KryptonCustomButton : AC.StdControls.Toolkit.Buttons.CustomButton
13 | {
14 | private IPalette _palette;
15 | private PaletteRedirect _paletteRedirect;
16 |
17 |
18 | public KryptonCustomButton()
19 | {
20 | //InitializeComponent();
21 | // Cache the current global palette setting
22 | _palette = KryptonManager.CurrentGlobalPalette;
23 |
24 | // Hook into palette events
25 | if (_palette != null)
26 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
27 |
28 | // We want to be notified whenever the global palette changes
29 | KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);
30 |
31 | // Create redirection object to the base palette
32 | _paletteRedirect = new PaletteRedirect(_palette);
33 |
34 | InitColors();
35 | }
36 |
37 | protected override void OnCreateControl()
38 | {
39 | base.OnCreateControl();
40 | try
41 | {
42 | InitColors();
43 | }
44 | catch
45 | {
46 | }
47 | }
48 | private void InitColors()
49 | {
50 | GradientTop = _palette.ColorTable.ToolStripGradientBegin;
51 | GradientBottom = _palette.ColorTable.ToolStripGradientMiddle;
52 | GradientBorderColor = _palette.ColorTable.ToolStripBorder;
53 | if (GradientBorderColor == Color.White) GradientBorderColor = Color.LightGray;
54 | this.ForeColor = _palette.ColorTable.ToolStripText;
55 | HotForeColor = _palette.ColorTable.ToolStripText;
56 | PressedForeColor = _palette.ColorTable.ToolStripText;
57 | }
58 |
59 | //Kripton Palette Events
60 | private void OnGlobalPaletteChanged(object sender, EventArgs e)
61 | {
62 | // Unhook events from old palette
63 | if (_palette != null)
64 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
65 |
66 | // Cache the new IPalette that is the global palette
67 | _palette = KryptonManager.CurrentGlobalPalette;
68 | _paletteRedirect.Target = _palette;
69 |
70 | // Hook into events for the new palette
71 | if (_palette != null)
72 | {
73 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
74 | InitColors();
75 | }
76 |
77 | // Change of palette means we should repaint to show any changes
78 | Invalidate();
79 | }
80 |
81 | //Kripton Palette Events
82 | private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
83 | {
84 | Invalidate();
85 | }
86 |
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Calendar/CalendarSelectableElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | ///
9 | /// Implements a basic
10 | ///
11 | public abstract class CalendarSelectableElement
12 | : ICalendarSelectableElement
13 | {
14 | #region Fields
15 | private Calendar _calendar;
16 | private Rectangle _bounds;
17 | private DateTime _date;
18 | private bool _selected;
19 | #endregion
20 |
21 | #region Ctor
22 |
23 | ///
24 | /// Creates a new Element
25 | ///
26 | ///
27 | public CalendarSelectableElement(Calendar calendar)
28 | {
29 | if (calendar == null) throw new ArgumentNullException("calendar");
30 |
31 | _calendar = calendar;
32 | }
33 |
34 | #endregion
35 |
36 | #region ICalendarSelectableElement Members
37 |
38 |
39 | public virtual DateTime Date
40 | {
41 | get { return _date; }
42 | }
43 |
44 |
45 | ///
46 | /// Gets the Calendar this element belongs to
47 | ///
48 | public virtual Calendar Calendar
49 | {
50 | get { return _calendar; }
51 | }
52 |
53 | ///
54 | /// Gets the Bounds of the element on the window
55 | ///
56 | public virtual Rectangle Bounds
57 | {
58 | get { return _bounds; }
59 | }
60 |
61 | ///
62 | /// Gets a value indicating if the element is currently selected
63 | ///
64 | public virtual bool Selected
65 | {
66 | get
67 | {
68 | return _selected;
69 | }
70 | }
71 |
72 | ///
73 | /// Compares this element with other using date as comparer
74 | ///
75 | ///
76 | ///
77 | public virtual int CompareTo(ICalendarSelectableElement element)
78 | {
79 | return this.Date.CompareTo(element.Date);
80 | }
81 |
82 | #endregion
83 |
84 | #region Internal Methods
85 |
86 | ///
87 | /// Sets the value of the property
88 | ///
89 | /// Bounds of the element
90 | internal virtual void SetBounds(Rectangle bounds)
91 | {
92 | _bounds = bounds;
93 | }
94 |
95 | ///
96 | /// Sets the value of the property
97 | ///
98 | /// Value indicating if the element is currently selected
99 | internal virtual void SetSelected(bool selected)
100 | {
101 | _selected = selected;
102 |
103 | //Calendar.Invalidate(Bounds);
104 | }
105 |
106 | #endregion
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Utils/Utility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace AC.ExtendedRenderer.Toolkit.Utils
7 | {
8 | public class Utility
9 | {
10 | public static Boolean IsVista()
11 | {
12 | // Check OS Before using XP drop shadow
13 | Boolean Result = false;
14 | Version OSVer = System.Environment.OSVersion.Version;
15 | if (OSVer.Major >= 6)
16 | {
17 | Result = true;
18 | }
19 | else
20 | {
21 | Result = false;
22 | }
23 | return Result;
24 | }
25 | public static StringFormat GetStringFormat(ContentAlignment contentAlignment)
26 | {
27 | if (!Enum.IsDefined(typeof(ContentAlignment), (int)contentAlignment))
28 | throw new System.ComponentModel.InvalidEnumArgumentException(
29 | "contentAlignment", (int)contentAlignment, typeof(ContentAlignment));
30 |
31 | StringFormat stringFormat = new StringFormat();
32 |
33 | switch (contentAlignment)
34 | {
35 | case ContentAlignment.MiddleCenter:
36 | stringFormat.LineAlignment = StringAlignment.Center;
37 | stringFormat.Alignment = StringAlignment.Center;
38 | break;
39 |
40 | case ContentAlignment.MiddleLeft:
41 | stringFormat.LineAlignment = StringAlignment.Center;
42 | stringFormat.Alignment = StringAlignment.Near;
43 | break;
44 |
45 | case ContentAlignment.MiddleRight:
46 | stringFormat.LineAlignment = StringAlignment.Center;
47 | stringFormat.Alignment = StringAlignment.Far;
48 | break;
49 |
50 | case ContentAlignment.TopCenter:
51 | stringFormat.LineAlignment = StringAlignment.Near;
52 | stringFormat.Alignment = StringAlignment.Center;
53 | break;
54 |
55 | case ContentAlignment.TopLeft:
56 | stringFormat.LineAlignment = StringAlignment.Near;
57 | stringFormat.Alignment = StringAlignment.Near;
58 | break;
59 |
60 | case ContentAlignment.TopRight:
61 | stringFormat.LineAlignment = StringAlignment.Near;
62 | stringFormat.Alignment = StringAlignment.Far;
63 | break;
64 |
65 | case ContentAlignment.BottomCenter:
66 | stringFormat.LineAlignment = StringAlignment.Far;
67 | stringFormat.Alignment = StringAlignment.Center;
68 | break;
69 |
70 | case ContentAlignment.BottomLeft:
71 | stringFormat.LineAlignment = StringAlignment.Far;
72 | stringFormat.Alignment = StringAlignment.Near;
73 | break;
74 |
75 | case ContentAlignment.BottomRight:
76 | stringFormat.LineAlignment = StringAlignment.Far;
77 | stringFormat.Alignment = StringAlignment.Far;
78 | break;
79 | }
80 |
81 | return stringFormat;
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/StdControls/TView/ShellIcon.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Runtime.InteropServices;
4 |
5 | namespace AC.StdControls.Toolkit.TView
6 | {
7 | ///
8 | /// Summary description for ShellIcon.
9 | ///
10 | ///
11 | /// Summary description for ShellIcon. Get a small or large Icon with an easy C# function call
12 | /// that returns a 32x32 or 16x16 System.Drawing.Icon depending on which function you call
13 | /// either GetSmallIcon(string fileName) or GetLargeIcon(string fileName)
14 | ///
15 | public class ShellIcon
16 | {
17 | [StructLayout(LayoutKind.Sequential)]
18 | public struct SHFILEINFO
19 | {
20 | public IntPtr hIcon;
21 | public IntPtr iIcon;
22 | public uint dwAttributes;
23 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
24 | public string szDisplayName;
25 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
26 | public string szTypeName;
27 | };
28 |
29 |
30 | class Win32
31 | {
32 | public const uint SHGFI_ICON = 0x100;
33 | public const uint SHGFI_LARGEICON = 0x0; // 'Large icon
34 | public const uint SHGFI_SMALLICON = 0x1; // 'Small icon
35 |
36 |
37 | [DllImport("shell32.dll")]
38 | public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
39 | }
40 |
41 |
42 | public ShellIcon()
43 | {
44 | //
45 | // TODO: Add constructor logic here
46 | //
47 | }
48 |
49 |
50 | public static Icon GetSmallIcon(string fileName)
51 | {
52 | IntPtr hImgSmall; //the handle to the system image list
53 | SHFILEINFO shinfo = new SHFILEINFO();
54 |
55 |
56 | //Use this to get the small Icon
57 | hImgSmall = Win32.SHGetFileInfo(fileName, 0, ref shinfo,(uint)Marshal.SizeOf(shinfo),Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON);
58 |
59 |
60 | //The icon is returned in the hIcon member of the shinfo struct
61 | return System.Drawing.Icon.FromHandle(shinfo.hIcon);
62 | }
63 |
64 |
65 | public static Icon GetLargeIcon(string fileName)
66 | {
67 | IntPtr hImgLarge; //the handle to the system image list
68 | SHFILEINFO shinfo = new SHFILEINFO();
69 |
70 |
71 | //Use this to get the large Icon
72 | hImgLarge = Win32.SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON);
73 |
74 |
75 | //The icon is returned in the hIcon member of the shinfo struct
76 | return System.Drawing.Icon.FromHandle(shinfo.hIcon);
77 | }
78 |
79 | [DllImport("user32.dll", EntryPoint = "DestroyIcon")]
80 | private static extern bool DestroyIcon(IntPtr hIcon);
81 |
82 | public static Icon Convert(Image image)
83 | {
84 | Icon icon = null;
85 |
86 | Bitmap bitmap = new Bitmap(image);
87 | IntPtr UnmanagedIconHandle = bitmap.GetHicon();
88 |
89 | // Clone FromHandle result so we can destroy the unmanaged handle version of the icon before the converted object is passed out.
90 | icon = Icon.FromHandle(UnmanagedIconHandle).Clone() as Icon;
91 |
92 | //Unfortunately, GetHicon creates an unmanaged handle which must be manually destroyed otherwise a generic error will occur in GDI+.
93 | DestroyIcon(UnmanagedIconHandle);
94 |
95 | return icon;
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/StdControls/GridView/DataGridViewColoredTextBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Windows.Forms.VisualStyles;
10 | using System.Collections;
11 | using System.Reflection;
12 | using Microsoft.VisualBasic.CompilerServices;
13 |
14 | namespace AC.StdControls.Toolkit.GridView
15 | {
16 | public class DataGridViewColoredTextBoxColumn : DataGridViewTextBoxColumn
17 | {
18 | // Methods
19 | public DataGridViewColoredTextBoxColumn()
20 | {
21 | this.CellTemplate = new DataGridViewColoredTextBox();
22 | }
23 | }
24 |
25 | public class DataGridViewColoredTextBox : DataGridViewTextBoxCell
26 | {
27 | protected override void PaintBorder(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle bounds, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle)
28 | {
29 | base.PaintBorder(graphics, clipBounds, bounds, cellStyle, advancedBorderStyle);
30 | }
31 |
32 | protected override void Paint(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates elementState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle,
33 | System.Windows.Forms.DataGridViewPaintParts paintParts)
34 | {
35 | try
36 | {
37 | object o;
38 | o = value;
39 |
40 | if ((((o) != null)))
41 | {
42 | double c;
43 | c = Conversions.ToDouble(o);
44 | //Debug
45 | //MessageBox.Show(c)
46 |
47 |
48 | //erase background
49 | if (c < 0)
50 | {
51 | cellStyle.BackColor = Color.FromArgb(255, 200, 200);
52 | }
53 | else if (c == 0)
54 | {
55 | cellStyle.BackColor = Color.FromArgb(200, 200, 255);
56 | }
57 | else if (c > 0)
58 | {
59 | cellStyle.BackColor = Color.FromArgb(200, 255, 200);
60 | }
61 | }
62 |
63 | base.Paint(graphics, clipBounds, cellBounds, rowIndex, elementState, value, formattedValue, errorText, cellStyle, advancedBorderStyle,
64 | paintParts);
65 |
66 | PaintBorder(graphics, clipBounds, cellBounds, cellStyle, advancedBorderStyle);
67 |
68 | }
69 | catch
70 | {
71 | // empty catch
72 | //MessageBox.Show(ex.Message)
73 | base.Paint(graphics, clipBounds, cellBounds, rowIndex, elementState, value, formattedValue, errorText, cellStyle, advancedBorderStyle,
74 | paintParts);
75 | PaintBorder(graphics, clipBounds, cellBounds, cellStyle, advancedBorderStyle);
76 | }
77 | }
78 |
79 |
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/Calendar/CalendarHighlightRange.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace System.Windows.Forms.Calendar
6 | {
7 | ///
8 | /// Represents a range of time that is highlighted as work-time
9 | ///
10 | public class CalendarHighlightRange
11 | {
12 | #region Events
13 |
14 | #endregion
15 |
16 | #region Fields
17 | private Calendar _calendar;
18 | private DayOfWeek _dayOfWeek;
19 | private TimeSpan _startTime;
20 | private TimeSpan _endTime;
21 | #endregion
22 |
23 | #region Ctor
24 |
25 | ///
26 | /// Creates a new empty range
27 | ///
28 | public CalendarHighlightRange()
29 | {
30 |
31 | }
32 |
33 | ///
34 | /// Creates a new range with the specified information
35 | ///
36 | ///
37 | ///
38 | ///
39 | public CalendarHighlightRange(DayOfWeek day, TimeSpan startTime, TimeSpan endTime)
40 | : this()
41 | {
42 | _dayOfWeek = day;
43 | _startTime = startTime;
44 | _endTime = endTime;
45 | }
46 |
47 | #endregion
48 |
49 | #region Properties
50 |
51 | ///
52 | /// Gets the calendar that this range is assigned to. (If any)
53 | ///
54 | public Calendar Calendar
55 | {
56 | get { return _calendar; }
57 | }
58 |
59 | ///
60 | /// Gets or sets the day of the week for this range
61 | ///
62 | public DayOfWeek DayOfWeek
63 | {
64 | get { return _dayOfWeek; }
65 | set { _dayOfWeek = value; Update(); }
66 | }
67 |
68 | ///
69 | /// Gets or sets the start time of the range
70 | ///
71 | public TimeSpan StartTime
72 | {
73 | get { return _startTime; }
74 | set { _startTime = value; Update(); }
75 | }
76 |
77 | ///
78 | /// Gets or sets the end time of the range
79 | ///
80 | public TimeSpan EndTime
81 | {
82 | get { return _endTime; }
83 | set { _endTime = value; Update(); }
84 | }
85 |
86 | #endregion
87 |
88 | #region Public Methods
89 |
90 | #endregion
91 |
92 | #region Private Methods
93 |
94 | ///
95 | /// Tells the calendar to update the highligts
96 | ///
97 | private void Update()
98 | {
99 | if (Calendar != null)
100 | {
101 | Calendar.UpdateHighlights();
102 | }
103 | }
104 |
105 | ///
106 | /// Sets the value of the property
107 | ///
108 | /// Calendar that this range belongs to
109 | internal void SetCalendar(Calendar calendar)
110 | {
111 | _calendar = calendar;
112 | }
113 |
114 | #endregion
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/Charting/DataBar.cs:
--------------------------------------------------------------------------------
1 | /****************************************************************************************************************
2 | (C) Copyright 2007 Zuoliu Ding. All Rights Reserved.
3 | DataBar.cs: class DataBar
4 | Created by: Zuoliu Ding, 05/20/2006
5 | Note: Bar Chart Custom control
6 | Site: http://www.codeproject.com/cs/miscctrl/SystemMonitor.asp
7 | ****************************************************************************************************************/
8 |
9 | using System;
10 | using System.ComponentModel;
11 | using System.Drawing;
12 | using System.Windows.Forms;
13 |
14 | namespace AC.ExtendedRenderer.Toolkit.Charting
15 | {
16 | ///
17 | /// Summary description for DataBar.
18 | ///
19 | [ToolboxBitmap(typeof(DataBar)), ToolboxItem(true)]
20 | public class DataBar : System.Windows.Forms.UserControl
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.Container components = null;
26 | int _value;
27 | Color _colorBar;
28 |
29 | #region Constructor/Dispose
30 | public DataBar()
31 | {
32 | // This call is required by the Windows.Forms Form Designer.
33 | InitializeComponent();
34 | BackColor = Color.Silver;
35 |
36 | _value = 0;
37 | _colorBar = Color.DarkBlue;
38 | }
39 |
40 | ///
41 | /// Clean up any resources being used.
42 | ///
43 | protected override void Dispose(bool disposing)
44 | {
45 | if (disposing)
46 | {
47 | if (components != null)
48 | {
49 | components.Dispose();
50 | }
51 | }
52 | base.Dispose(disposing);
53 | }
54 | #endregion
55 |
56 | #region Component Designer generated code
57 | ///
58 | /// Required method for Designer support - do not modify
59 | /// the contents of this method with the code editor.
60 | ///
61 | private void InitializeComponent()
62 | {
63 | this.Name = "DataBar";
64 | this.Size = new System.Drawing.Size(128, 16);
65 | }
66 | #endregion
67 |
68 | #region "Properties"
69 | [Description("Gets or sets the current Bar Color in chart"), Category("Appearance")]
70 | public Color BarColor
71 | {
72 | get { return _colorBar; }
73 | set { _colorBar = value; }
74 | }
75 |
76 | [Description("Gets or sets the current value in data bar"), Category("Behavior")]
77 | public int Value
78 | {
79 | get { return _value; }
80 | set
81 | {
82 | _value = value;
83 | Invalidate();
84 | }
85 | }
86 | #endregion
87 |
88 |
89 | #region Drawing
90 | protected override void OnPaint(PaintEventArgs e)
91 | {
92 | Rectangle rt = this.ClientRectangle;
93 | e.Graphics.FillRectangle(new SolidBrush(_colorBar), 0, 0, rt.Width * _value / 100, rt.Height);
94 |
95 | base.OnPaint(e);
96 | }
97 | #endregion
98 |
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/Renderer/ThemedControls/ThemedButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Drawing;
4 | using System.Windows.Forms;
5 |
6 | namespace Office2007Renderer.ThemedControls
7 | {
8 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.Button)), ToolboxItem(false)]
9 | public class ThemedButton : AC.StdControls.Toolkit.Buttons.CustomButton
10 | {
11 | public ThemedButton()
12 | {
13 | // Set the SystemEvents class to receive event notification when a user
14 | // preference changes, the palette changes, or when display settings change.
15 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
16 | ToolStripManager.RendererChanged += new EventHandler(ToolStripManager_RendererChanged);
17 |
18 | InitColors();
19 | ToolStripManager_RendererChanged(this, new EventArgs() );
20 | }
21 |
22 | private void InitColors()
23 | {
24 | try
25 | //myCustom Renderer
26 | {
27 | Office2007Renderer renderer = (Office2007Renderer)ToolStripManager.Renderer;
28 | ProfessionalColorTable _colorTable = (ProfessionalColorTable)renderer.ColorTable;
29 | //Set Colors
30 | GradientTop = _colorTable.ToolStripGradientBegin;
31 | GradientBottom = _colorTable.ToolStripGradientMiddle;
32 | GradientBorderColor = _colorTable.ToolStripBorder;
33 | if (GradientBorderColor == Color.White) GradientBorderColor = Color.LightGray;
34 | this.ForeColor = _colorTable.MenuItemText;
35 | HotForeColor = _colorTable.MenuItemText;
36 | PressedForeColor = _colorTable.MenuItemText;
37 | }
38 | catch (Exception ex)
39 | {
40 | try
41 | {
42 | System.Windows.Forms.ToolStripProfessionalRenderer renderer = (System.Windows.Forms.ToolStripProfessionalRenderer)ToolStripManager.Renderer;
43 | System.Windows.Forms.ProfessionalColorTable _colorTable = (System.Windows.Forms.ProfessionalColorTable)renderer.ColorTable;
44 | //Set Colors
45 | GradientTop = _colorTable.ToolStripGradientBegin;
46 | GradientBottom = _colorTable.ToolStripGradientMiddle;
47 | GradientBorderColor = _colorTable.ToolStripBorder;
48 | if (GradientBorderColor == Color.White) GradientBorderColor = Color.LightGray;
49 | this.ForeColor = _colorTable.SeparatorDark;
50 | HotForeColor = _colorTable.SeparatorDark;
51 | PressedForeColor = _colorTable.SeparatorDark;
52 | }
53 | catch (Exception ex3)
54 | {
55 | Console.WriteLine(ex3.Message);
56 | }
57 | Console.WriteLine(ex.Message);
58 | }
59 | }
60 | protected override void OnCreateControl()
61 | {
62 | base.OnCreateControl();
63 | try
64 | {
65 | InitColors();
66 | }
67 | catch
68 | {
69 | }
70 | }
71 |
72 | void ToolStripManager_RendererChanged(object sender, EventArgs e)
73 | {
74 | InitColors();
75 | this.Invalidate();
76 | }
77 |
78 | }
79 |
80 | }
--------------------------------------------------------------------------------
/KryptonTimeFrame.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Text;
6 | using System.Windows.Forms;
7 | using System.Drawing;
8 | using System.Drawing.Drawing2D;
9 | using System.Runtime.InteropServices;
10 | using ComponentFactory.Krypton.Toolkit;
11 |
12 | namespace AC.ExtendedRenderer.Toolkit
13 | {
14 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.MonthCalendar))]
15 | public class KryptonTimeFrame : TimeFrame
16 | {
17 | private IPalette _palette;
18 | private PaletteRedirect _paletteRedirect;
19 | private PaletteBackInheritRedirect _paletteBack;
20 | private PaletteBorderInheritRedirect _paletteBorder;
21 | private PaletteContentInheritRedirect _paletteContent;
22 |
23 | #region ... Constructor ...
24 | public KryptonTimeFrame()
25 | {
26 | SetStyle(ControlStyles.UserPaint, true);
27 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
28 | SetStyle(ControlStyles.SupportsTransparentBackColor, true);
29 | UpdateStyles();
30 |
31 | // add Palette Handler
32 | if (_palette != null)
33 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
34 |
35 | KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);
36 |
37 | _palette = KryptonManager.CurrentGlobalPalette;
38 | _paletteRedirect = new PaletteRedirect(_palette);
39 | _paletteBack = new PaletteBackInheritRedirect(_paletteRedirect);
40 | _paletteBorder = new PaletteBorderInheritRedirect(_paletteRedirect);
41 | _paletteContent = new PaletteContentInheritRedirect(_paletteRedirect);
42 |
43 | InitColors();
44 |
45 |
46 | }
47 | #endregion
48 |
49 | private void InitColors()
50 | {
51 | this.BackColor = _palette.ColorTable.ToolStripGradientBegin;
52 | this.ForeColor = _palette.GetContentShortTextColor1(PaletteContentStyle.LabelNormalControl, PaletteState.Normal);
53 | this.Font = _palette.ColorTable.MenuStripFont;
54 | this.HotTrack = _palette.GetBackColor1(PaletteBackStyle.ButtonStandalone, PaletteState.Tracking);
55 | this.Selected = _palette.GetBackColor2(PaletteBackStyle.ButtonNavigatorStack, PaletteState.Pressed);
56 | this.GridDarkColor = _palette.ColorTable.ToolStripGradientEnd;
57 | this.GridLightColor = _palette.ColorTable.ToolStripGradientMiddle;
58 |
59 | }
60 |
61 |
62 | #region ... Krypton ...
63 |
64 | //Kripton Palette Events
65 | private void OnGlobalPaletteChanged(object sender, EventArgs e)
66 | {
67 | if (_palette != null)
68 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
69 |
70 | _palette = KryptonManager.CurrentGlobalPalette;
71 | _paletteRedirect.Target = _palette;
72 |
73 | if (_palette != null)
74 | {
75 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
76 | //repaint with new values
77 |
78 | InitColors();
79 |
80 | }
81 |
82 | Invalidate();
83 | }
84 |
85 | //Kripton Palette Events
86 | private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
87 | {
88 | Invalidate();
89 | }
90 | #endregion
91 |
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/OutlookGridColumnCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
6 | {
7 | ///
8 | /// List of the current columns of the OutlookGrid
9 | ///
10 | public class OutlookGridColumnCollection : List
11 | {
12 | private int maxGroupOrder;
13 |
14 | ///
15 | /// Constructor
16 | ///
17 | public OutlookGridColumnCollection()
18 | : base()
19 | {
20 | maxGroupOrder = 0;
21 | }
22 |
23 | ///
24 | /// Gets the OutlookGridColumn in the list by its name
25 | ///
26 | /// The column name.
27 | /// OutlookGridColumn
28 | public OutlookGridColumn this[string columnName]
29 | {
30 | get
31 | {
32 | return this.Find(c => c.DataGridViewColumn.Name.Equals(columnName));
33 | }
34 | }
35 |
36 | public int MaxGroupOrder
37 | {
38 | get;
39 | set;
40 | }
41 |
42 | ///
43 | /// Gets the number of columns grouped
44 | ///
45 | /// the number of columns grouped.
46 | public int CountGrouped()
47 | {
48 | return this.Count(c => c.IsGrouped == true);
49 | }
50 |
51 | ///
52 | /// Gets the list of grouped columns
53 | ///
54 | /// The list of grouped columns.
55 | public List GroupedColumns()
56 | {
57 | return this.Where(c => c.IsGrouped).OrderBy(c => c.GroupOrder).ToList();
58 | }
59 |
60 | ///
61 | /// Gets the column from its real index (from the underlying DataGridViewColumn)
62 | ///
63 | /// The index
64 | /// The OutlookGridColumn.
65 | public OutlookGridColumn FindFromColumnIndex(int index)
66 | {
67 | return this.FirstOrDefault(c => c.DataGridViewColumn.Index == index);
68 | }
69 |
70 | ///
71 | /// Gets the index (from DataGridViewColumn) of the sorted column that is not grouped if it exists.
72 | ///
73 | /// -1 if any, the index of the underlying DataGridViewColumn otherwise
74 | public int FindSortedColumnNotgrouped()
75 | {
76 | var res = this.Find(c => !c.IsGrouped && (c.SortDirection != SortOrder.None));
77 | if (res == null)
78 | {
79 | return -1;
80 | }
81 | else
82 | {
83 | return res.DataGridViewColumn.Index;
84 | }
85 | }
86 |
87 | ///
88 | /// Removes a groupOrder and update the groups order for all columns
89 | ///
90 | /// The order that will be removed.
91 | internal void RemoveGroupOrder(int removed)
92 | {
93 | for (int i = 0; i < this.Count; i++)
94 | {
95 | if (this[i].GroupOrder > removed)
96 | {
97 | this[i].GroupOrder--;
98 | }
99 | }
100 | maxGroupOrder--;
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/OutlookGridGroupCollection.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | using System.Text;
7 |
8 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
9 | {
10 | ///
11 | /// List of IOutlookGridGroups
12 | ///
13 | public class OutlookGridGroupCollection
14 | {
15 | #region "Variables"
16 | private IOutlookGridGroup parentGroup;
17 | private List groupList;
18 | #endregion
19 |
20 | #region "Constructor"
21 | ///
22 | /// Constructor
23 | ///
24 | /// Parent group , if any
25 | public OutlookGridGroupCollection(IOutlookGridGroup parentGroup)
26 | {
27 | groupList = new List();
28 | }
29 | #endregion
30 |
31 | #region Properties
32 |
33 | ///
34 | /// Gets or Sets the parent group
35 | ///
36 | public IOutlookGridGroup ParentGroup
37 | {
38 | get
39 | {
40 | return this.parentGroup;
41 | }
42 | internal set
43 | {
44 | this.parentGroup = value;
45 | }
46 | }
47 |
48 | ///
49 | /// Gets the list of IOutlookGridGroup.
50 | ///
51 | public List List
52 | {
53 | get
54 | {
55 | return groupList;
56 | }
57 | }
58 |
59 | ///
60 | /// Gets the number of groups
61 | ///
62 | public int Count
63 | {
64 | get
65 | {
66 | return groupList.Count;
67 | }
68 | }
69 |
70 | #endregion
71 |
72 | #region "Public methods"
73 |
74 | ///
75 | /// Gets the Group object
76 | ///
77 | /// Index in the list of groups.
78 | /// The IOutlookGridGroup.
79 | public IOutlookGridGroup this[int index]
80 | {
81 | get
82 | {
83 | return groupList[index];
84 | }
85 | }
86 |
87 | ///
88 | /// Adds a new group
89 | ///
90 | /// The IOutlookGridGroup.
91 | public void Add(IOutlookGridGroup group)
92 | {
93 | groupList.Add(group);
94 | }
95 |
96 | ///
97 | /// Sorts the groups
98 | ///
99 | public void Sort()
100 | {
101 | groupList.Sort();
102 | }
103 |
104 | ///
105 | /// Find a group by its value
106 | ///
107 | /// The value of the group
108 | /// The IOutlookGridGroup.
109 | public IOutlookGridGroup FindGroup(object value)
110 | {
111 | return groupList.Find(c => c.Value.Equals(value));
112 | }
113 |
114 | #endregion
115 |
116 | #region "Internals"
117 |
118 | internal void Clear()
119 | {
120 | parentGroup = null;
121 | //If a group is collapsed the rows will not appear. Then if we clear the group the rows should not remain "collapsed"
122 | for (int i = 0; i < groupList.Count; i++)
123 | {
124 | groupList[i].Collapsed = false;
125 | }
126 | groupList.Clear();
127 | }
128 |
129 | #endregion
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/Calendar/CalendarRendererEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Drawing;
5 |
6 | namespace System.Windows.Forms.Calendar
7 | {
8 | ///
9 | /// Contains basic information about a drawing event for
10 | ///
11 | public class CalendarRendererEventArgs
12 | : EventArgs
13 | {
14 | #region Events
15 |
16 | #endregion
17 |
18 | #region Fields
19 | private Calendar _calendar;
20 | private Rectangle _clip;
21 | private Graphics _graphics;
22 | private object _tag;
23 | #endregion
24 |
25 | #region Ctor
26 |
27 | ///
28 | /// Use it wisely just to initialize some stuff
29 | ///
30 | protected CalendarRendererEventArgs()
31 | {
32 |
33 | }
34 |
35 | ///
36 | /// Creates a new
37 | ///
38 | /// Calendar where painting
39 | /// Device where to paint
40 | /// Paint event clip area
41 | public CalendarRendererEventArgs(Calendar calendar, Graphics g, Rectangle clipRectangle)
42 | {
43 | _calendar = calendar;
44 | _graphics = g;
45 | _clip = clipRectangle;
46 | }
47 |
48 | ///
49 | /// Creates a new
50 | ///
51 | /// Calendar where painting
52 | /// Device where to paint
53 | /// Paint event clip area
54 | public CalendarRendererEventArgs(Calendar calendar, Graphics g, Rectangle clipRectangle, object tag)
55 | {
56 | _calendar = calendar;
57 | _graphics = g;
58 | _clip = clipRectangle;
59 | _tag = tag;
60 | }
61 |
62 | ///
63 | /// Copies the parameters from the specified
64 | ///
65 | ///
66 | public CalendarRendererEventArgs(CalendarRendererEventArgs original)
67 | {
68 | _calendar = original.Calendar;
69 | _graphics = original.Graphics;
70 | _clip = original.ClipRectangle;
71 | _tag = original.Tag;
72 | }
73 |
74 | #endregion
75 |
76 | #region Properties
77 |
78 | ///
79 | /// Gets the calendar where painting
80 | ///
81 | public Calendar Calendar
82 | {
83 | get { return _calendar; }
84 | }
85 |
86 | ///
87 | /// Gets the clip of the paint event
88 | ///
89 | public Rectangle ClipRectangle
90 | {
91 | get { return _clip; }
92 | }
93 |
94 | ///
95 | /// Gets the device where to paint
96 | ///
97 | public Graphics Graphics
98 | {
99 | get { return _graphics; }
100 | }
101 |
102 | ///
103 | /// Gets or sets a tag for the event
104 | ///
105 | public object Tag
106 | {
107 | get { return _tag; }
108 | set { _tag = value; }
109 | }
110 |
111 |
112 | #endregion
113 |
114 | #region Public Methods
115 |
116 | #endregion
117 |
118 | #region Private Methods
119 |
120 | #endregion
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/KryptonOutlookGrid/IOutlookGridGroup.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Herre Kuijpers -
2 | //
3 | // This source file(s) may be redistributed, altered and customized
4 | // by any means PROVIDING the authors name and all copyright
5 | // notices remain intact.
6 | // THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
7 | // EXPRESS OR IMPLIED. USE IT AT YOUR OWN RISK. THE AUTHOR ACCEPTS NO
8 | // LIABILITY FOR ANY DATA DAMAGE/LOSS THAT THIS PRODUCT MAY CAUSE.
9 | //-----------------------------------------------------------------------
10 |
11 |
12 |
13 | using System;
14 | using System.Collections.Generic;
15 | using System.Drawing;
16 |
17 | using System.Text;
18 | using System.Windows.Forms;
19 |
20 | namespace AC.ExtendedRenderer.Toolkit.KryptonOutlookGrid
21 | {
22 | ///
23 | /// IOutlookGridGroup specifies the interface of any implementation of a OutlookGridGroup class
24 | /// Each implementation of the IOutlookGridGroup can override the behaviour of the grouping mechanism
25 | /// Notice also that ICloneable must be implemented. The OutlookGrid makes use of the Clone method of the Group
26 | /// to create new Group clones. Related to this is the OutlookGrid.GroupTemplate property, which determines what
27 | /// type of Group must be cloned.
28 | ///
29 | public interface IOutlookGridGroup : IComparable, ICloneable
30 | {
31 | ///
32 | /// the text to be displayed in the group row
33 | ///
34 | string Text { get; set; }
35 |
36 | ///
37 | /// determines the value of the current group. this is used to compare the group value
38 | /// against each item's value.
39 | ///
40 | object Value { get; set; }
41 |
42 | ///
43 | /// indicates whether the group is collapsed. If it is collapsed, it group items (rows) will
44 | /// not be displayed.
45 | ///
46 | bool Collapsed { get; set; }
47 |
48 | ///
49 | /// specifies the number of items that are part of the current group
50 | /// this value is automatically filled each time the grid is re-drawn
51 | /// e.g. after sorting the grid.
52 | ///
53 | int ItemCount { get; set; }
54 |
55 | ///
56 | /// specifies the default height of the group
57 | /// each group is cloned from the GroupStyle object. Setting the height of this object
58 | /// will also set the default height of each group.
59 | ///
60 | int Height { get; set; }
61 |
62 | //New additions
63 |
64 | ///
65 | /// specifies which column is associated with this group
66 | ///
67 | OutlookGridColumn Column { get; set; }
68 |
69 | ///
70 | /// The list of the rows contained in a group
71 | ///
72 | List Rows { get; set; }
73 |
74 | ///
75 | /// The parent group if any
76 | ///
77 | IOutlookGridGroup ParentGroup { get; set; }
78 |
79 | ///
80 | /// The level in the depth of groups
81 | ///
82 | int Level { get; set; }
83 |
84 | ///
85 | /// The children groups
86 | ///
87 | OutlookGridGroupCollection Children { get; set; }
88 |
89 | ///
90 | /// Format style
91 | ///
92 | string FormatStyle { get; set; }
93 |
94 | ///
95 | /// Image associated to the group if any
96 | ///
97 | Image GroupImage { get; set; }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/Palette/CreamPalette.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using ComponentFactory.Krypton.Toolkit;
6 | using System.Reflection;
7 |
8 |
9 | namespace AC.ExtendedRenderer.Toolkit
10 | {
11 | public class Palette
12 | {
13 |
14 | public static KryptonPalette LoadKryptonPaletteStdCutom(KryptonPalette NewCustomPalette)
15 | {
16 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.StdCustomPalette_v18.xml");
17 | NewCustomPalette.Import(PaletteStream);
18 | return NewCustomPalette;
19 | }
20 |
21 | public static KryptonPalette LoadKryptonPaletteGreen(KryptonPalette NewCustomPalette)
22 | {
23 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.GreenPalette_v18.xml");
24 | NewCustomPalette.Import(PaletteStream);
25 | return NewCustomPalette;
26 |
27 | }
28 |
29 | public static KryptonPalette LoadKryptonPaletteHazel(KryptonPalette NewCustomPalette)
30 | {
31 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.Hazel_v18.xml");
32 | NewCustomPalette.Import(PaletteStream);
33 | return NewCustomPalette;
34 |
35 | }
36 |
37 | public static KryptonPalette LoadKryptonPaletteAsphalt(KryptonPalette NewCustomPalette)
38 | {
39 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.Asphalt_v18.xml");
40 | NewCustomPalette.Import(PaletteStream);
41 | return NewCustomPalette;
42 |
43 | }
44 |
45 | public static KryptonPalette LoadKryptonPaletteChrome(KryptonPalette NewCustomPalette)
46 | {
47 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.Chrome_v18.xml");
48 | NewCustomPalette.Import(PaletteStream);
49 | return NewCustomPalette;
50 |
51 | }
52 |
53 | public static KryptonPalette LoadKryptonPaletteCream(KryptonPalette NewCustomPalette)
54 | {
55 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.Cream_v18.xml");
56 | NewCustomPalette.Import(PaletteStream);
57 | return NewCustomPalette;
58 |
59 | }
60 |
61 | public static KryptonPalette LoadKryptonPaletteWindows7(KryptonPalette NewCustomPalette)
62 | {
63 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.win7_Palette_v18.xml");
64 | NewCustomPalette.Import(PaletteStream);
65 | return NewCustomPalette;
66 |
67 | }
68 |
69 | public static KryptonPalette LoadKryptonPaletteMcLane(KryptonPalette NewCustomPalette)
70 | {
71 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.McLane_v18.xml");
72 | NewCustomPalette.Import(PaletteStream);
73 | return NewCustomPalette;
74 |
75 | }
76 |
77 | public static KryptonPalette LoadKryptonPalettePlastic(KryptonPalette NewCustomPalette)
78 | {
79 | System.IO.Stream PaletteStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AC.ExtendedRenderer.Toolkit.Palette.Plastic_v18.xml");
80 | NewCustomPalette.Import(PaletteStream);
81 | return NewCustomPalette;
82 |
83 | }
84 |
85 |
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/Charting/KryptonLxLedControlcs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using ComponentFactory.Krypton.Toolkit;
5 | using System.Windows.Forms;
6 | using System.Drawing;
7 |
8 | namespace AC.ExtendedRenderer.Toolkit.Charting
9 | {
10 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.Control))]
11 | public class KryptonLxLedControl : LxLedControl
12 | {
13 | private IPalette _palette;
14 | private PaletteRedirect _paletteRedirect;
15 |
16 | public KryptonLxLedControl()
17 | {
18 | SetStyle(ControlStyles.UserPaint, true);
19 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
20 | SetStyle(ControlStyles.SupportsTransparentBackColor, true);
21 | UpdateStyles();
22 |
23 | // add Palette Handler
24 | if (_palette != null)
25 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
26 |
27 | KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged);
28 |
29 | _palette = KryptonManager.CurrentGlobalPalette;
30 | _paletteRedirect = new PaletteRedirect(_palette);
31 |
32 | InitColors();
33 |
34 | }
35 | protected override void OnPaint(PaintEventArgs e)
36 | {
37 | base.OnPaint(e);
38 | //e.Graphics.FillRectangle(new SolidBrush(Color.Red), e.ClipRectangle);
39 |
40 | }
41 |
42 |
43 | #region ... Krypton ...
44 | private void InitColors()
45 | {
46 | this.HighlightOpaque = 75;
47 | this.BackColor = Color.Transparent;
48 |
49 | this.BackColor_1 = _palette.ColorTable.ToolStripGradientEnd;
50 | this.BackColor_2 = _palette.ColorTable.ToolStripGradientEnd;
51 |
52 | this.FadedColor = _palette.ColorTable.ToolStripGradientMiddle;
53 |
54 | //for sparkle
55 | if (FadedColor == BackColor_2) this.FadedColor = _palette.ColorTable.ToolStripGradientBegin;
56 |
57 | this.BorderColor = _palette.ColorTable.ToolStripBorder;
58 |
59 | this.FocusedBorderColor = _palette.ColorTable.ToolStripBorder;
60 | this.ForeColor = _palette.ColorTable.ToolStripText;
61 | Invalidate();
62 |
63 | }
64 |
65 |
66 | //Kripton Palette Events
67 | private void OnGlobalPaletteChanged(object sender, EventArgs e)
68 | {
69 | if (_palette != null)
70 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
71 |
72 | _palette = KryptonManager.CurrentGlobalPalette;
73 | _paletteRedirect.Target = _palette;
74 |
75 | if (_palette != null)
76 | {
77 | _palette.PalettePaint += new EventHandler(OnPalettePaint);
78 | //repaint with new values
79 |
80 | InitColors();
81 |
82 | }
83 |
84 | Invalidate();
85 | }
86 |
87 | //Kripton Palette Events
88 | private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
89 | {
90 | Invalidate();
91 | }
92 |
93 | protected override void Dispose(bool disposing)
94 | {
95 | if (disposing)
96 | {
97 | if (_palette != null)
98 | {
99 | _palette.PalettePaint -= new EventHandler(OnPalettePaint);
100 | _palette = null;
101 | }
102 |
103 | KryptonManager.GlobalPaletteChanged -= new EventHandler(OnGlobalPaletteChanged);
104 | }
105 |
106 | base.Dispose(disposing);
107 | }
108 | #endregion
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/KryptonImageComboBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Data;
4 | using System.Drawing;
5 | using System.Drawing.Design;
6 | using System.ComponentModel;
7 | using System.ComponentModel.Design;
8 | using System.Collections.Generic;
9 | using System.Windows.Forms;
10 | using System.Runtime.InteropServices;
11 | using Microsoft.Win32;
12 | using ComponentFactory.Krypton.Toolkit;
13 |
14 | namespace AC.ExtendedRenderer.Toolkit
15 | {
16 | ///
17 | /// Provide a ComboBox with Krypton styling applied.
18 | /// Credits to Ricardo Francisco - http://cid-a2733fd867b9e919.profile.live.com/
19 | ///
20 | [ToolboxItem(true)]
21 | [System.Drawing.ToolboxBitmapAttribute(typeof(System.Windows.Forms.ComboBox))]
22 | [DefaultEvent("SelectedIndexChanged")]
23 | [DefaultProperty("Text")]
24 | [DefaultBindingProperty("Text")]
25 | [LookupBindingProperties("DataSource", "DisplayMember", "ValueMember", "SelectedValue")]
26 | [DesignerCategory("code")]
27 | [Description("Displays an editable textbox with a drop-down list of permitted values.")]
28 | [ClassInterface(ClassInterfaceType.AutoDispatch)]
29 | [ComVisible(true)]
30 | public class KryptonImageComboBox : ComponentFactory.Krypton.Toolkit.KryptonComboBox
31 | {
32 |
33 | public KryptonImageComboBox()
34 | : base()
35 | {
36 | this.ComboBox.DrawItem += new DrawItemEventHandler(OnDrawItem);
37 | }
38 |
39 | protected void OnDrawItem(object sender, DrawItemEventArgs e)
40 | {
41 | if (e.Index < 0)
42 | return;
43 |
44 | if ((e.State & DrawItemState.ComboBoxEdit) == DrawItemState.ComboBoxEdit && this.Items[e.Index] is KryptonListItem)
45 | {
46 | // Always get base implementation to draw the background
47 | e.DrawBackground();
48 |
49 | // Find correct text color
50 | Color textColor = this.ComboBox.ForeColor;
51 | if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
52 | textColor = SystemColors.HighlightText;
53 |
54 | // Find correct background color
55 | Color backColor = this.ComboBox.BackColor;
56 | if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
57 | backColor = SystemColors.Highlight;
58 |
59 | Image image = ((KryptonListItem)this.Items[e.Index]).Image;
60 |
61 | Rectangle textRectangle = textRectangle = new Rectangle(e.Bounds.X + 19, e.Bounds.Y, e.Bounds.Width - 19, e.Bounds.Height);
62 |
63 | // Is there an item to draw
64 | if (e.Index >= 0)
65 | {
66 | // Set the correct text rendering hint for the text drawing. We only draw if the edit text is enabled so we
67 | // just always grab the normal state value. Without this line the wrong hint can occur because it inherits
68 | // it from the device context. Resulting in blurred text.
69 | e.Graphics.TextRenderingHint = CommonHelper.PaletteTextHintToRenderingHint(StateNormal.ComboBox.PaletteContent.GetContentShortTextHint(PaletteState.Normal));
70 |
71 | // Draw text using font defined by the control
72 | TextRenderer.DrawText(e.Graphics,
73 | this.ComboBox.Text, this.ComboBox.Font,
74 | textRectangle,
75 | textColor, backColor,
76 | TextFormatFlags.TextBoxControl |
77 | TextFormatFlags.NoPadding);
78 | if (image != null)
79 | e.Graphics.DrawImage(image, new Rectangle(3, 3, 16, 16));
80 | }
81 | }
82 | }
83 |
84 | }
85 | }
86 |
--------------------------------------------------------------------------------