diff --git a/Bin/Debug/CommonControls/.NET4 示例/1.html b/Bin/Debug/CommonControls/.NET4 示例/1.html
new file mode 100644
index 0000000..b7b14fd
--- /dev/null
+++ b/Bin/Debug/CommonControls/.NET4 示例/1.html
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe
index c2dfb5b..d0ff6b8 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe
index d34631a..ca14880 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe and b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project2.exe differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll
index d06683a..ba8dc42 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml b/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml
index 2ccf8da..531f846 100644
--- a/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml
+++ b/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml
@@ -2101,6 +2101,20 @@
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
获取绝对路径
@@ -8169,6 +8183,17 @@
+
+
+
+
+
+
+
+
+
+ 超时时间
+
以post方式获取网页源码
@@ -8228,6 +8253,11 @@
+
+
+ 代理
+
+
@@ -9292,11 +9322,31 @@
Ctrl键
+
+
+ Alt+Ctrl键
+
+
Shift键
+
+
+ Shift+Alt键
+
+
+
+
+ Shift+Ctrl键
+
+
+
+
+ Alt+Shift+Ctrl键
+
+
Win键
@@ -9328,6 +9378,50 @@
释放热键
+
+
+ 获取热键Tag
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+
+ 判断热键id是否存在
+
+
+
+
+
+
+ 判断热键Tag是否存在
+
+
+
+
+
+
+ 判断热键是否存在
+
+
+
+
+
注册热键
@@ -9346,6 +9440,16 @@
+
+
+ 注册热键
+
+
+
+
+
+
+
获取热键数量
@@ -9396,6 +9500,11 @@
热键id
+
+
+ 热键Tag
+
+
功能键
@@ -9414,6 +9523,20 @@
+
+
+ 热键类型
+
+
+
+
+
+
+
+
+ 热键类型
+
+
diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll
index 624193f..edcbbf8 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll
index 7e80337..384a82e 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/UserDb/Win.dat b/Bin/Debug/CommonControls/.NET4 示例/UserDb/Win.dat
index f9a164c..9683fa9 100644
--- a/Bin/Debug/CommonControls/.NET4 示例/UserDb/Win.dat
+++ b/Bin/Debug/CommonControls/.NET4 示例/UserDb/Win.dat
@@ -1,2 +1,2 @@
[Money_Op]
-hwnd=2298254
+hwnd=2827616
diff --git a/Bin/Debug/CommonControls/.NET4 示例/cUpdate.dat b/Bin/Debug/CommonControls/.NET4 示例/cUpdate.dat
index 296383d..f96c173 100644
--- a/Bin/Debug/CommonControls/.NET4 示例/cUpdate.dat
+++ b/Bin/Debug/CommonControls/.NET4 示例/cUpdate.dat
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll
index 7c662ef..c21b61e 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml b/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml
index f2c5f2d..f9105cf 100644
--- a/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml
+++ b/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml
@@ -4,6 +4,830 @@
ryControls
+
+
+ Martin Lottering : 2007-10-27
+ --------------------------------
+ This is a usefull control in Filters. Allows you to save space and can replace a Grouped Box of CheckBoxes.
+ Currently used on the TasksFilter for TaskStatusses, which means the user can select which Statusses to include
+ in the "Search".
+ This control does not implement a CheckBoxListBox, instead it adds a wrapper for the normal ComboBox and Items.
+ See the CheckBoxItems property.
+ ----------------
+ ALSO IMPORTANT: In Data Binding when setting the DataSource. The ValueMember must be a bool type property, because it will
+ be binded to the Checked property of the displayed CheckBox. Also see the DisplayMemberSingleItem for more information.
+ ----------------
+ Extends the CodeProject PopupComboBox "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp"
+ by Lukasz Swiatkowski.
+
+
+
+
+
+
+
+
+
+ The checkbox list control. The public CheckBoxItems property provides a direct reference to its Items.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation and its formatting however is controlled
+ by the Binded object, since it owns that property.
+
+
+
+
+ Builds a CSV string of the items selected.
+
+
+
+
+ A direct reference to the Items of CheckBoxComboBoxListControl.
+ You can use it to Get or Set the Checked status of items manually if you want.
+ But do not manipulate the List itself directly, e.g. Adding and Removing,
+ since the list is synchronised when shown with the ComboBox.Items. So for changing
+ the list contents, use Items instead.
+
+
+
+
+ The DataSource of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ The ValueMember of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation however is controlled by the Binded
+ object, since it owns that property.
+
+
+
+
+ Made this property Browsable again, since the Base Popup hides it. This class uses it again.
+ Gets an object representing the collection of the items contained in this
+ System.Windows.Forms.ComboBox.
+
+ A System.Windows.Forms.ComboBox.ObjectCollection representing the items in
+ the System.Windows.Forms.ComboBox.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Will add an invisible item when the style is DropDownList,
+ to help maintain the correct text in main TextBox.
+
+
+
+
+
+
+
+
+
+
+
+ A function to clear/reset the list.
+ (Ubiklou : http://www.codeproject.com/KB/combobox/extending_combobox.aspx?msg=2526813#xx2526813xx)
+
+
+
+
+ Uncheck all items.
+
+
+
+
+ The properties that will be assigned to the checkboxes as default values.
+
+
+
+
+
+
+
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ A container control for the ListControl to ensure the ScrollBar on the ListControl does not
+ Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ not work as I expected.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup class to ensure Resize operations work correctly.
+
+
+
+
+
+ This ListControl that pops up to the User. It contains the CheckBoxComboBoxItems.
+ The items are docked DockStyle.Top in this control.
+
+
+
+
+
+
+
+
+
+
+ Simply a reference to the CheckBoxComboBox.
+
+
+
+
+ A Typed list of ComboBoxCheckBoxItems.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup control to enable Resize operations.
+
+
+
+
+
+
+
+
+
+
+
+ Maintains the controls displayed in the list by keeping them in sync with the actual
+ items in the combobox. (e.g. removing and adding as well as ordering)
+
+
+
+
+ The CheckBox items displayed in the Popup of the ComboBox.
+
+
+
+
+
+
+ A reference to the CheckBoxComboBox.
+ A reference to the item in the ComboBox.Items that this object is extending.
+
+
+
+ A reference to the CheckBoxComboBox.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ When using Data Binding operations via the DataSource property of the ComboBox. This
+ adds the required Bindings for the CheckBoxes.
+
+
+
+
+
+
+
+
+
+
+ Added this handler because the control doesn't seem
+ to initialize correctly until shown for the first
+ time, which also means the summary text value
+ of the combo is out of sync initially.
+
+
+
+
+ A Typed List of the CheckBox items.
+ Simply a wrapper for the CheckBoxComboBox.Items. A list of CheckBoxComboBoxItem objects.
+ This List is automatically synchronised with the Items of the ComboBox and extended to
+ handle the additional boolean value. That said, do not Add or Remove using this List,
+ it will be lost or regenerated from the ComboBox.Items.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the item with the specified displayName or Text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called when any property changes.
+
+
+
+
+
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com Simple pop-up control http://www.codeproject.com/cs/miscctrl/simplepopup.asp.
+ Represents a pop-up window.
+
+
+
+
+ Gets the content of the pop-up.
+
+
+
+
+ Gets a value indicating whether the PopupControl.Popup uses the fade effect.
+
+ true if pop-up uses the fade effect; otherwise, false.
+ To use the fade effect, the FocusOnOpen property also has to be set to true.
+
+
+
+ Gets or sets a value indicating whether to focus the content after the pop-up has been opened.
+
+ true if the content should be focused after the pop-up has been opened; otherwise, false.
+ If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect.
+
+
+
+ Gets or sets a value indicating whether presing the alt key should close the pop-up.
+
+ true if presing the alt key does not close the pop-up; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this PopupControl.Popup is resizable.
+
+ true if resizable; otherwise, false.
+
+
+
+ Gets or sets the size that is the lower limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets or sets the size that is the upper limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets parameters of a new window.
+
+ An object of type used when creating a new window.
+
+
+
+ Initializes a new instance of the PopupControl.Popup class.
+
+ The content of the pop-up.
+
+ Pop-up will be disposed immediately after disposion of the content control.
+
+ is null.
+
+
+
+ Processes a dialog box key.
+
+ One of the values that represents the key to process.
+
+ true if the key was processed by the control; otherwise, false.
+
+
+
+
+ Updates the pop-up region.
+
+
+
+
+ Shows pop-up window below the specified control.
+
+ The control below which the pop-up will be shown.
+
+ When there is no space below the specified control, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Shows pop-up window below the specified area of specified control.
+
+ The control used to compute screen location of specified area.
+ The area of control below which the pop-up will be shown.
+
+ When there is no space below specified area, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed.
+
+ true if the owner is currently displayed; otherwise, false.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+ Raises the event.
+
+ A that contains the event data.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+
+ Processes the resizing messages.
+
+ The message.
+ true, if the WndProc method from the base class shouldn't be invoked.
+
+
+
+ Paints the size grip.
+
+ The instance containing the event data.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ Represents a Windows combo box control with a custom popup control attached.
+
+
+
+
+ Initializes a new instance of the PopupControl.PopupComboBox class.
+
+
+
+
+ The pop-up wrapper for the dropDownControl.
+ Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property.
+ Note however the pop-up properties must be set after the dropDownControl is assigned, since this
+ popup wrapper is recreated when the dropDownControl is assigned.
+
+
+
+
+ Gets or sets the drop down control.
+
+ The drop down control.
+
+
+
+ Shows the drop down.
+
+
+
+
+ Hides the drop down.
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ Maintains an additional "Selected" and "Count" value for each item in a List.
+ Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and
+ whether it is selected or not.
+ It also caters for a Count, if needed.
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed. And no Counts will be displayed
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ Is a Count indicator used.
+
+
+
+
+ The original List of values wrapped. A "Selected" and possibly "Count" functionality is added.
+
+
+
+
+ Used to indicate NOT to use ToString(), but read this property instead as a display value.
+
+
+
+
+ When specified, indicates that ToString() should not be performed on the items.
+ This property will be read instead.
+ This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values.
+
+
+
+
+ Builds a concatenation list of selected items in the list.
+
+
+
+
+ Indicates whether the Item display value (Name) should include a count.
+
+
+
+
+ Reset all counts to zero.
+
+
+
+
+ Creates a ObjectSelectionWrapper item.
+ Note that the constructor signature of sub classes classes are important.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Used together with the ListSelectionWrapper in order to wrap data sources for a CheckBoxComboBox.
+ It helps to ensure you don't add an extra "Selected" property to a class that don't really need or want that information.
+
+
+
+
+
+
+
+
+
+
+
+ Used as a count indicator for the item. Not necessarily displayed.
+
+
+
+
+ Is this item selected.
+
+
+
+
+ A reference to the wrapped item.
+
+
+
+
+ The containing list for these selections.
+
+
+
+
+ An indicator of how many items with the specified status is available for the current filter level.
+ Thaught this would make the app a bit more user-friendly and help not to miss items in Statusses
+ that are not often used.
+
+
+
+
+ A reference to the item wrapped.
+
+
+
+
+ The item display value. If ShowCount is true, it displays the "Name [Count]".
+
+
+
+
+ The textbox display value. The names concatenated.
+
+
+
+
+ Indicates whether the item is selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
控件状态
@@ -8757,6 +9581,15 @@
皮肤主题
+
+
+ 设置百分比
+
+
+
+
+
+
引发 ValueChanged 事件
@@ -8870,7 +9703,7 @@
布局比较简单的Object
-
+
@@ -24389,65 +25222,79 @@
- Should this bar be drawn in the system style?
+ 此栏是否应以系统样式绘制?
- How many pixels in from our cell border will this bar be drawn
+ 将从我们的单元格边框开始绘制多少像素的条形图
-
- What color will be used to fill the interior of the control before the
- progress bar is drawn?
-
+
+ 在绘制进度条之前,将使用什么颜色填充控件内部?
+
- What color should the frame of the progress bar be?
+ 进度条边框颜色
- How many pixels wide should the frame of the progress bar be?
+ 进度条的边框像素宽
- What color should the 'filled in' part of the progress bar be?
+ 进度条的“填充”部分应该是什么颜色?
- This is only used if GradientStartColor is Color.Empty
+ 仅当GradientStartColor为Color.Empty时才使用此选项
- Use a gradient to fill the progress bar starting with this color
+ 使用渐变以此颜色开始填充进度条
- Use a gradient to fill the progress bar ending with this color
+ 使用渐变填充以此颜色结尾的进度条
+
+
+
+
+ 使用渐变以此颜色开始填充渐满进度条
+
+
+
+
+ 使用渐变填充以此颜色结尾的渐满进度条
- Regardless of how wide the column become the progress bar will never be wider than this
+ 无论列变得多宽,进度条都不会比这个宽。
- Regardless of how high the cell is the progress bar will never be taller than this
+ 无论单元格有多高,进度条都不会比这个高
- The minimum data value expected. Values less than this will given an empty bar
+ 预期的最小数据值。小于此值的值将显示一个空条。
+
+
+
+
+ 接近满时的值,高于该值时,显示不同颜色,小于等于MinimumValue或大于MaximumValue值,则表示未设置该值
-
- The maximum value for the range. Values greater than this will give a full bar
-
+
+ 范围的最大值。大于此值的值将给出一个完整的条形。
+
@@ -24459,6 +25306,11 @@
The brush that will be used to fill the bar
+
+
+ The brush that will be used to fill the bar
+
+
The brush that will be used to fill the background of the bar
@@ -28225,7 +29077,7 @@
- Initializes a new instance of the class.
+ Initializes a new instance of the PopupControl.ComboBox class.
diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll
index c7b6bb9..0b7669c 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.dll b/Bin/Debug/CommonControls/.NET4/MyDb.dll
index d06683a..ba8dc42 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb.dll and b/Bin/Debug/CommonControls/.NET4/MyDb.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.xml b/Bin/Debug/CommonControls/.NET4/MyDb.xml
index 2ccf8da..531f846 100644
--- a/Bin/Debug/CommonControls/.NET4/MyDb.xml
+++ b/Bin/Debug/CommonControls/.NET4/MyDb.xml
@@ -2101,6 +2101,20 @@
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
获取绝对路径
@@ -8169,6 +8183,17 @@
+
+
+
+
+
+
+
+
+
+ 超时时间
+
以post方式获取网页源码
@@ -8228,6 +8253,11 @@
+
+
+ 代理
+
+
@@ -9292,11 +9322,31 @@
Ctrl键
+
+
+ Alt+Ctrl键
+
+
Shift键
+
+
+ Shift+Alt键
+
+
+
+
+ Shift+Ctrl键
+
+
+
+
+ Alt+Shift+Ctrl键
+
+
Win键
@@ -9328,6 +9378,50 @@
释放热键
+
+
+ 获取热键Tag
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+
+ 判断热键id是否存在
+
+
+
+
+
+
+ 判断热键Tag是否存在
+
+
+
+
+
+
+ 判断热键是否存在
+
+
+
+
+
注册热键
@@ -9346,6 +9440,16 @@
+
+
+ 注册热键
+
+
+
+
+
+
+
获取热键数量
@@ -9396,6 +9500,11 @@
热键id
+
+
+ 热键Tag
+
+
功能键
@@ -9414,6 +9523,20 @@
+
+
+ 热键类型
+
+
+
+
+
+
+
+
+ 热键类型
+
+
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll b/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll
index a1eb368..802a582 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll
index b5e2d2e..6fb79f4 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll
index 624193f..edcbbf8 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/RyPrint.dll b/Bin/Debug/CommonControls/.NET4/RyPrint.dll
index 7e80337..384a82e 100644
Binary files a/Bin/Debug/CommonControls/.NET4/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4/RyPrint.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/ryControls.dll b/Bin/Debug/CommonControls/.NET4/ryControls.dll
index 7c662ef..c21b61e 100644
Binary files a/Bin/Debug/CommonControls/.NET4/ryControls.dll and b/Bin/Debug/CommonControls/.NET4/ryControls.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/ryControls.xml b/Bin/Debug/CommonControls/.NET4/ryControls.xml
index f2c5f2d..f9105cf 100644
--- a/Bin/Debug/CommonControls/.NET4/ryControls.xml
+++ b/Bin/Debug/CommonControls/.NET4/ryControls.xml
@@ -4,6 +4,830 @@
ryControls
+
+
+ Martin Lottering : 2007-10-27
+ --------------------------------
+ This is a usefull control in Filters. Allows you to save space and can replace a Grouped Box of CheckBoxes.
+ Currently used on the TasksFilter for TaskStatusses, which means the user can select which Statusses to include
+ in the "Search".
+ This control does not implement a CheckBoxListBox, instead it adds a wrapper for the normal ComboBox and Items.
+ See the CheckBoxItems property.
+ ----------------
+ ALSO IMPORTANT: In Data Binding when setting the DataSource. The ValueMember must be a bool type property, because it will
+ be binded to the Checked property of the displayed CheckBox. Also see the DisplayMemberSingleItem for more information.
+ ----------------
+ Extends the CodeProject PopupComboBox "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp"
+ by Lukasz Swiatkowski.
+
+
+
+
+
+
+
+
+
+ The checkbox list control. The public CheckBoxItems property provides a direct reference to its Items.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation and its formatting however is controlled
+ by the Binded object, since it owns that property.
+
+
+
+
+ Builds a CSV string of the items selected.
+
+
+
+
+ A direct reference to the Items of CheckBoxComboBoxListControl.
+ You can use it to Get or Set the Checked status of items manually if you want.
+ But do not manipulate the List itself directly, e.g. Adding and Removing,
+ since the list is synchronised when shown with the ComboBox.Items. So for changing
+ the list contents, use Items instead.
+
+
+
+
+ The DataSource of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ The ValueMember of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation however is controlled by the Binded
+ object, since it owns that property.
+
+
+
+
+ Made this property Browsable again, since the Base Popup hides it. This class uses it again.
+ Gets an object representing the collection of the items contained in this
+ System.Windows.Forms.ComboBox.
+
+ A System.Windows.Forms.ComboBox.ObjectCollection representing the items in
+ the System.Windows.Forms.ComboBox.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Will add an invisible item when the style is DropDownList,
+ to help maintain the correct text in main TextBox.
+
+
+
+
+
+
+
+
+
+
+
+ A function to clear/reset the list.
+ (Ubiklou : http://www.codeproject.com/KB/combobox/extending_combobox.aspx?msg=2526813#xx2526813xx)
+
+
+
+
+ Uncheck all items.
+
+
+
+
+ The properties that will be assigned to the checkboxes as default values.
+
+
+
+
+
+
+
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ A container control for the ListControl to ensure the ScrollBar on the ListControl does not
+ Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ not work as I expected.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup class to ensure Resize operations work correctly.
+
+
+
+
+
+ This ListControl that pops up to the User. It contains the CheckBoxComboBoxItems.
+ The items are docked DockStyle.Top in this control.
+
+
+
+
+
+
+
+
+
+
+ Simply a reference to the CheckBoxComboBox.
+
+
+
+
+ A Typed list of ComboBoxCheckBoxItems.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup control to enable Resize operations.
+
+
+
+
+
+
+
+
+
+
+
+ Maintains the controls displayed in the list by keeping them in sync with the actual
+ items in the combobox. (e.g. removing and adding as well as ordering)
+
+
+
+
+ The CheckBox items displayed in the Popup of the ComboBox.
+
+
+
+
+
+
+ A reference to the CheckBoxComboBox.
+ A reference to the item in the ComboBox.Items that this object is extending.
+
+
+
+ A reference to the CheckBoxComboBox.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ When using Data Binding operations via the DataSource property of the ComboBox. This
+ adds the required Bindings for the CheckBoxes.
+
+
+
+
+
+
+
+
+
+
+ Added this handler because the control doesn't seem
+ to initialize correctly until shown for the first
+ time, which also means the summary text value
+ of the combo is out of sync initially.
+
+
+
+
+ A Typed List of the CheckBox items.
+ Simply a wrapper for the CheckBoxComboBox.Items. A list of CheckBoxComboBoxItem objects.
+ This List is automatically synchronised with the Items of the ComboBox and extended to
+ handle the additional boolean value. That said, do not Add or Remove using this List,
+ it will be lost or regenerated from the ComboBox.Items.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the item with the specified displayName or Text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called when any property changes.
+
+
+
+
+
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com Simple pop-up control http://www.codeproject.com/cs/miscctrl/simplepopup.asp.
+ Represents a pop-up window.
+
+
+
+
+ Gets the content of the pop-up.
+
+
+
+
+ Gets a value indicating whether the PopupControl.Popup uses the fade effect.
+
+ true if pop-up uses the fade effect; otherwise, false.
+ To use the fade effect, the FocusOnOpen property also has to be set to true.
+
+
+
+ Gets or sets a value indicating whether to focus the content after the pop-up has been opened.
+
+ true if the content should be focused after the pop-up has been opened; otherwise, false.
+ If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect.
+
+
+
+ Gets or sets a value indicating whether presing the alt key should close the pop-up.
+
+ true if presing the alt key does not close the pop-up; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this PopupControl.Popup is resizable.
+
+ true if resizable; otherwise, false.
+
+
+
+ Gets or sets the size that is the lower limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets or sets the size that is the upper limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets parameters of a new window.
+
+ An object of type used when creating a new window.
+
+
+
+ Initializes a new instance of the PopupControl.Popup class.
+
+ The content of the pop-up.
+
+ Pop-up will be disposed immediately after disposion of the content control.
+
+ is null.
+
+
+
+ Processes a dialog box key.
+
+ One of the values that represents the key to process.
+
+ true if the key was processed by the control; otherwise, false.
+
+
+
+
+ Updates the pop-up region.
+
+
+
+
+ Shows pop-up window below the specified control.
+
+ The control below which the pop-up will be shown.
+
+ When there is no space below the specified control, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Shows pop-up window below the specified area of specified control.
+
+ The control used to compute screen location of specified area.
+ The area of control below which the pop-up will be shown.
+
+ When there is no space below specified area, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed.
+
+ true if the owner is currently displayed; otherwise, false.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+ Raises the event.
+
+ A that contains the event data.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+
+ Processes the resizing messages.
+
+ The message.
+ true, if the WndProc method from the base class shouldn't be invoked.
+
+
+
+ Paints the size grip.
+
+ The instance containing the event data.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ Represents a Windows combo box control with a custom popup control attached.
+
+
+
+
+ Initializes a new instance of the PopupControl.PopupComboBox class.
+
+
+
+
+ The pop-up wrapper for the dropDownControl.
+ Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property.
+ Note however the pop-up properties must be set after the dropDownControl is assigned, since this
+ popup wrapper is recreated when the dropDownControl is assigned.
+
+
+
+
+ Gets or sets the drop down control.
+
+ The drop down control.
+
+
+
+ Shows the drop down.
+
+
+
+
+ Hides the drop down.
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ Maintains an additional "Selected" and "Count" value for each item in a List.
+ Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and
+ whether it is selected or not.
+ It also caters for a Count, if needed.
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed. And no Counts will be displayed
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ Is a Count indicator used.
+
+
+
+
+ The original List of values wrapped. A "Selected" and possibly "Count" functionality is added.
+
+
+
+
+ Used to indicate NOT to use ToString(), but read this property instead as a display value.
+
+
+
+
+ When specified, indicates that ToString() should not be performed on the items.
+ This property will be read instead.
+ This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values.
+
+
+
+
+ Builds a concatenation list of selected items in the list.
+
+
+
+
+ Indicates whether the Item display value (Name) should include a count.
+
+
+
+
+ Reset all counts to zero.
+
+
+
+
+ Creates a ObjectSelectionWrapper item.
+ Note that the constructor signature of sub classes classes are important.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Used together with the ListSelectionWrapper in order to wrap data sources for a CheckBoxComboBox.
+ It helps to ensure you don't add an extra "Selected" property to a class that don't really need or want that information.
+
+
+
+
+
+
+
+
+
+
+
+ Used as a count indicator for the item. Not necessarily displayed.
+
+
+
+
+ Is this item selected.
+
+
+
+
+ A reference to the wrapped item.
+
+
+
+
+ The containing list for these selections.
+
+
+
+
+ An indicator of how many items with the specified status is available for the current filter level.
+ Thaught this would make the app a bit more user-friendly and help not to miss items in Statusses
+ that are not often used.
+
+
+
+
+ A reference to the item wrapped.
+
+
+
+
+ The item display value. If ShowCount is true, it displays the "Name [Count]".
+
+
+
+
+ The textbox display value. The names concatenated.
+
+
+
+
+ Indicates whether the item is selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
控件状态
@@ -8757,6 +9581,15 @@
皮肤主题
+
+
+ 设置百分比
+
+
+
+
+
+
引发 ValueChanged 事件
@@ -8870,7 +9703,7 @@
布局比较简单的Object
-
+
@@ -24389,65 +25222,79 @@
- Should this bar be drawn in the system style?
+ 此栏是否应以系统样式绘制?
- How many pixels in from our cell border will this bar be drawn
+ 将从我们的单元格边框开始绘制多少像素的条形图
-
- What color will be used to fill the interior of the control before the
- progress bar is drawn?
-
+
+ 在绘制进度条之前,将使用什么颜色填充控件内部?
+
- What color should the frame of the progress bar be?
+ 进度条边框颜色
- How many pixels wide should the frame of the progress bar be?
+ 进度条的边框像素宽
- What color should the 'filled in' part of the progress bar be?
+ 进度条的“填充”部分应该是什么颜色?
- This is only used if GradientStartColor is Color.Empty
+ 仅当GradientStartColor为Color.Empty时才使用此选项
- Use a gradient to fill the progress bar starting with this color
+ 使用渐变以此颜色开始填充进度条
- Use a gradient to fill the progress bar ending with this color
+ 使用渐变填充以此颜色结尾的进度条
+
+
+
+
+ 使用渐变以此颜色开始填充渐满进度条
+
+
+
+
+ 使用渐变填充以此颜色结尾的渐满进度条
- Regardless of how wide the column become the progress bar will never be wider than this
+ 无论列变得多宽,进度条都不会比这个宽。
- Regardless of how high the cell is the progress bar will never be taller than this
+ 无论单元格有多高,进度条都不会比这个高
- The minimum data value expected. Values less than this will given an empty bar
+ 预期的最小数据值。小于此值的值将显示一个空条。
+
+
+
+
+ 接近满时的值,高于该值时,显示不同颜色,小于等于MinimumValue或大于MaximumValue值,则表示未设置该值
-
- The maximum value for the range. Values greater than this will give a full bar
-
+
+ 范围的最大值。大于此值的值将给出一个完整的条形。
+
@@ -24459,6 +25306,11 @@
The brush that will be used to fill the bar
+
+
+ The brush that will be used to fill the bar
+
+
The brush that will be used to fill the background of the bar
@@ -28225,7 +29077,7 @@
- Initializes a new instance of the class.
+ Initializes a new instance of the PopupControl.ComboBox class.
diff --git a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll
index c7b6bb9..0b7669c 100644
Binary files a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe
index f10d187..26f0ee3 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll
index 5b27ac2..7b9fa9c 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.xml b/Bin/Release/CommonControls/.NET4 示例/MyDb.xml
index 8a087ea..65b228e 100644
--- a/Bin/Release/CommonControls/.NET4 示例/MyDb.xml
+++ b/Bin/Release/CommonControls/.NET4 示例/MyDb.xml
@@ -2101,6 +2101,20 @@
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
获取绝对路径
@@ -8142,6 +8156,17 @@
+
+
+
+
+
+
+
+
+
+ 超时时间
+
以post方式获取网页源码
@@ -8201,6 +8226,11 @@
+
+
+ 代理
+
+
@@ -9265,11 +9295,31 @@
Ctrl键
+
+
+ Alt+Ctrl键
+
+
Shift键
+
+
+ Shift+Alt键
+
+
+
+
+ Shift+Ctrl键
+
+
+
+
+ Alt+Shift+Ctrl键
+
+
Win键
@@ -9301,6 +9351,50 @@
释放热键
+
+
+ 获取热键Tag
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+
+ 判断热键id是否存在
+
+
+
+
+
+
+ 判断热键Tag是否存在
+
+
+
+
+
+
+ 判断热键是否存在
+
+
+
+
+
注册热键
@@ -9319,6 +9413,16 @@
+
+
+ 注册热键
+
+
+
+
+
+
+
获取热键数量
@@ -9369,6 +9473,11 @@
热键id
+
+
+ 热键Tag
+
+
功能键
@@ -9387,6 +9496,20 @@
+
+
+ 热键类型
+
+
+
+
+
+
+
+
+ 热键类型
+
+
diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll
index 5116059..cbdb59e 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll
index 66e3539..dbfeb90 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll
index 6808653..697a275 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/ryControls.xml b/Bin/Release/CommonControls/.NET4 示例/ryControls.xml
index f2c5f2d..f9105cf 100644
--- a/Bin/Release/CommonControls/.NET4 示例/ryControls.xml
+++ b/Bin/Release/CommonControls/.NET4 示例/ryControls.xml
@@ -4,6 +4,830 @@
ryControls
+
+
+ Martin Lottering : 2007-10-27
+ --------------------------------
+ This is a usefull control in Filters. Allows you to save space and can replace a Grouped Box of CheckBoxes.
+ Currently used on the TasksFilter for TaskStatusses, which means the user can select which Statusses to include
+ in the "Search".
+ This control does not implement a CheckBoxListBox, instead it adds a wrapper for the normal ComboBox and Items.
+ See the CheckBoxItems property.
+ ----------------
+ ALSO IMPORTANT: In Data Binding when setting the DataSource. The ValueMember must be a bool type property, because it will
+ be binded to the Checked property of the displayed CheckBox. Also see the DisplayMemberSingleItem for more information.
+ ----------------
+ Extends the CodeProject PopupComboBox "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp"
+ by Lukasz Swiatkowski.
+
+
+
+
+
+
+
+
+
+ The checkbox list control. The public CheckBoxItems property provides a direct reference to its Items.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation and its formatting however is controlled
+ by the Binded object, since it owns that property.
+
+
+
+
+ Builds a CSV string of the items selected.
+
+
+
+
+ A direct reference to the Items of CheckBoxComboBoxListControl.
+ You can use it to Get or Set the Checked status of items manually if you want.
+ But do not manipulate the List itself directly, e.g. Adding and Removing,
+ since the list is synchronised when shown with the ComboBox.Items. So for changing
+ the list contents, use Items instead.
+
+
+
+
+ The DataSource of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ The ValueMember of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation however is controlled by the Binded
+ object, since it owns that property.
+
+
+
+
+ Made this property Browsable again, since the Base Popup hides it. This class uses it again.
+ Gets an object representing the collection of the items contained in this
+ System.Windows.Forms.ComboBox.
+
+ A System.Windows.Forms.ComboBox.ObjectCollection representing the items in
+ the System.Windows.Forms.ComboBox.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Will add an invisible item when the style is DropDownList,
+ to help maintain the correct text in main TextBox.
+
+
+
+
+
+
+
+
+
+
+
+ A function to clear/reset the list.
+ (Ubiklou : http://www.codeproject.com/KB/combobox/extending_combobox.aspx?msg=2526813#xx2526813xx)
+
+
+
+
+ Uncheck all items.
+
+
+
+
+ The properties that will be assigned to the checkboxes as default values.
+
+
+
+
+
+
+
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ A container control for the ListControl to ensure the ScrollBar on the ListControl does not
+ Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ not work as I expected.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup class to ensure Resize operations work correctly.
+
+
+
+
+
+ This ListControl that pops up to the User. It contains the CheckBoxComboBoxItems.
+ The items are docked DockStyle.Top in this control.
+
+
+
+
+
+
+
+
+
+
+ Simply a reference to the CheckBoxComboBox.
+
+
+
+
+ A Typed list of ComboBoxCheckBoxItems.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup control to enable Resize operations.
+
+
+
+
+
+
+
+
+
+
+
+ Maintains the controls displayed in the list by keeping them in sync with the actual
+ items in the combobox. (e.g. removing and adding as well as ordering)
+
+
+
+
+ The CheckBox items displayed in the Popup of the ComboBox.
+
+
+
+
+
+
+ A reference to the CheckBoxComboBox.
+ A reference to the item in the ComboBox.Items that this object is extending.
+
+
+
+ A reference to the CheckBoxComboBox.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ When using Data Binding operations via the DataSource property of the ComboBox. This
+ adds the required Bindings for the CheckBoxes.
+
+
+
+
+
+
+
+
+
+
+ Added this handler because the control doesn't seem
+ to initialize correctly until shown for the first
+ time, which also means the summary text value
+ of the combo is out of sync initially.
+
+
+
+
+ A Typed List of the CheckBox items.
+ Simply a wrapper for the CheckBoxComboBox.Items. A list of CheckBoxComboBoxItem objects.
+ This List is automatically synchronised with the Items of the ComboBox and extended to
+ handle the additional boolean value. That said, do not Add or Remove using this List,
+ it will be lost or regenerated from the ComboBox.Items.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the item with the specified displayName or Text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called when any property changes.
+
+
+
+
+
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com Simple pop-up control http://www.codeproject.com/cs/miscctrl/simplepopup.asp.
+ Represents a pop-up window.
+
+
+
+
+ Gets the content of the pop-up.
+
+
+
+
+ Gets a value indicating whether the PopupControl.Popup uses the fade effect.
+
+ true if pop-up uses the fade effect; otherwise, false.
+ To use the fade effect, the FocusOnOpen property also has to be set to true.
+
+
+
+ Gets or sets a value indicating whether to focus the content after the pop-up has been opened.
+
+ true if the content should be focused after the pop-up has been opened; otherwise, false.
+ If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect.
+
+
+
+ Gets or sets a value indicating whether presing the alt key should close the pop-up.
+
+ true if presing the alt key does not close the pop-up; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this PopupControl.Popup is resizable.
+
+ true if resizable; otherwise, false.
+
+
+
+ Gets or sets the size that is the lower limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets or sets the size that is the upper limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets parameters of a new window.
+
+ An object of type used when creating a new window.
+
+
+
+ Initializes a new instance of the PopupControl.Popup class.
+
+ The content of the pop-up.
+
+ Pop-up will be disposed immediately after disposion of the content control.
+
+ is null.
+
+
+
+ Processes a dialog box key.
+
+ One of the values that represents the key to process.
+
+ true if the key was processed by the control; otherwise, false.
+
+
+
+
+ Updates the pop-up region.
+
+
+
+
+ Shows pop-up window below the specified control.
+
+ The control below which the pop-up will be shown.
+
+ When there is no space below the specified control, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Shows pop-up window below the specified area of specified control.
+
+ The control used to compute screen location of specified area.
+ The area of control below which the pop-up will be shown.
+
+ When there is no space below specified area, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed.
+
+ true if the owner is currently displayed; otherwise, false.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+ Raises the event.
+
+ A that contains the event data.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+
+ Processes the resizing messages.
+
+ The message.
+ true, if the WndProc method from the base class shouldn't be invoked.
+
+
+
+ Paints the size grip.
+
+ The instance containing the event data.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ Represents a Windows combo box control with a custom popup control attached.
+
+
+
+
+ Initializes a new instance of the PopupControl.PopupComboBox class.
+
+
+
+
+ The pop-up wrapper for the dropDownControl.
+ Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property.
+ Note however the pop-up properties must be set after the dropDownControl is assigned, since this
+ popup wrapper is recreated when the dropDownControl is assigned.
+
+
+
+
+ Gets or sets the drop down control.
+
+ The drop down control.
+
+
+
+ Shows the drop down.
+
+
+
+
+ Hides the drop down.
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ Maintains an additional "Selected" and "Count" value for each item in a List.
+ Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and
+ whether it is selected or not.
+ It also caters for a Count, if needed.
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed. And no Counts will be displayed
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ Is a Count indicator used.
+
+
+
+
+ The original List of values wrapped. A "Selected" and possibly "Count" functionality is added.
+
+
+
+
+ Used to indicate NOT to use ToString(), but read this property instead as a display value.
+
+
+
+
+ When specified, indicates that ToString() should not be performed on the items.
+ This property will be read instead.
+ This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values.
+
+
+
+
+ Builds a concatenation list of selected items in the list.
+
+
+
+
+ Indicates whether the Item display value (Name) should include a count.
+
+
+
+
+ Reset all counts to zero.
+
+
+
+
+ Creates a ObjectSelectionWrapper item.
+ Note that the constructor signature of sub classes classes are important.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Used together with the ListSelectionWrapper in order to wrap data sources for a CheckBoxComboBox.
+ It helps to ensure you don't add an extra "Selected" property to a class that don't really need or want that information.
+
+
+
+
+
+
+
+
+
+
+
+ Used as a count indicator for the item. Not necessarily displayed.
+
+
+
+
+ Is this item selected.
+
+
+
+
+ A reference to the wrapped item.
+
+
+
+
+ The containing list for these selections.
+
+
+
+
+ An indicator of how many items with the specified status is available for the current filter level.
+ Thaught this would make the app a bit more user-friendly and help not to miss items in Statusses
+ that are not often used.
+
+
+
+
+ A reference to the item wrapped.
+
+
+
+
+ The item display value. If ShowCount is true, it displays the "Name [Count]".
+
+
+
+
+ The textbox display value. The names concatenated.
+
+
+
+
+ Indicates whether the item is selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
控件状态
@@ -8757,6 +9581,15 @@
皮肤主题
+
+
+ 设置百分比
+
+
+
+
+
+
引发 ValueChanged 事件
@@ -8870,7 +9703,7 @@
布局比较简单的Object
-
+
@@ -24389,65 +25222,79 @@
- Should this bar be drawn in the system style?
+ 此栏是否应以系统样式绘制?
- How many pixels in from our cell border will this bar be drawn
+ 将从我们的单元格边框开始绘制多少像素的条形图
-
- What color will be used to fill the interior of the control before the
- progress bar is drawn?
-
+
+ 在绘制进度条之前,将使用什么颜色填充控件内部?
+
- What color should the frame of the progress bar be?
+ 进度条边框颜色
- How many pixels wide should the frame of the progress bar be?
+ 进度条的边框像素宽
- What color should the 'filled in' part of the progress bar be?
+ 进度条的“填充”部分应该是什么颜色?
- This is only used if GradientStartColor is Color.Empty
+ 仅当GradientStartColor为Color.Empty时才使用此选项
- Use a gradient to fill the progress bar starting with this color
+ 使用渐变以此颜色开始填充进度条
- Use a gradient to fill the progress bar ending with this color
+ 使用渐变填充以此颜色结尾的进度条
+
+
+
+
+ 使用渐变以此颜色开始填充渐满进度条
+
+
+
+
+ 使用渐变填充以此颜色结尾的渐满进度条
- Regardless of how wide the column become the progress bar will never be wider than this
+ 无论列变得多宽,进度条都不会比这个宽。
- Regardless of how high the cell is the progress bar will never be taller than this
+ 无论单元格有多高,进度条都不会比这个高
- The minimum data value expected. Values less than this will given an empty bar
+ 预期的最小数据值。小于此值的值将显示一个空条。
+
+
+
+
+ 接近满时的值,高于该值时,显示不同颜色,小于等于MinimumValue或大于MaximumValue值,则表示未设置该值
-
- The maximum value for the range. Values greater than this will give a full bar
-
+
+ 范围的最大值。大于此值的值将给出一个完整的条形。
+
@@ -24459,6 +25306,11 @@
The brush that will be used to fill the bar
+
+
+ The brush that will be used to fill the bar
+
+
The brush that will be used to fill the background of the bar
@@ -28225,7 +29077,7 @@
- Initializes a new instance of the class.
+ Initializes a new instance of the PopupControl.ComboBox class.
diff --git a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll
index bfed3b9..2dfc624 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/MyDb.dll b/Bin/Release/CommonControls/.NET4/MyDb.dll
index 5b27ac2..7b9fa9c 100644
Binary files a/Bin/Release/CommonControls/.NET4/MyDb.dll and b/Bin/Release/CommonControls/.NET4/MyDb.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/MyDb.xml b/Bin/Release/CommonControls/.NET4/MyDb.xml
index 8a087ea..65b228e 100644
--- a/Bin/Release/CommonControls/.NET4/MyDb.xml
+++ b/Bin/Release/CommonControls/.NET4/MyDb.xml
@@ -2101,6 +2101,20 @@
+
+
+ 保存高质量不失真照片
+
+
+
+
+
+
+ 保存高质量不失真照片
+
+
+
+
获取绝对路径
@@ -8142,6 +8156,17 @@
+
+
+
+
+
+
+
+
+
+ 超时时间
+
以post方式获取网页源码
@@ -8201,6 +8226,11 @@
+
+
+ 代理
+
+
@@ -9265,11 +9295,31 @@
Ctrl键
+
+
+ Alt+Ctrl键
+
+
Shift键
+
+
+ Shift+Alt键
+
+
+
+
+ Shift+Ctrl键
+
+
+
+
+ Alt+Shift+Ctrl键
+
+
Win键
@@ -9301,6 +9351,50 @@
释放热键
+
+
+ 获取热键Tag
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+ 获取热键id
+
+
+
+
+
+
+
+ 判断热键id是否存在
+
+
+
+
+
+
+ 判断热键Tag是否存在
+
+
+
+
+
+
+ 判断热键是否存在
+
+
+
+
+
注册热键
@@ -9319,6 +9413,16 @@
+
+
+ 注册热键
+
+
+
+
+
+
+
获取热键数量
@@ -9369,6 +9473,11 @@
热键id
+
+
+ 热键Tag
+
+
功能键
@@ -9387,6 +9496,20 @@
+
+
+ 热键类型
+
+
+
+
+
+
+
+
+ 热键类型
+
+
diff --git a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll
index 4cc08ff..9732d41 100644
Binary files a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll
index 5116059..cbdb59e 100644
Binary files a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/RyPrint.dll b/Bin/Release/CommonControls/.NET4/RyPrint.dll
index 66e3539..dbfeb90 100644
Binary files a/Bin/Release/CommonControls/.NET4/RyPrint.dll and b/Bin/Release/CommonControls/.NET4/RyPrint.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/RyWeb.dll b/Bin/Release/CommonControls/.NET4/RyWeb.dll
deleted file mode 100644
index 44dd329..0000000
Binary files a/Bin/Release/CommonControls/.NET4/RyWeb.dll and /dev/null differ
diff --git a/Bin/Release/CommonControls/.NET4/ryControls.dll b/Bin/Release/CommonControls/.NET4/ryControls.dll
index 6808653..697a275 100644
Binary files a/Bin/Release/CommonControls/.NET4/ryControls.dll and b/Bin/Release/CommonControls/.NET4/ryControls.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/ryControls.xml b/Bin/Release/CommonControls/.NET4/ryControls.xml
index f2c5f2d..f9105cf 100644
--- a/Bin/Release/CommonControls/.NET4/ryControls.xml
+++ b/Bin/Release/CommonControls/.NET4/ryControls.xml
@@ -4,6 +4,830 @@
ryControls
+
+
+ Martin Lottering : 2007-10-27
+ --------------------------------
+ This is a usefull control in Filters. Allows you to save space and can replace a Grouped Box of CheckBoxes.
+ Currently used on the TasksFilter for TaskStatusses, which means the user can select which Statusses to include
+ in the "Search".
+ This control does not implement a CheckBoxListBox, instead it adds a wrapper for the normal ComboBox and Items.
+ See the CheckBoxItems property.
+ ----------------
+ ALSO IMPORTANT: In Data Binding when setting the DataSource. The ValueMember must be a bool type property, because it will
+ be binded to the Checked property of the displayed CheckBox. Also see the DisplayMemberSingleItem for more information.
+ ----------------
+ Extends the CodeProject PopupComboBox "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp"
+ by Lukasz Swiatkowski.
+
+
+
+
+
+
+
+
+
+ The checkbox list control. The public CheckBoxItems property provides a direct reference to its Items.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation and its formatting however is controlled
+ by the Binded object, since it owns that property.
+
+
+
+
+ Builds a CSV string of the items selected.
+
+
+
+
+ A direct reference to the Items of CheckBoxComboBoxListControl.
+ You can use it to Get or Set the Checked status of items manually if you want.
+ But do not manipulate the List itself directly, e.g. Adding and Removing,
+ since the list is synchronised when shown with the ComboBox.Items. So for changing
+ the list contents, use Items instead.
+
+
+
+
+ The DataSource of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ The ValueMember of the combobox. Refreshes the CheckBox wrappers when this is set.
+
+
+
+
+ In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ a concatenated Text of the items selected. This concatenation however is controlled by the Binded
+ object, since it owns that property.
+
+
+
+
+ Made this property Browsable again, since the Base Popup hides it. This class uses it again.
+ Gets an object representing the collection of the items contained in this
+ System.Windows.Forms.ComboBox.
+
+ A System.Windows.Forms.ComboBox.ObjectCollection representing the items in
+ the System.Windows.Forms.ComboBox.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Will add an invisible item when the style is DropDownList,
+ to help maintain the correct text in main TextBox.
+
+
+
+
+
+
+
+
+
+
+
+ A function to clear/reset the list.
+ (Ubiklou : http://www.codeproject.com/KB/combobox/extending_combobox.aspx?msg=2526813#xx2526813xx)
+
+
+
+
+ Uncheck all items.
+
+
+
+
+ The properties that will be assigned to the checkboxes as default values.
+
+
+
+
+
+
+
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ A container control for the ListControl to ensure the ScrollBar on the ListControl does not
+ Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ not work as I expected.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup class to ensure Resize operations work correctly.
+
+
+
+
+
+ This ListControl that pops up to the User. It contains the CheckBoxComboBoxItems.
+ The items are docked DockStyle.Top in this control.
+
+
+
+
+
+
+
+
+
+
+ Simply a reference to the CheckBoxComboBox.
+
+
+
+
+ A Typed list of ComboBoxCheckBoxItems.
+
+
+
+
+
+
+
+
+
+ Prescribed by the Popup control to enable Resize operations.
+
+
+
+
+
+
+
+
+
+
+
+ Maintains the controls displayed in the list by keeping them in sync with the actual
+ items in the combobox. (e.g. removing and adding as well as ordering)
+
+
+
+
+ The CheckBox items displayed in the Popup of the ComboBox.
+
+
+
+
+
+
+ A reference to the CheckBoxComboBox.
+ A reference to the item in the ComboBox.Items that this object is extending.
+
+
+
+ A reference to the CheckBoxComboBox.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ A reference to the Item in ComboBox.Items that this object is extending.
+
+
+
+
+ When using Data Binding operations via the DataSource property of the ComboBox. This
+ adds the required Bindings for the CheckBoxes.
+
+
+
+
+
+
+
+
+
+
+ Added this handler because the control doesn't seem
+ to initialize correctly until shown for the first
+ time, which also means the summary text value
+ of the combo is out of sync initially.
+
+
+
+
+ A Typed List of the CheckBox items.
+ Simply a wrapper for the CheckBoxComboBox.Items. A list of CheckBoxComboBoxItem objects.
+ This List is automatically synchronised with the Items of the ComboBox and extended to
+ handle the additional boolean value. That said, do not Add or Remove using this List,
+ it will be lost or regenerated from the ComboBox.Items.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the item with the specified displayName or Text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called when any property changes.
+
+
+
+
+
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+
+
+
+
+ CodeProject.com Simple pop-up control http://www.codeproject.com/cs/miscctrl/simplepopup.asp.
+ Represents a pop-up window.
+
+
+
+
+ Gets the content of the pop-up.
+
+
+
+
+ Gets a value indicating whether the PopupControl.Popup uses the fade effect.
+
+ true if pop-up uses the fade effect; otherwise, false.
+ To use the fade effect, the FocusOnOpen property also has to be set to true.
+
+
+
+ Gets or sets a value indicating whether to focus the content after the pop-up has been opened.
+
+ true if the content should be focused after the pop-up has been opened; otherwise, false.
+ If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect.
+
+
+
+ Gets or sets a value indicating whether presing the alt key should close the pop-up.
+
+ true if presing the alt key does not close the pop-up; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this PopupControl.Popup is resizable.
+
+ true if resizable; otherwise, false.
+
+
+
+ Gets or sets the size that is the lower limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets or sets the size that is the upper limit that can specify.
+
+ An ordered pair of type representing the width and height of a rectangle.
+
+
+
+ Gets parameters of a new window.
+
+ An object of type used when creating a new window.
+
+
+
+ Initializes a new instance of the PopupControl.Popup class.
+
+ The content of the pop-up.
+
+ Pop-up will be disposed immediately after disposion of the content control.
+
+ is null.
+
+
+
+ Processes a dialog box key.
+
+ One of the values that represents the key to process.
+
+ true if the key was processed by the control; otherwise, false.
+
+
+
+
+ Updates the pop-up region.
+
+
+
+
+ Shows pop-up window below the specified control.
+
+ The control below which the pop-up will be shown.
+
+ When there is no space below the specified control, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Shows pop-up window below the specified area of specified control.
+
+ The control used to compute screen location of specified area.
+ The area of control below which the pop-up will be shown.
+
+ When there is no space below specified area, the pop-up control is shown above it.
+
+ is null.
+
+
+
+ Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed.
+
+ true if the owner is currently displayed; otherwise, false.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+ Raises the event.
+
+ A that contains the event data.
+
+
+
+ Raises the event.
+
+ An that contains the event data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+
+ Processes the resizing messages.
+
+ The message.
+ true, if the WndProc method from the base class shouldn't be invoked.
+
+
+
+ Paints the size grip.
+
+ The instance containing the event data.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ Represents a Windows combo box control with a custom popup control attached.
+
+
+
+
+ Initializes a new instance of the PopupControl.PopupComboBox class.
+
+
+
+
+ The pop-up wrapper for the dropDownControl.
+ Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property.
+ Note however the pop-up properties must be set after the dropDownControl is assigned, since this
+ popup wrapper is recreated when the dropDownControl is assigned.
+
+
+
+
+ Gets or sets the drop down control.
+
+ The drop down control.
+
+
+
+ Shows the drop down.
+
+
+
+
+ Hides the drop down.
+
+
+
+
+ Processes Windows messages.
+
+ The Windows to process.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+ This property is not relevant for this class.
+ This property is not relevant for this class.
+
+
+
+ Required designer variable.
+
+
+
+
+ Clean up any resources being used.
+
+ true if managed resources should be disposed; otherwise, false.
+
+
+
+ Required method for Designer support - do not modify
+ the contents of this method with the code editor.
+
+
+
+
+ Maintains an additional "Selected" and "Count" value for each item in a List.
+ Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and
+ whether it is selected or not.
+ It also caters for a Count, if needed.
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed. And no Counts will be displayed
+
+
+
+
+ No property on the object is specified for display purposes, so simple ToString() operation
+ will be performed.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ A Display "Name" property is specified. ToString() will not be performed on items.
+ This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ If a PropertyDescriptor is not found, a Property will be used.
+
+
+
+
+ Is a Count indicator used.
+
+
+
+
+ The original List of values wrapped. A "Selected" and possibly "Count" functionality is added.
+
+
+
+
+ Used to indicate NOT to use ToString(), but read this property instead as a display value.
+
+
+
+
+ When specified, indicates that ToString() should not be performed on the items.
+ This property will be read instead.
+ This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values.
+
+
+
+
+ Builds a concatenation list of selected items in the list.
+
+
+
+
+ Indicates whether the Item display value (Name) should include a count.
+
+
+
+
+ Reset all counts to zero.
+
+
+
+
+ Creates a ObjectSelectionWrapper item.
+ Note that the constructor signature of sub classes classes are important.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Used together with the ListSelectionWrapper in order to wrap data sources for a CheckBoxComboBox.
+ It helps to ensure you don't add an extra "Selected" property to a class that don't really need or want that information.
+
+
+
+
+
+
+
+
+
+
+
+ Used as a count indicator for the item. Not necessarily displayed.
+
+
+
+
+ Is this item selected.
+
+
+
+
+ A reference to the wrapped item.
+
+
+
+
+ The containing list for these selections.
+
+
+
+
+ An indicator of how many items with the specified status is available for the current filter level.
+ Thaught this would make the app a bit more user-friendly and help not to miss items in Statusses
+ that are not often used.
+
+
+
+
+ A reference to the item wrapped.
+
+
+
+
+ The item display value. If ShowCount is true, it displays the "Name [Count]".
+
+
+
+
+ The textbox display value. The names concatenated.
+
+
+
+
+ Indicates whether the item is selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
控件状态
@@ -8757,6 +9581,15 @@
皮肤主题
+
+
+ 设置百分比
+
+
+
+
+
+
引发 ValueChanged 事件
@@ -8870,7 +9703,7 @@
布局比较简单的Object
-
+
@@ -24389,65 +25222,79 @@
- Should this bar be drawn in the system style?
+ 此栏是否应以系统样式绘制?
- How many pixels in from our cell border will this bar be drawn
+ 将从我们的单元格边框开始绘制多少像素的条形图
-
- What color will be used to fill the interior of the control before the
- progress bar is drawn?
-
+
+ 在绘制进度条之前,将使用什么颜色填充控件内部?
+
- What color should the frame of the progress bar be?
+ 进度条边框颜色
- How many pixels wide should the frame of the progress bar be?
+ 进度条的边框像素宽
- What color should the 'filled in' part of the progress bar be?
+ 进度条的“填充”部分应该是什么颜色?
- This is only used if GradientStartColor is Color.Empty
+ 仅当GradientStartColor为Color.Empty时才使用此选项
- Use a gradient to fill the progress bar starting with this color
+ 使用渐变以此颜色开始填充进度条
- Use a gradient to fill the progress bar ending with this color
+ 使用渐变填充以此颜色结尾的进度条
+
+
+
+
+ 使用渐变以此颜色开始填充渐满进度条
+
+
+
+
+ 使用渐变填充以此颜色结尾的渐满进度条
- Regardless of how wide the column become the progress bar will never be wider than this
+ 无论列变得多宽,进度条都不会比这个宽。
- Regardless of how high the cell is the progress bar will never be taller than this
+ 无论单元格有多高,进度条都不会比这个高
- The minimum data value expected. Values less than this will given an empty bar
+ 预期的最小数据值。小于此值的值将显示一个空条。
+
+
+
+
+ 接近满时的值,高于该值时,显示不同颜色,小于等于MinimumValue或大于MaximumValue值,则表示未设置该值
-
- The maximum value for the range. Values greater than this will give a full bar
-
+
+ 范围的最大值。大于此值的值将给出一个完整的条形。
+
@@ -24459,6 +25306,11 @@
The brush that will be used to fill the bar
+
+
+ The brush that will be used to fill the bar
+
+
The brush that will be used to fill the background of the bar
@@ -28225,7 +29077,7 @@
- Initializes a new instance of the class.
+ Initializes a new instance of the PopupControl.ComboBox class.
diff --git a/Bin/Release/CommonControls/.NET4/ryUpdate.dll b/Bin/Release/CommonControls/.NET4/ryUpdate.dll
index bfed3b9..2dfc624 100644
Binary files a/Bin/Release/CommonControls/.NET4/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4/ryUpdate.dll differ
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6202cae..266020f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,14 @@
-### 2021-10-01更新
+### 2021-12-14更新
+------
+#### MyDbV4 V3.0.2112.1401
+- *.[修复]修复MSSQL的ExecuteNonQuery函数可能因为报错导致软件崩溃的BUG。
+
+### 2021-10-26更新
+------
+#### MyDbV4 V3.0.2110.2601
+- *.[修复]修复Replace忽略大小替换函数只会替换成空字符串的BUG。
+
+### 2021-10-01更新
------
#### ryControls V3.0.2110.0101
- *.[改进]ObjectListView的FindMatchInRange方法改为包含关系而不是开头匹配。
diff --git a/Source/.vs/公用控件组V4/project-colors.json b/Source/.vs/公用控件组V4/project-colors.json
new file mode 100644
index 0000000..ed7fe7d
--- /dev/null
+++ b/Source/.vs/公用控件组V4/project-colors.json
@@ -0,0 +1,51 @@
+{
+ "Version": 1,
+ "ProjectMap": {
+ "9df20d86-a56e-4cf6-a3d8-f30421297b1b": {
+ "ProjectGuid": "9df20d86-a56e-4cf6-a3d8-f30421297b1b",
+ "DisplayName": "MyDbV4",
+ "ColorIndex": 0
+ },
+ "11a63e24-0257-4c54-a109-f1a609a52a62": {
+ "ProjectGuid": "11a63e24-0257-4c54-a109-f1a609a52a62",
+ "DisplayName": "ryUpdateV4",
+ "ColorIndex": 1
+ },
+ "9eca3a84-8545-4c4d-84d6-d23e3bdf2d90": {
+ "ProjectGuid": "9eca3a84-8545-4c4d-84d6-d23e3bdf2d90",
+ "DisplayName": "ryControlsV4",
+ "ColorIndex": 2
+ },
+ "dc9fdb61-fedd-4795-afdc-8376ab781c56": {
+ "ProjectGuid": "dc9fdb61-fedd-4795-afdc-8376ab781c56",
+ "DisplayName": "Itrycn_Project2",
+ "ColorIndex": 3
+ },
+ "6b969ce8-d723-4b2c-a8fd-fad2fb28ff01": {
+ "ProjectGuid": "6b969ce8-d723-4b2c-a8fd-fad2fb28ff01",
+ "DisplayName": "MyDb_SQLiteV4",
+ "ColorIndex": 4
+ },
+ "de092c43-1ab5-4229-8ec8-35c9936c4331": {
+ "ProjectGuid": "de092c43-1ab5-4229-8ec8-35c9936c4331",
+ "DisplayName": "MyDb_MySQLV4",
+ "ColorIndex": 5
+ },
+ "b6784652-825a-482c-8a21-08e2539af2bf": {
+ "ProjectGuid": "b6784652-825a-482c-8a21-08e2539af2bf",
+ "DisplayName": "RyPrint",
+ "ColorIndex": 6
+ },
+ "a2fe74e1-b743-11d0-ae1a-00a0c90fffc3": {
+ "ProjectGuid": "a2fe74e1-b743-11d0-ae1a-00a0c90fffc3",
+ "DisplayName": "杂项文件",
+ "ColorIndex": -1
+ },
+ "62b5c3e8-4af1-4a7f-a40b-a6186f83dbd2": {
+ "ProjectGuid": "62b5c3e8-4af1-4a7f-a40b-a6186f83dbd2",
+ "DisplayName": "Itrycn_Project",
+ "ColorIndex": 7
+ }
+ },
+ "NextColorIndex": 8
+}
\ No newline at end of file
diff --git a/Source/.vs/公用控件组V4/v17/.suo b/Source/.vs/公用控件组V4/v17/.suo
index 4208006..5664427 100644
Binary files a/Source/.vs/公用控件组V4/v17/.suo and b/Source/.vs/公用控件组V4/v17/.suo differ
diff --git a/Source/.vs/公用控件组V4/v17/fileList.bin b/Source/.vs/公用控件组V4/v17/fileList.bin
index 31be839..42f7db5 100644
Binary files a/Source/.vs/公用控件组V4/v17/fileList.bin and b/Source/.vs/公用控件组V4/v17/fileList.bin differ
diff --git a/Source/Itrycn_Project2/Config/Init.cs b/Source/Itrycn_Project2/Config/Init.cs
new file mode 100644
index 0000000..17260fc
--- /dev/null
+++ b/Source/Itrycn_Project2/Config/Init.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Itrycn_Project2.Config
+{
+ class Init
+ {
+ static System.Threading.Mutex run;
+ public static void Show(string[] args)
+ {
+ Soft_ConstInfo.SysDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.SysDataFolder);
+ Soft_ConstInfo.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.UserDataFolder);
+ run = new System.Threading.Mutex(true, Soft_ConstInfo.Soft_Id, out bool runone);
+ if (!runone) //已经运行了
+ {
+ ryCommon.Ini ini = new ryCommon.Ini(Soft_ConstInfo.UserDataFolder + "\\Win.dat");
+ ryControls.Win32.SendMessage((IntPtr)ini.ReadIni(Soft_ConstInfo.Soft_Id, "hwnd", 0), 17189, 100, 100);
+ }
+ else
+ {
+ Application.Run(new FrmStart(args));
+ //Application.Run(new WindowsFormsApp2.Form1());
+ }
+ }
+ }
+}
diff --git a/Source/Itrycn_Project2/FrmStart.Designer.cs b/Source/Itrycn_Project2/FrmStart.Designer.cs
index f5a2e63..9d4ef67 100644
--- a/Source/Itrycn_Project2/FrmStart.Designer.cs
+++ b/Source/Itrycn_Project2/FrmStart.Designer.cs
@@ -43,14 +43,9 @@
this.捐助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
- this.chromeTabControl2 = new ryControls.ChromeTabControl();
- this.tabPage2 = new System.Windows.Forms.TabPage();
- this.tabPage3 = new System.Windows.Forms.TabPage();
this.MenuTray.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.chromeTabControl1.SuspendLayout();
- this.tabPage1.SuspendLayout();
- this.chromeTabControl2.SuspendLayout();
this.SuspendLayout();
//
// notifyIcon1
@@ -153,7 +148,6 @@
//
// tabPage1
//
- this.tabPage1.Controls.Add(this.chromeTabControl2);
this.tabPage1.Location = new System.Drawing.Point(1, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
@@ -162,45 +156,6 @@
this.tabPage1.Text = "首页";
this.tabPage1.UseVisualStyleBackColor = true;
//
- // chromeTabControl2
- //
- this.chromeTabControl2.AllowDragTab = true;
- this.chromeTabControl2.BackTabPageImage = null;
- this.chromeTabControl2.Controls.Add(this.tabPage2);
- this.chromeTabControl2.Controls.Add(this.tabPage3);
- this.chromeTabControl2.Cursor = System.Windows.Forms.Cursors.Default;
- this.chromeTabControl2.ItemSize = new System.Drawing.Size(185, 25);
- this.chromeTabControl2.Location = new System.Drawing.Point(306, 57);
- this.chromeTabControl2.Name = "chromeTabControl2";
- this.chromeTabControl2.SelectedIndex = 0;
- this.chromeTabControl2.ShowAddButton = true;
- this.chromeTabControl2.ShowCloseButton = true;
- this.chromeTabControl2.Size = new System.Drawing.Size(401, 255);
- this.chromeTabControl2.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
- this.chromeTabControl2.TabContextMenuStrip = null;
- this.chromeTabControl2.TabIndex = 0;
- this.chromeTabControl2.TabMaxWidth = 200;
- //
- // tabPage2
- //
- this.tabPage2.Location = new System.Drawing.Point(1, 29);
- this.tabPage2.Name = "tabPage2";
- this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(399, 225);
- this.tabPage2.TabIndex = 0;
- this.tabPage2.Text = "tabPage2";
- this.tabPage2.UseVisualStyleBackColor = true;
- //
- // tabPage3
- //
- this.tabPage3.Location = new System.Drawing.Point(1, 29);
- this.tabPage3.Name = "tabPage3";
- this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage3.Size = new System.Drawing.Size(399, 225);
- this.tabPage3.TabIndex = 1;
- this.tabPage3.Text = "tabPage3";
- this.tabPage3.UseVisualStyleBackColor = true;
- //
// FrmStart
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -219,8 +174,6 @@
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.chromeTabControl1.ResumeLayout(false);
- this.tabPage1.ResumeLayout(false);
- this.chromeTabControl2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -239,8 +192,5 @@
private System.Windows.Forms.ToolStripMenuItem 选项ToolStripMenuItem;
private System.Windows.Forms.TabPage tabPage1;
private ryControls.ChromeTabControl chromeTabControl1;
- private ryControls.ChromeTabControl chromeTabControl2;
- private System.Windows.Forms.TabPage tabPage2;
- private System.Windows.Forms.TabPage tabPage3;
}
}
\ No newline at end of file
diff --git a/Source/Itrycn_Project2/FrmStart.cs b/Source/Itrycn_Project2/FrmStart.cs
index 2576a69..58a3af5 100644
--- a/Source/Itrycn_Project2/FrmStart.cs
+++ b/Source/Itrycn_Project2/FrmStart.cs
@@ -130,8 +130,6 @@ namespace Itrycn_Project2
private void FrmStart_Load(object sender, EventArgs e)
{
Public_Config.LoadSetting();
- RyFiles.AddDropDrag(tabPage1.Handle);
- RySystem.GetOSystemVer();
//Itrycn_Project.Itrycn_Db.CreateTable();
//var dbver = Itrycn_Db.GetDbVer();
//if(dbver==1) //初始版本,并是当前要求的数据库
@@ -151,18 +149,6 @@ namespace Itrycn_Project2
//db.Free();
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_ConstInfo.Update_Url);
update.CheckUpdate();
- var http = new DotNet4.Utilities.HttpHelper();
- var item = new DotNet4.Utilities.HttpItem
- {
- URL = "http://www.huaan.cn/api/applet/qrcode/queryComponent",
- Method = "POST",
- IsToLower = false,
- Postdata = "{\"tempId\":1619,\"excludeVisibility\":4,\"status\":1,\"valueStatus\":1,\"visibleAndEditableUserId\":3}",
- ContentType = "application/json",
- ProtocolVersion = System.Net.HttpVersion.Version11,
- ProxyIp = "192.168.1.12"
- };
- var r= http.GetHtml(item);
}
private void 选项ToolStripMenuItem_Click(object sender, EventArgs e)
diff --git a/Source/Itrycn_Project2/Itrycn_Project2.csproj b/Source/Itrycn_Project2/Itrycn_Project2.csproj
index bf00076..3ead0d2 100644
--- a/Source/Itrycn_Project2/Itrycn_Project2.csproj
+++ b/Source/Itrycn_Project2/Itrycn_Project2.csproj
@@ -64,6 +64,7 @@
+
diff --git a/Source/Itrycn_Project2/Program.cs b/Source/Itrycn_Project2/Program.cs
index 71a30e5..6625403 100644
--- a/Source/Itrycn_Project2/Program.cs
+++ b/Source/Itrycn_Project2/Program.cs
@@ -4,6 +4,7 @@ using ryCommon;
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Windows.Forms;
@@ -11,47 +12,46 @@ namespace Itrycn_Project2
{
static class Program
{
- static System.Threading.Mutex run;
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main(string[] args)
{
+ AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Soft_ConstInfo.SysDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.SysDataFolder);
- Soft_ConstInfo.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.UserDataFolder);
- run = new System.Threading.Mutex(true, Soft_ConstInfo.Soft_Id, out bool runone);
- if (!runone) //已经运行了
- {
- ryCommon.Ini ini = new ryCommon.Ini(Soft_ConstInfo.UserDataFolder + "\\Win.dat");
- ryControls.Win32.SendMessage((IntPtr)ini.ReadIni(Soft_ConstInfo.Soft_Id, "hwnd", 0), 17189, 100, 100);
- }
- else
- {
- //Application.Run(new FrmStart(args));
- Application.Run(new FrmStart(args));
- }
- //FrmLogin frm = new FrmLogin();
- //if (frm.ShowDialog() == DialogResult.OK)
- //{
- // Application.Run(new Frmmain());
- //}
+ Config.Init.Show(args);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception ex = e.ExceptionObject as Exception;
MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息:{1}\r\n异常堆栈:{2}\r\nCLR即将退出:{3}", ex.GetType(), ex.Message, ex.StackTrace, e.IsTerminating));
- RyFiles.WriteAllText(Application.StartupPath + "\\错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈:" + ex.StackTrace + "\r\n\r\n异常方法:" + ex.TargetSite, Encoding.UTF8);
+ System.IO.File.WriteAllText(Application.StartupPath + "\\错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈:" + ex.StackTrace + "\r\n\r\n异常方法:" + ex.TargetSite, Encoding.UTF8);
}
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
Exception ex = e.Exception;
- MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息:{1}\r\n异常堆栈:{2}", ex.GetType(), ex.Message, ex.StackTrace));
- RyFiles.WriteAllText(Application.StartupPath + "\\线程错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈:" + ex.StackTrace + "\r\n\r\n异常方法:" + ex.TargetSite, Encoding.UTF8);
+ MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息:{1}\r\n异常堆栈:{2}", ex.GetType(), ex.Message, ex.StackTrace));
+ System.IO.File.WriteAllText(Application.StartupPath + "\\线程错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈:" + ex.StackTrace + "\r\n\r\n异常方法:" + ex.TargetSite, Encoding.UTF8);
+ }
+ static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
+ {
+ AssemblyName assemblyName = new AssemblyName(args.Name);
+ if (System.IO.File.Exists(Application.StartupPath + @"\" + assemblyName.Name + ".dll"))
+ {
+ return Assembly.LoadFrom(Application.StartupPath + @"\" + assemblyName.Name + ".dll");
+ }
+ else if (System.IO.File.Exists(Application.StartupPath + @"\Bin\dlls\" + assemblyName.Name + ".dll"))
+ {
+ return Assembly.LoadFrom(Application.StartupPath + @"\Bin\dlls\" + assemblyName.Name + ".dll");
+ }
+ else
+ {
+ return args.RequestingAssembly;
+ }
}
}
}
diff --git a/Source/MyDb/DbManage/Strings.cs b/Source/MyDb/DbManage/Strings.cs
index 1700c07..997674b 100644
--- a/Source/MyDb/DbManage/Strings.cs
+++ b/Source/MyDb/DbManage/Strings.cs
@@ -357,7 +357,7 @@ namespace ryCommon
var pos = str_tmp.IndexOfEx(oldValue);
while(pos>=0)
{
- str2 += str_tmp.Substring(0, pos);
+ str2 += str_tmp.Substring(0, pos)+newValue;
str_tmp = str_tmp.Substring(pos + oldValue.Length);
pos = str_tmp.IndexOfEx(oldValue);
}
diff --git a/Source/MyDb/FileFuns/RyFiles.cs b/Source/MyDb/FileFuns/RyFiles.cs
index 2c76178..1e2b757 100644
--- a/Source/MyDb/FileFuns/RyFiles.cs
+++ b/Source/MyDb/FileFuns/RyFiles.cs
@@ -1062,6 +1062,50 @@ namespace ryCommon
m.Save(path, GetEncoderInfo(type), GetEncoderParameters());
}
///
+ /// 保存高质量不失真照片
+ ///
+ ///
+ ///
+ public static bool SaveHighQualityImage(Bitmap m, string path)
+ {
+ return SaveHighQualityImage((Image)m,path);
+ }
+ ///
+ /// 保存高质量不失真照片
+ ///
+ ///
+ ///
+ public static bool SaveHighQualityImage(Image m, string path)
+ {
+ ryCommon.sType.ImageType type = sType.ImageType.Png;
+ var ext = System.IO.Path.GetExtension(path).ToLower();
+ switch (ext)
+ {
+ case ".png":
+ m.Save(path, GetEncoderInfo(type), GetEncoderParameters());
+ break;
+ case ".jpg":
+ type = sType.ImageType.Jpeg;
+ m.Save(path, GetEncoderInfo(type), GetEncoderParameters());
+ break;
+ case ".bmp":
+ type = sType.ImageType.Bmp;
+ m.Save(path, GetEncoderInfo(type), GetEncoderParameters());
+ break;
+ case ".gif":
+ type = sType.ImageType.Gif;
+ m.Save(path, GetEncoderInfo(type), GetEncoderParameters());
+ break;
+ case ".tif":
+ type = sType.ImageType.Tiff;
+ m.Save(path, GetEncoderInfo(type), GetEncoderParameters());
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+ ///
/// 获取绝对路径
///
///
diff --git a/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs b/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs
index 57fecd0..c23bca8 100644
--- a/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs
+++ b/Source/MyDb/MyDb/MSSQL/SqlDataProvider.cs
@@ -247,15 +247,19 @@ namespace ryCommonDb
///
public int ExecuteNonQuery(string sql, object[] Parameter)
{
- DataCommand cmd = myDb.SQL_cn.CreateCommand();
- cmd.Parameters.Clear();
- if(Parameter!=null)
- cmd.Parameters.AddRange(Parameter);
- cmd.CommandText = sql;
- int i= cmd.ExecuteNonQuery();
- cmd.Parameters.Clear();
- cmd.Dispose();
- return i;
+ try
+ {
+ DataCommand cmd = myDb.SQL_cn.CreateCommand();
+ cmd.Parameters.Clear();
+ if (Parameter != null)
+ cmd.Parameters.AddRange(Parameter);
+ cmd.CommandText = sql;
+ int i = cmd.ExecuteNonQuery();
+ cmd.Parameters.Clear();
+ cmd.Dispose();
+ return i;
+ }
+ catch { return -1; }
}
///
/// 执行SQL语句
diff --git a/Source/MyDb/Properties/AssemblyInfo.cs b/Source/MyDb/Properties/AssemblyInfo.cs
index 643b496..468d0f6 100644
--- a/Source/MyDb/Properties/AssemblyInfo.cs
+++ b/Source/MyDb/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.0.2110.0101")]
-[assembly: AssemblyFileVersion("3.0.2110.0101")]
\ No newline at end of file
+[assembly: AssemblyVersion("3.0.2112.1401")]
+[assembly: AssemblyFileVersion("3.0.2112.1401")]
\ No newline at end of file
diff --git a/Source/MyDb/RyWeb/QuickWeb.cs b/Source/MyDb/RyWeb/QuickWeb.cs
index 0dc8d92..f6d541d 100644
--- a/Source/MyDb/RyWeb/QuickWeb.cs
+++ b/Source/MyDb/RyWeb/QuickWeb.cs
@@ -13,6 +13,21 @@ namespace RyWeb
///
public class QuickWeb
{
+ ///
+ ///
+ ///
+ public QuickWeb()
+ {
+
+ }
+ ///
+ ///
+ ///
+ /// 超时时间
+ public QuickWeb(int Timeout)
+ {
+ this.Timeout= Timeout;
+ }
///
/// 以post方式获取网页源码
///
@@ -68,7 +83,8 @@ namespace RyWeb
ReadWriteTimeout = Timeout,
UserAgent = UserAgent,
Referer=Referer,
- KeepAlive = false
+ KeepAlive = false,
+ ProxyIp= ProxyIp
};
if (cookie.Length > 0)
{
@@ -124,7 +140,8 @@ namespace RyWeb
ReadWriteTimeout = Timeout,
UserAgent = UserAgent,
Referer = Referer,
- KeepAlive=false
+ KeepAlive=false,
+ ProxyIp = ProxyIp
};
HttpResult r = t.GetHtml(m);
if (r.StatusCode == System.Net.HttpStatusCode.OK)
@@ -182,6 +199,10 @@ namespace RyWeb
}
}
///
+ /// 代理
+ ///
+ public string ProxyIp { get; set; }
+ ///
///
///
public string UserAgent
@@ -214,6 +235,7 @@ namespace RyWeb
m.Timeout = Timeout;
m.ReadWriteTimeout = Timeout;
m.Referer = Referer;
+ m.ProxyIp = ProxyIp;
HttpResult r = t.GetHtml(m);
return r;
}
@@ -253,6 +275,7 @@ namespace RyWeb
m.Timeout = Timeout;
m.ReadWriteTimeout = Timeout;
m.Referer = Referer;
+ m.ProxyIp = ProxyIp;
HttpResult r = t.GetHtml(m);
return r;
}
diff --git a/Source/MyDb/SysFuns/WinHotReg.cs b/Source/MyDb/SysFuns/WinHotReg.cs
index 74ecc98..f0276a6 100644
--- a/Source/MyDb/SysFuns/WinHotReg.cs
+++ b/Source/MyDb/SysFuns/WinHotReg.cs
@@ -26,9 +26,25 @@ namespace SysFuns
///
Ctrl = 2,
///
+ /// Alt+Ctrl键
+ ///
+ AltAndCtrl = 3,
+ ///
/// Shift键
///
- Shift = 4,
+ Shift = 4,
+ ///
+ /// Shift+Alt键
+ ///
+ AltAndShift = 5,
+ ///
+ /// Shift+Ctrl键
+ ///
+ CtrlAndShift = 6,
+ ///
+ /// Alt+Shift+Ctrl键
+ ///
+ AltAndCtrlAndShift = 7,
///
/// Win键
///
@@ -86,7 +102,69 @@ namespace SysFuns
System.Windows.Forms.Application.RemoveMessageFilter(this);
}
- readonly List list_hotkey = new List();
+ readonly List list_hotkey = new List();
+ ///
+ /// 获取热键Tag
+ ///
+ ///
+ ///
+ public string GetTag(int HotId)
+ {
+ var index = list_hotkey.FindIndex(a => a.id == HotId);
+ return index >= 0 ? list_hotkey[index].Tag : "";
+ }
+ ///
+ /// 获取热键id
+ ///
+ ///
+ ///
+ public int GetHotId(string Tag)
+ {
+ var index= list_hotkey.FindIndex(a => a.Tag == Tag);
+ return index >= 0 ? list_hotkey[index].id : -1;
+ }
+ ///
+ /// 获取热键id
+ ///
+ ///
+ ///
+ ///
+ public int GetHotId(KeyModifiers fsModifiers, Keys vk)
+ {
+ var index = list_hotkey.FindIndex(a => a.fsModifiers == fsModifiers && a.vk == vk);
+ return index >= 0 ? list_hotkey[index].id : -1;
+ }
+ ///
+ /// 判断热键id是否存在
+ ///
+ ///
+ ///
+ public bool IsExist(int hotId)
+ {
+ var index = list_hotkey.FindIndex(a => a.id == hotId);
+ return index >= 0;
+ }
+ ///
+ /// 判断热键Tag是否存在
+ ///
+ ///
+ ///
+ public bool IsExist(string Tag)
+ {
+ var index = list_hotkey.FindIndex(a => a.Tag == Tag);
+ return index >= 0;
+ }
+ ///
+ /// 判断热键是否存在
+ ///
+ ///
+ ///
+ ///
+ public bool IsExist(KeyModifiers fsModifiers, Keys vk)
+ {
+ var index = list_hotkey.FindIndex(a => a.fsModifiers == fsModifiers && a.vk==vk);
+ return index >= 0;
+ }
///
/// 注册热键
///
@@ -102,7 +180,7 @@ namespace SysFuns
list_hotkey.Add(new HotKeyType(id, fsModifiers, vk));
}
return result;
- }
+ }
///
/// 注册热键
///
@@ -110,7 +188,19 @@ namespace SysFuns
///
///
///
- public bool RegHotKey(int id, int fsModifiers, Keys vk)
+ public bool RegHotKey(int id, int fsModifiers, Keys vk)
+ {
+ return RegHotKey(id,"", fsModifiers, vk);
+ }
+ ///
+ /// 注册热键
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool RegHotKey(int id,string Tag, int fsModifiers, Keys vk)
{
if (!Enum.IsDefined(typeof(KeyModifiers), fsModifiers))
{
@@ -119,7 +209,7 @@ namespace SysFuns
bool result = RegisterHotKey(handle, id, (KeyModifiers)fsModifiers, vk);
if (result)
{
- list_hotkey.Add(new HotKeyType(id, (KeyModifiers)fsModifiers, vk));
+ list_hotkey.Add(new HotKeyType(id, Tag, (KeyModifiers)fsModifiers, vk));
}
return result;
}
@@ -209,7 +299,11 @@ namespace SysFuns
///
/// 热键id
///
- public int id;
+ public int id;
+ ///
+ /// 热键Tag
+ ///
+ public string Tag;
///
/// 功能键
///
@@ -229,6 +323,26 @@ namespace SysFuns
this.id = id;
this.fsModifiers = fsModifiers;
this.vk = vk;
+ }
+ ///
+ /// 热键类型
+ ///
+ ///
+ ///
+ ///
+ ///
+ public HotKeyType(int id,string Tag, KeyModifiers fsModifiers, Keys vk)
+ {
+ this.id = id;
+ this.Tag = Tag;
+ this.fsModifiers = fsModifiers;
+ this.vk = vk;
+ }
+ ///
+ /// 热键类型
+ ///
+ public HotKeyType()
+ {
}
}
}
diff --git a/Source/ryControls/CheckBoxComboBox/CheckBoxComboBox.Designer.cs b/Source/ryControls/CheckBoxComboBox/CheckBoxComboBox.Designer.cs
new file mode 100644
index 0000000..0cca272
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/CheckBoxComboBox.Designer.cs
@@ -0,0 +1,36 @@
+namespace PresentationControls
+{
+ partial class CheckBoxComboBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/CheckBoxComboBox.cs b/Source/ryControls/CheckBoxComboBox/CheckBoxComboBox.cs
new file mode 100644
index 0000000..acfaa42
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/CheckBoxComboBox.cs
@@ -0,0 +1,1011 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using System.Reflection;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+
+namespace PresentationControls
+{
+ ///
+ /// Martin Lottering : 2007-10-27
+ /// --------------------------------
+ /// This is a usefull control in Filters. Allows you to save space and can replace a Grouped Box of CheckBoxes.
+ /// Currently used on the TasksFilter for TaskStatusses, which means the user can select which Statusses to include
+ /// in the "Search".
+ /// This control does not implement a CheckBoxListBox, instead it adds a wrapper for the normal ComboBox and Items.
+ /// See the CheckBoxItems property.
+ /// ----------------
+ /// ALSO IMPORTANT: In Data Binding when setting the DataSource. The ValueMember must be a bool type property, because it will
+ /// be binded to the Checked property of the displayed CheckBox. Also see the DisplayMemberSingleItem for more information.
+ /// ----------------
+ /// Extends the CodeProject PopupComboBox "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp"
+ /// by Lukasz Swiatkowski.
+ ///
+ public partial class CheckBoxComboBox : PopupComboBox
+ {
+ #region CONSTRUCTOR
+ ///
+ ///
+ ///
+ public CheckBoxComboBox()
+ : base()
+ {
+ InitializeComponent();
+ _CheckBoxProperties = new CheckBoxProperties();
+ _CheckBoxProperties.PropertyChanged += new EventHandler(_CheckBoxProperties_PropertyChanged);
+ // Dumps the ListControl in a(nother) Container to ensure the ScrollBar on the ListControl does not
+ // Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ // not work as I expected. I don't think it can work that way.
+ CheckBoxComboBoxListControlContainer ContainerControl = new CheckBoxComboBoxListControlContainer();
+ _CheckBoxComboBoxListControl = new CheckBoxComboBoxListControl(this);
+ _CheckBoxComboBoxListControl.Items.CheckBoxCheckedChanged += new EventHandler(Items_CheckBoxCheckedChanged);
+ ContainerControl.Controls.Add(_CheckBoxComboBoxListControl);
+ // This padding spaces neatly on the left-hand side and allows space for the size grip at the bottom.
+ ContainerControl.Padding = new Padding(4, 0, 0, 14);
+ // The ListControl FILLS the ListContainer.
+ _CheckBoxComboBoxListControl.Dock = DockStyle.Fill;
+ // The DropDownControl used by the base class. Will be wrapped in a popup by the base class.
+ DropDownControl = ContainerControl;
+ // Must be set after the DropDownControl is set, since the popup is recreated.
+ // NOTE: I made the dropDown protected so that it can be accessible here. It was private.
+ dropDown.Resizable = true;
+ }
+
+ #endregion
+
+ #region PRIVATE FIELDS
+
+ ///
+ /// The checkbox list control. The public CheckBoxItems property provides a direct reference to its Items.
+ ///
+ internal CheckBoxComboBoxListControl _CheckBoxComboBoxListControl;
+ ///
+ /// In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ /// The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ /// a concatenated Text of the items selected. This concatenation and its formatting however is controlled
+ /// by the Binded object, since it owns that property.
+ ///
+ private string _DisplayMemberSingleItem = null;
+ internal bool _MustAddHiddenItem = false;
+
+ #endregion
+
+ #region PRIVATE OPERATIONS
+
+ ///
+ /// Builds a CSV string of the items selected.
+ ///
+ internal string GetCSVText(bool skipFirstItem)
+ {
+ string ListText = String.Empty;
+ int StartIndex =
+ DropDownStyle == ComboBoxStyle.DropDownList
+ && DataSource == null
+ && skipFirstItem
+ ? 1
+ : 0;
+ for (int Index = StartIndex; Index <= _CheckBoxComboBoxListControl.Items.Count - 1; Index++)
+ {
+ CheckBoxComboBoxItem Item = _CheckBoxComboBoxListControl.Items[Index];
+ if (Item.Checked)
+ ListText += string.IsNullOrEmpty(ListText) ? Item.Text : String.Format(",{0}", Item.Text);
+ }
+ return ListText;
+ }
+
+ #endregion
+
+ #region PUBLIC PROPERTIES
+
+ ///
+ /// A direct reference to the Items of CheckBoxComboBoxListControl.
+ /// You can use it to Get or Set the Checked status of items manually if you want.
+ /// But do not manipulate the List itself directly, e.g. Adding and Removing,
+ /// since the list is synchronised when shown with the ComboBox.Items. So for changing
+ /// the list contents, use Items instead.
+ ///
+ [Browsable(false)]
+ public CheckBoxComboBoxItemList CheckBoxItems
+ {
+ get
+ {
+ // Added to ensure the CheckBoxItems are ALWAYS
+ // available for modification via code.
+ if (_CheckBoxComboBoxListControl.Items.Count != Items.Count)
+ _CheckBoxComboBoxListControl.SynchroniseControlsWithComboBoxItems();
+ return _CheckBoxComboBoxListControl.Items;
+ }
+ }
+ ///
+ /// The DataSource of the combobox. Refreshes the CheckBox wrappers when this is set.
+ ///
+ public new object DataSource
+ {
+ get { return base.DataSource; }
+ set
+ {
+ base.DataSource = value;
+ if (!string.IsNullOrEmpty(ValueMember))
+ // This ensures that at least the checkboxitems are available to be initialised.
+ _CheckBoxComboBoxListControl.SynchroniseControlsWithComboBoxItems();
+ }
+ }
+ ///
+ /// The ValueMember of the combobox. Refreshes the CheckBox wrappers when this is set.
+ ///
+ public new string ValueMember
+ {
+ get { return base.ValueMember; }
+ set
+ {
+ base.ValueMember = value;
+ if (!string.IsNullOrEmpty(ValueMember))
+ // This ensures that at least the checkboxitems are available to be initialised.
+ _CheckBoxComboBoxListControl.SynchroniseControlsWithComboBoxItems();
+ }
+ }
+ ///
+ /// In DataBinding operations, this property will be used as the DisplayMember in the CheckBoxComboBoxListBox.
+ /// The normal/existing "DisplayMember" property is used by the TextBox of the ComboBox to display
+ /// a concatenated Text of the items selected. This concatenation however is controlled by the Binded
+ /// object, since it owns that property.
+ ///
+ public string DisplayMemberSingleItem
+ {
+ get { if (string.IsNullOrEmpty(_DisplayMemberSingleItem)) return DisplayMember; else return _DisplayMemberSingleItem; }
+ set { _DisplayMemberSingleItem = value; }
+ }
+ ///
+ /// Made this property Browsable again, since the Base Popup hides it. This class uses it again.
+ /// Gets an object representing the collection of the items contained in this
+ /// System.Windows.Forms.ComboBox.
+ ///
+ /// A System.Windows.Forms.ComboBox.ObjectCollection representing the items in
+ /// the System.Windows.Forms.ComboBox.
+ ///
+ [Browsable(true)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public new ObjectCollection Items
+ {
+ get { return base.Items; }
+ }
+
+ #endregion
+
+ #region EVENTS & EVENT HANDLERS
+ ///
+ ///
+ ///
+ public event EventHandler CheckBoxCheckedChanged;
+
+ private void Items_CheckBoxCheckedChanged(object sender, EventArgs e)
+ {
+ OnCheckBoxCheckedChanged(sender, e);
+ }
+
+ #endregion
+
+ #region EVENT CALLERS and OVERRIDES e.g. OnResize()
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void OnCheckBoxCheckedChanged(object sender, EventArgs e)
+ {
+ string ListText = GetCSVText(true);
+ // The DropDownList style seems to require that the text
+ // part of the "textbox" should match a single item.
+ if (DropDownStyle != ComboBoxStyle.DropDownList)
+ Text = ListText;
+ // This refreshes the Text of the first item (which is not visible)
+ else if (DataSource == null)
+ {
+ Items[0] = ListText;
+ // Keep the hidden item and first checkbox item in
+ // sync in order to ensure the Synchronise process
+ // can match the items.
+ CheckBoxItems[0].ComboBoxItem = ListText;
+ }
+
+ EventHandler handler = CheckBoxCheckedChanged;
+ if (handler != null)
+ handler(sender, e);
+ }
+
+ ///
+ /// Will add an invisible item when the style is DropDownList,
+ /// to help maintain the correct text in main TextBox.
+ ///
+ ///
+ protected override void OnDropDownStyleChanged(EventArgs e)
+ {
+ base.OnDropDownStyleChanged(e);
+
+ if (DropDownStyle == ComboBoxStyle.DropDownList
+ && DataSource == null
+ && !DesignMode)
+ _MustAddHiddenItem = true;
+ }
+ ///
+ ///
+ ///
+ ///
+ protected override void OnResize(EventArgs e)
+ {
+ // When the ComboBox is resized, the width of the dropdown
+ // is also resized to match the width of the ComboBox. I think it looks better.
+ Size Size = new Size(Width, DropDownControl.Height);
+ dropDown.Size = Size;
+ base.OnResize(e);
+ }
+
+ #endregion
+
+ #region PUBLIC OPERATIONS
+
+ ///
+ /// A function to clear/reset the list.
+ /// (Ubiklou : http://www.codeproject.com/KB/combobox/extending_combobox.aspx?msg=2526813#xx2526813xx)
+ ///
+ public void Clear()
+ {
+ this.Items.Clear();
+ if (DropDownStyle == ComboBoxStyle.DropDownList && DataSource == null)
+ _MustAddHiddenItem = true;
+ } ///
+ /// Uncheck all items.
+ ///
+ public void ClearSelection()
+ {
+ foreach (CheckBoxComboBoxItem Item in CheckBoxItems)
+ if (Item.Checked)
+ Item.Checked = false;
+ }
+
+ #endregion
+
+ #region CHECKBOX PROPERTIES (DEFAULTS)
+
+ private CheckBoxProperties _CheckBoxProperties;
+
+ ///
+ /// The properties that will be assigned to the checkboxes as default values.
+ ///
+ [Description("The properties that will be assigned to the checkboxes as default values.")]
+ [Browsable(true)]
+ public CheckBoxProperties CheckBoxProperties
+ {
+ get { return _CheckBoxProperties; }
+ set { _CheckBoxProperties = value; _CheckBoxProperties_PropertyChanged(this, EventArgs.Empty); }
+ }
+
+ private void _CheckBoxProperties_PropertyChanged(object sender, EventArgs e)
+ {
+ foreach (CheckBoxComboBoxItem Item in CheckBoxItems)
+ Item.ApplyProperties(CheckBoxProperties);
+ }
+
+ #endregion
+ ///
+ ///
+ ///
+ ///
+ protected override void WndProc(ref Message m)
+ {
+ // 323 : Item Added
+ // 331 : Clearing
+ if (m.Msg == 331
+ && DropDownStyle == ComboBoxStyle.DropDownList
+ && DataSource == null)
+ {
+ _MustAddHiddenItem = true;
+ }
+
+ base.WndProc(ref m);
+ }
+ }
+
+ ///
+ /// A container control for the ListControl to ensure the ScrollBar on the ListControl does not
+ /// Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
+ /// not work as I expected.
+ ///
+ [ToolboxItem(false)]
+ public class CheckBoxComboBoxListControlContainer : UserControl
+ {
+ #region CONSTRUCTOR
+ ///
+ ///
+ ///
+ public CheckBoxComboBoxListControlContainer()
+ : base()
+ {
+ BackColor = SystemColors.Window;
+ BorderStyle = BorderStyle.FixedSingle;
+ AutoScaleMode = AutoScaleMode.Inherit;
+ ResizeRedraw = true;
+ // If you don't set this, then resize operations cause an error in the base class.
+ MinimumSize = new Size(1, 1);
+ MaximumSize = new Size(500, 500);
+ }
+ #endregion
+
+ #region RESIZE OVERRIDE REQUIRED BY THE POPUP CONTROL
+
+ ///
+ /// Prescribed by the Popup class to ensure Resize operations work correctly.
+ ///
+ ///
+ protected override void WndProc(ref Message m)
+ {
+ if ((Parent as Popup).ProcessResizing(ref m))
+ {
+ return;
+ }
+ base.WndProc(ref m);
+ }
+ #endregion
+ }
+
+ ///
+ /// This ListControl that pops up to the User. It contains the CheckBoxComboBoxItems.
+ /// The items are docked DockStyle.Top in this control.
+ ///
+ [ToolboxItem(false)]
+ public class CheckBoxComboBoxListControl : ScrollableControl
+ {
+ #region CONSTRUCTOR
+ ///
+ ///
+ ///
+ ///
+ public CheckBoxComboBoxListControl(CheckBoxComboBox owner)
+ : base()
+ {
+ DoubleBuffered = true;
+ _CheckBoxComboBox = owner;
+ _Items = new CheckBoxComboBoxItemList(_CheckBoxComboBox);
+ BackColor = SystemColors.Window;
+ // AutoScaleMode = AutoScaleMode.Inherit;
+ AutoScroll = true;
+ ResizeRedraw = true;
+ // if you don't set this, a Resize operation causes an error in the base class.
+ MinimumSize = new Size(1, 1);
+ MaximumSize = new Size(500, 500);
+ }
+
+ #endregion
+
+ #region PRIVATE PROPERTIES
+
+ ///
+ /// Simply a reference to the CheckBoxComboBox.
+ ///
+ private CheckBoxComboBox _CheckBoxComboBox;
+ ///
+ /// A Typed list of ComboBoxCheckBoxItems.
+ ///
+ private CheckBoxComboBoxItemList _Items;
+
+ #endregion
+ ///
+ ///
+ ///
+ public CheckBoxComboBoxItemList Items { get { return _Items; } }
+
+ #region RESIZE OVERRIDE REQUIRED BY THE POPUP CONTROL
+
+ ///
+ /// Prescribed by the Popup control to enable Resize operations.
+ ///
+ ///
+ protected override void WndProc(ref Message m)
+ {
+ if ((Parent.Parent as Popup).ProcessResizing(ref m))
+ {
+ return;
+ }
+ base.WndProc(ref m);
+ }
+
+ #endregion
+
+ #region PROTECTED MEMBERS
+ ///
+ ///
+ ///
+ ///
+ protected override void OnVisibleChanged(EventArgs e)
+ {
+ // Synchronises the CheckBox list with the items in the ComboBox.
+ SynchroniseControlsWithComboBoxItems();
+ base.OnVisibleChanged(e);
+ }
+ ///
+ /// Maintains the controls displayed in the list by keeping them in sync with the actual
+ /// items in the combobox. (e.g. removing and adding as well as ordering)
+ ///
+ public void SynchroniseControlsWithComboBoxItems()
+ {
+ SuspendLayout();
+ if (_CheckBoxComboBox._MustAddHiddenItem)
+ {
+ _CheckBoxComboBox.Items.Insert(
+ 0, _CheckBoxComboBox.GetCSVText(false)); // INVISIBLE ITEM
+ _CheckBoxComboBox.SelectedIndex = 0;
+ _CheckBoxComboBox._MustAddHiddenItem = false;
+ }
+ Controls.Clear();
+ #region Disposes all items that are no longer in the combo box list
+
+ for (int Index = _Items.Count - 1; Index >= 0; Index--)
+ {
+ CheckBoxComboBoxItem Item = _Items[Index];
+ if (!_CheckBoxComboBox.Items.Contains(Item.ComboBoxItem))
+ {
+ _Items.Remove(Item);
+ Item.Dispose();
+ }
+ }
+
+ #endregion
+ #region Recreate the list in the same order of the combo box items
+
+ bool HasHiddenItem =
+ _CheckBoxComboBox.DropDownStyle == ComboBoxStyle.DropDownList
+ && _CheckBoxComboBox.DataSource == null
+ && !DesignMode;
+
+ CheckBoxComboBoxItemList NewList = new CheckBoxComboBoxItemList(_CheckBoxComboBox);
+ for(int Index0 = 0; Index0 <= _CheckBoxComboBox.Items.Count - 1; Index0 ++)
+ {
+ object Object = _CheckBoxComboBox.Items[Index0];
+ CheckBoxComboBoxItem Item = null;
+ // The hidden item could match any other item when only
+ // one other item was selected.
+ if (Index0 == 0 && HasHiddenItem && _Items.Count > 0)
+ Item = _Items[0];
+ else
+ {
+ int StartIndex = HasHiddenItem
+ ? 1 // Skip the hidden item, it could match
+ : 0;
+ for (int Index1 = StartIndex; Index1 <= _Items.Count - 1; Index1++)
+ {
+ if (_Items[Index1].ComboBoxItem == Object)
+ {
+ Item = _Items[Index1];
+ break;
+ }
+ }
+ }
+ if (Item == null)
+ {
+ Item = new CheckBoxComboBoxItem(_CheckBoxComboBox, Object);
+ Item.ApplyProperties(_CheckBoxComboBox.CheckBoxProperties);
+ }
+ NewList.Add(Item);
+ Item.Dock = DockStyle.Top;
+ }
+ _Items.Clear();
+ _Items.AddRange(NewList);
+
+ #endregion
+ #region Add the items to the controls in reversed order to maintain correct docking order
+
+ if (NewList.Count > 0)
+ {
+ // This reverse helps to maintain correct docking order.
+ NewList.Reverse();
+ // If you get an error here that "Cannot convert to the desired
+ // type, it probably means the controls are not binding correctly.
+ // The Checked property is binded to the ValueMember property.
+ // It must be a bool for example.
+ Controls.AddRange(NewList.ToArray());
+ }
+
+ #endregion
+
+ // Keep the first item invisible
+ if (_CheckBoxComboBox.DropDownStyle == ComboBoxStyle.DropDownList
+ && _CheckBoxComboBox.DataSource == null
+ && !DesignMode)
+ _CheckBoxComboBox.CheckBoxItems[0].Visible = false;
+
+ ResumeLayout();
+ }
+
+ #endregion
+ }
+
+ ///
+ /// The CheckBox items displayed in the Popup of the ComboBox.
+ ///
+ [ToolboxItem(false)]
+ public class CheckBoxComboBoxItem : CheckBox
+ {
+ #region CONSTRUCTOR
+
+ ///
+ ///
+ ///
+ /// A reference to the CheckBoxComboBox.
+ /// A reference to the item in the ComboBox.Items that this object is extending.
+ public CheckBoxComboBoxItem(CheckBoxComboBox owner, object comboBoxItem)
+ : base()
+ {
+ DoubleBuffered = true;
+ _CheckBoxComboBox = owner;
+ _ComboBoxItem = comboBoxItem;
+ if (_CheckBoxComboBox.DataSource != null)
+ AddBindings();
+ else
+ Text = comboBoxItem.ToString();
+ }
+ #endregion
+
+ #region PRIVATE PROPERTIES
+
+ ///
+ /// A reference to the CheckBoxComboBox.
+ ///
+ private CheckBoxComboBox _CheckBoxComboBox;
+ ///
+ /// A reference to the Item in ComboBox.Items that this object is extending.
+ ///
+ private object _ComboBoxItem;
+
+ #endregion
+
+ #region PUBLIC PROPERTIES
+
+ ///
+ /// A reference to the Item in ComboBox.Items that this object is extending.
+ ///
+ public object ComboBoxItem
+ {
+ get { return _ComboBoxItem; }
+ internal set { _ComboBoxItem = value; }
+ }
+
+ #endregion
+
+ #region BINDING HELPER
+
+ ///
+ /// When using Data Binding operations via the DataSource property of the ComboBox. This
+ /// adds the required Bindings for the CheckBoxes.
+ ///
+ public void AddBindings()
+ {
+ // Note, the text uses "DisplayMemberSingleItem", not "DisplayMember" (unless its not assigned)
+ DataBindings.Add(
+ "Text",
+ _ComboBoxItem,
+ _CheckBoxComboBox.DisplayMemberSingleItem
+ );
+ // The ValueMember must be a bool type property usable by the CheckBox.Checked.
+ DataBindings.Add(
+ "Checked",
+ _ComboBoxItem,
+ _CheckBoxComboBox.ValueMember,
+ false,
+ // This helps to maintain proper selection state in the Binded object,
+ // even when the controls are added and removed.
+ DataSourceUpdateMode.OnPropertyChanged,
+ false, null, null);
+ // Helps to maintain the Checked status of this
+ // checkbox before the control is visible
+ if (_ComboBoxItem is INotifyPropertyChanged)
+ ((INotifyPropertyChanged)_ComboBoxItem).PropertyChanged +=
+ new PropertyChangedEventHandler(
+ CheckBoxComboBoxItem_PropertyChanged);
+ }
+
+ #endregion
+
+ #region PROTECTED MEMBERS
+ ///
+ ///
+ ///
+ ///
+ protected override void OnCheckedChanged(EventArgs e)
+ {
+ // Found that when this event is raised, the bool value of the binded item is not yet updated.
+ if (_CheckBoxComboBox.DataSource != null)
+ {
+ PropertyInfo PI = ComboBoxItem.GetType().GetProperty(_CheckBoxComboBox.ValueMember);
+ PI.SetValue(ComboBoxItem, Checked, null);
+ }
+ base.OnCheckedChanged(e);
+ // Forces a refresh of the Text displayed in the main TextBox of the ComboBox,
+ // since that Text will most probably represent a concatenation of selected values.
+ // Also see DisplayMemberSingleItem on the CheckBoxComboBox for more information.
+ if (_CheckBoxComboBox.DataSource != null)
+ {
+ string OldDisplayMember = _CheckBoxComboBox.DisplayMember;
+ _CheckBoxComboBox.DisplayMember = null;
+ _CheckBoxComboBox.DisplayMember = OldDisplayMember;
+ }
+ }
+
+ #endregion
+
+ #region HELPER MEMBERS
+
+ internal void ApplyProperties(CheckBoxProperties properties)
+ {
+ this.Appearance = properties.Appearance;
+ this.AutoCheck = properties.AutoCheck;
+ this.AutoEllipsis = properties.AutoEllipsis;
+ this.AutoSize = properties.AutoSize;
+ this.CheckAlign = properties.CheckAlign;
+ this.FlatAppearance.BorderColor = properties.FlatAppearanceBorderColor;
+ this.FlatAppearance.BorderSize = properties.FlatAppearanceBorderSize;
+ this.FlatAppearance.CheckedBackColor = properties.FlatAppearanceCheckedBackColor;
+ this.FlatAppearance.MouseDownBackColor = properties.FlatAppearanceMouseDownBackColor;
+ this.FlatAppearance.MouseOverBackColor = properties.FlatAppearanceMouseOverBackColor;
+ this.FlatStyle = properties.FlatStyle;
+ this.ForeColor = properties.ForeColor;
+ this.RightToLeft = properties.RightToLeft;
+ this.TextAlign = properties.TextAlign;
+ this.ThreeState = properties.ThreeState;
+ }
+
+ #endregion
+
+ #region EVENT HANDLERS - ComboBoxItem (DataSource)
+
+ ///
+ /// Added this handler because the control doesn't seem
+ /// to initialize correctly until shown for the first
+ /// time, which also means the summary text value
+ /// of the combo is out of sync initially.
+ ///
+ private void CheckBoxComboBoxItem_PropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == _CheckBoxComboBox.ValueMember)
+ Checked =
+ (bool)_ComboBoxItem
+ .GetType()
+ .GetProperty(_CheckBoxComboBox.ValueMember)
+ .GetValue(_ComboBoxItem, null);
+ }
+
+ #endregion
+ }
+
+ ///
+ /// A Typed List of the CheckBox items.
+ /// Simply a wrapper for the CheckBoxComboBox.Items. A list of CheckBoxComboBoxItem objects.
+ /// This List is automatically synchronised with the Items of the ComboBox and extended to
+ /// handle the additional boolean value. That said, do not Add or Remove using this List,
+ /// it will be lost or regenerated from the ComboBox.Items.
+ ///
+ [ToolboxItem(false)]
+ public class CheckBoxComboBoxItemList : List
+ {
+ #region CONSTRUCTORS
+ ///
+ ///
+ ///
+ ///
+ public CheckBoxComboBoxItemList(CheckBoxComboBox checkBoxComboBox)
+ {
+ _CheckBoxComboBox = checkBoxComboBox;
+ }
+
+ #endregion
+
+ #region PRIVATE FIELDS
+
+ private CheckBoxComboBox _CheckBoxComboBox;
+
+ #endregion
+
+ #region EVENTS, This could be moved to the list control if needed
+ ///
+ ///
+ ///
+ public event EventHandler CheckBoxCheckedChanged;
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void OnCheckBoxCheckedChanged(object sender, EventArgs e)
+ {
+ EventHandler handler = CheckBoxCheckedChanged;
+ if (handler != null)
+ handler(sender, e);
+ }
+ private void item_CheckedChanged(object sender, EventArgs e)
+ {
+ OnCheckBoxCheckedChanged(sender, e);
+ }
+
+ #endregion
+
+ #region LIST MEMBERS & OBSOLETE INDICATORS
+ ///
+ ///
+ ///
+ ///
+ [Obsolete("Do not add items to this list directly. Use the ComboBox items instead.", false)]
+ public new void Add(CheckBoxComboBoxItem item)
+ {
+ item.CheckedChanged += new EventHandler(item_CheckedChanged);
+ base.Add(item);
+ }
+ ///
+ ///
+ ///
+ ///
+ public new void AddRange(IEnumerable collection)
+ {
+ foreach (CheckBoxComboBoxItem Item in collection)
+ Item.CheckedChanged += new EventHandler(item_CheckedChanged);
+ base.AddRange(collection);
+ }
+ ///
+ ///
+ ///
+ public new void Clear()
+ {
+ foreach (CheckBoxComboBoxItem Item in this)
+ Item.CheckedChanged -= item_CheckedChanged;
+ base.Clear();
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ [Obsolete("Do not remove items from this list directly. Use the ComboBox items instead.", false)]
+ public new bool Remove(CheckBoxComboBoxItem item)
+ {
+ item.CheckedChanged -= item_CheckedChanged;
+ return base.Remove(item);
+ }
+
+ #endregion
+
+ #region DEFAULT PROPERTIES
+
+ ///
+ /// Returns the item with the specified displayName or Text.
+ ///
+ public CheckBoxComboBoxItem this[string displayName]
+ {
+ get
+ {
+ int StartIndex =
+ // An invisible item exists in this scenario to help
+ // with the Text displayed in the TextBox of the Combo
+ _CheckBoxComboBox.DropDownStyle == ComboBoxStyle.DropDownList
+ && _CheckBoxComboBox.DataSource == null
+ ? 1 // Ubiklou : 2008-04-28 : Ignore first item. (http://www.codeproject.com/KB/combobox/extending_combobox.aspx?fid=476622&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2526813&fr=1#xx2526813xx)
+ : 0;
+ for(int Index = StartIndex; Index <= Count - 1; Index ++)
+ {
+ CheckBoxComboBoxItem Item = this[Index];
+
+ string Text;
+ // The binding might not be active yet
+ if (string.IsNullOrEmpty(Item.Text)
+ // Ubiklou : 2008-04-28 : No databinding
+ && Item.DataBindings != null
+ && Item.DataBindings["Text"] != null
+ )
+ {
+ PropertyInfo PropertyInfo
+ = Item.ComboBoxItem.GetType().GetProperty(
+ Item.DataBindings["Text"].BindingMemberInfo.BindingMember);
+ Text = (string)PropertyInfo.GetValue(Item.ComboBoxItem, null);
+ }
+ else
+ Text = Item.Text;
+ if (Text.CompareTo(displayName) == 0)
+ return Item;
+ }
+ throw new ArgumentOutOfRangeException(String.Format("\"{0}\" does not exist in this combo box.", displayName));
+ }
+ }
+
+ #endregion
+ }
+ ///
+ ///
+ ///
+ [TypeConverter(typeof(ExpandableObjectConverter))]
+ public class CheckBoxProperties
+ {
+ ///
+ ///
+ ///
+ public CheckBoxProperties() { }
+
+ #region PRIVATE PROPERTIES
+
+ private Appearance _Appearance = Appearance.Normal;
+ private bool _AutoSize = false;
+ private bool _AutoCheck = true;
+ private bool _AutoEllipsis = false;
+ private ContentAlignment _CheckAlign = ContentAlignment.MiddleLeft;
+ private Color _FlatAppearanceBorderColor = Color.Empty;
+ private int _FlatAppearanceBorderSize = 1;
+ private Color _FlatAppearanceCheckedBackColor = Color.Empty;
+ private Color _FlatAppearanceMouseDownBackColor = Color.Empty;
+ private Color _FlatAppearanceMouseOverBackColor = Color.Empty;
+ private FlatStyle _FlatStyle = FlatStyle.Standard;
+ private Color _ForeColor = SystemColors.ControlText;
+ private RightToLeft _RightToLeft = RightToLeft.No;
+ private ContentAlignment _TextAlign = ContentAlignment.MiddleLeft;
+ private bool _ThreeState = false;
+
+ #endregion
+
+ #region PUBLIC PROPERTIES
+ ///
+ ///
+ ///
+ [DefaultValue(Appearance.Normal)]
+ public Appearance Appearance
+ {
+ get { return _Appearance; }
+ set { _Appearance = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(true)]
+ public bool AutoCheck
+ {
+ get { return _AutoCheck; }
+ set { _AutoCheck = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(false)]
+ public bool AutoEllipsis
+ {
+ get { return _AutoEllipsis; }
+ set { _AutoEllipsis = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(false)]
+ public bool AutoSize
+ {
+ get { return _AutoSize; }
+ set { _AutoSize = true; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(ContentAlignment.MiddleLeft)]
+ public ContentAlignment CheckAlign
+ {
+ get { return _CheckAlign; }
+ set { _CheckAlign = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(typeof(Color), "")]
+ public Color FlatAppearanceBorderColor
+ {
+ get { return _FlatAppearanceBorderColor; }
+ set { _FlatAppearanceBorderColor = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(1)]
+ public int FlatAppearanceBorderSize
+ {
+ get { return _FlatAppearanceBorderSize; }
+ set { _FlatAppearanceBorderSize = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(typeof(Color), "")]
+ public Color FlatAppearanceCheckedBackColor
+ {
+ get { return _FlatAppearanceCheckedBackColor; }
+ set { _FlatAppearanceCheckedBackColor = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(typeof(Color), "")]
+ public Color FlatAppearanceMouseDownBackColor
+ {
+ get { return _FlatAppearanceMouseDownBackColor; }
+ set { _FlatAppearanceMouseDownBackColor = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(typeof(Color), "")]
+ public Color FlatAppearanceMouseOverBackColor
+ {
+ get { return _FlatAppearanceMouseOverBackColor; }
+ set { _FlatAppearanceMouseOverBackColor = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(FlatStyle.Standard)]
+ public FlatStyle FlatStyle
+ {
+ get { return _FlatStyle; }
+ set { _FlatStyle = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(typeof(SystemColors), "ControlText")]
+ public Color ForeColor
+ {
+ get { return _ForeColor; }
+ set { _ForeColor = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(RightToLeft.No)]
+ public RightToLeft RightToLeft
+ {
+ get { return _RightToLeft; }
+ set { _RightToLeft = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(ContentAlignment.MiddleLeft)]
+ public ContentAlignment TextAlign
+ {
+ get { return _TextAlign; }
+ set { _TextAlign = value; OnPropertyChanged(); }
+ }
+ ///
+ ///
+ ///
+ [DefaultValue(false)]
+ public bool ThreeState
+ {
+ get { return _ThreeState; }
+ set { _ThreeState = value; OnPropertyChanged(); }
+ }
+
+ #endregion
+
+ #region EVENTS AND EVENT CALLERS
+
+ ///
+ /// Called when any property changes.
+ ///
+ public event EventHandler PropertyChanged;
+ ///
+ ///
+ ///
+ protected void OnPropertyChanged()
+ {
+ EventHandler handler = PropertyChanged;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/GripBounds.cs b/Source/ryControls/CheckBoxComboBox/GripBounds.cs
new file mode 100644
index 0000000..61196e7
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/GripBounds.cs
@@ -0,0 +1,116 @@
+using System;
+using System.Drawing;
+
+namespace PresentationControls
+{
+ ///
+ /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ ///
+ internal struct GripBounds
+ {
+ private const int GripSize = 6;
+ private const int CornerGripSize = GripSize << 1;
+
+ public GripBounds(Rectangle clientRectangle)
+ {
+ this.clientRectangle = clientRectangle;
+ }
+
+ private Rectangle clientRectangle;
+ public Rectangle ClientRectangle
+ {
+ get { return clientRectangle; }
+ //set { clientRectangle = value; }
+ }
+
+ public Rectangle Bottom
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Y = rect.Bottom - GripSize + 1;
+ rect.Height = GripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle BottomRight
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Y = rect.Bottom - CornerGripSize + 1;
+ rect.Height = CornerGripSize;
+ rect.X = rect.Width - CornerGripSize + 1;
+ rect.Width = CornerGripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle Top
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Height = GripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle TopRight
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Height = CornerGripSize;
+ rect.X = rect.Width - CornerGripSize + 1;
+ rect.Width = CornerGripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle Left
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Width = GripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle BottomLeft
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Width = CornerGripSize;
+ rect.Y = rect.Height - CornerGripSize + 1;
+ rect.Height = CornerGripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle Right
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.X = rect.Right - GripSize + 1;
+ rect.Width = GripSize;
+ return rect;
+ }
+ }
+
+ public Rectangle TopLeft
+ {
+ get
+ {
+ Rectangle rect = ClientRectangle;
+ rect.Width = CornerGripSize;
+ rect.Height = CornerGripSize;
+ return rect;
+ }
+ }
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/NativeMethods.cs b/Source/ryControls/CheckBoxComboBox/NativeMethods.cs
new file mode 100644
index 0000000..d146fab
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/NativeMethods.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Drawing;
+using System.Runtime.InteropServices;
+
+namespace PresentationControls
+{
+ ///
+ /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ ///
+ internal static class NativeMethods
+ {
+ internal const int WM_NCHITTEST = 0x0084,
+ WM_NCACTIVATE = 0x0086,
+ WS_EX_NOACTIVATE = 0x08000000,
+ HTTRANSPARENT = -1,
+ HTLEFT = 10,
+ HTRIGHT = 11,
+ HTTOP = 12,
+ HTTOPLEFT = 13,
+ HTTOPRIGHT = 14,
+ HTBOTTOM = 15,
+ HTBOTTOMLEFT = 16,
+ HTBOTTOMRIGHT = 17,
+ WM_USER = 0x0400,
+ WM_REFLECT = WM_USER + 0x1C00,
+ WM_COMMAND = 0x0111,
+ CBN_DROPDOWN = 7,
+ WM_GETMINMAXINFO = 0x0024;
+
+ internal static int HIWORD(int n)
+ {
+ return (n >> 16) & 0xffff;
+ }
+
+ internal static int HIWORD(IntPtr n)
+ {
+ return HIWORD(unchecked((int)(long)n));
+ }
+
+ internal static int LOWORD(int n)
+ {
+ return n & 0xffff;
+ }
+
+ internal static int LOWORD(IntPtr n)
+ {
+ return LOWORD(unchecked((int)(long)n));
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct MINMAXINFO
+ {
+ public Point reserved;
+ public Size maxSize;
+ public Point maxPosition;
+ public Size minTrackSize;
+ public Size maxTrackSize;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/ryControls/CheckBoxComboBox/Popup.Designer.cs b/Source/ryControls/CheckBoxComboBox/Popup.Designer.cs
new file mode 100644
index 0000000..9ad2189
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/Popup.Designer.cs
@@ -0,0 +1,45 @@
+namespace PresentationControls
+{
+ partial class Popup
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ if (content != null)
+ {
+ System.Windows.Forms.Control _content = content;
+ content = null;
+ _content.Dispose();
+ }
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/Popup.cs b/Source/ryControls/CheckBoxComboBox/Popup.cs
new file mode 100644
index 0000000..c5b2329
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/Popup.cs
@@ -0,0 +1,528 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Security.Permissions;
+using System.Runtime.InteropServices;
+using VS = System.Windows.Forms.VisualStyles;
+
+/*
+
Base class for custom tooltips.
+
Office-2007-like tooltip class.
+*/
+namespace PresentationControls
+{
+ ///
+ /// CodeProject.com Simple pop-up control http://www.codeproject.com/cs/miscctrl/simplepopup.asp.
+ /// Represents a pop-up window.
+ ///
+ [ToolboxItem(false)]
+ public partial class Popup : ToolStripDropDown
+ {
+ #region " Fields & Properties "
+
+ private Control content;
+ ///
+ /// Gets the content of the pop-up.
+ ///
+ public Control Content
+ {
+ get { return content; }
+ }
+
+ private bool fade;
+ ///
+ /// Gets a value indicating whether the PopupControl.Popup uses the fade effect.
+ ///
+ /// true if pop-up uses the fade effect; otherwise, false.
+ /// To use the fade effect, the FocusOnOpen property also has to be set to true.
+ public bool UseFadeEffect
+ {
+ get { return fade; }
+ set
+ {
+ if (fade == value) return;
+ fade = value;
+ }
+ }
+
+ private bool focusOnOpen = true;
+ ///
+ /// Gets or sets a value indicating whether to focus the content after the pop-up has been opened.
+ ///
+ /// true if the content should be focused after the pop-up has been opened; otherwise, false.
+ /// If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect.
+ public bool FocusOnOpen
+ {
+ get { return focusOnOpen; }
+ set { focusOnOpen = value; }
+ }
+
+ private bool acceptAlt = true;
+ ///
+ /// Gets or sets a value indicating whether presing the alt key should close the pop-up.
+ ///
+ /// true if presing the alt key does not close the pop-up; otherwise, false.
+ public bool AcceptAlt
+ {
+ get { return acceptAlt; }
+ set { acceptAlt = value; }
+ }
+
+ private Popup ownerPopup;
+ private Popup childPopup;
+
+ private bool _resizable;
+ private bool resizable;
+ ///
+ /// Gets or sets a value indicating whether this PopupControl.Popup is resizable.
+ ///
+ /// true if resizable; otherwise, false.
+ public bool Resizable
+ {
+ get { return resizable && _resizable; }
+ set { resizable = value; }
+ }
+
+ private ToolStripControlHost host;
+
+ private Size minSize;
+ ///
+ /// Gets or sets the size that is the lower limit that can specify.
+ ///
+ /// An ordered pair of type representing the width and height of a rectangle.
+ public new Size MinimumSize
+ {
+ get { return minSize; }
+ set { minSize = value; }
+ }
+
+ private Size maxSize;
+ ///
+ /// Gets or sets the size that is the upper limit that can specify.
+ ///
+ /// An ordered pair of type representing the width and height of a rectangle.
+ public new Size MaximumSize
+ {
+ get { return maxSize; }
+ set { maxSize = value; }
+ }
+
+ ///
+ /// Gets parameters of a new window.
+ ///
+ /// An object of type used when creating a new window.
+ protected override CreateParams CreateParams
+ {
+ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+ get
+ {
+ CreateParams cp = base.CreateParams;
+ cp.ExStyle |= NativeMethods.WS_EX_NOACTIVATE;
+ return cp;
+ }
+ }
+
+ #endregion
+
+ #region " Constructors "
+
+ ///
+ /// Initializes a new instance of the PopupControl.Popup class.
+ ///
+ /// The content of the pop-up.
+ ///
+ /// Pop-up will be disposed immediately after disposion of the content control.
+ ///
+ /// is null.
+ public Popup(Control content)
+ {
+ if (content == null)
+ {
+ throw new ArgumentNullException("content");
+ }
+ this.content = content;
+ this.fade = SystemInformation.IsMenuAnimationEnabled && SystemInformation.IsMenuFadeEnabled;
+ this._resizable = true;
+ InitializeComponent();
+ AutoSize = false;
+ DoubleBuffered = true;
+ ResizeRedraw = true;
+ host = new ToolStripControlHost(content);
+ Padding = Margin = host.Padding = host.Margin = Padding.Empty;
+ MinimumSize = content.MinimumSize;
+ content.MinimumSize = content.Size;
+ MaximumSize = content.MaximumSize;
+ content.MaximumSize = content.Size;
+ Size = content.Size;
+ content.Location = Point.Empty;
+ Items.Add(host);
+ content.Disposed += delegate(object sender, EventArgs e)
+ {
+ content = null;
+ Dispose(true);
+ };
+ content.RegionChanged += delegate(object sender, EventArgs e)
+ {
+ UpdateRegion();
+ };
+ content.Paint += delegate(object sender, PaintEventArgs e)
+ {
+ PaintSizeGrip(e);
+ };
+ UpdateRegion();
+ }
+
+ #endregion
+
+ #region " Methods "
+
+ ///
+ /// Processes a dialog box key.
+ ///
+ /// One of the values that represents the key to process.
+ ///
+ /// true if the key was processed by the control; otherwise, false.
+ ///
+ protected override bool ProcessDialogKey(Keys keyData)
+ {
+ if (acceptAlt && ((keyData & Keys.Alt) == Keys.Alt)) return false;
+ return base.ProcessDialogKey(keyData);
+ }
+
+ ///
+ /// Updates the pop-up region.
+ ///
+ protected void UpdateRegion()
+ {
+ if (this.Region != null)
+ {
+ this.Region.Dispose();
+ this.Region = null;
+ }
+ if (content.Region != null)
+ {
+ this.Region = content.Region.Clone();
+ }
+ }
+
+ ///
+ /// Shows pop-up window below the specified control.
+ ///
+ /// The control below which the pop-up will be shown.
+ ///
+ /// When there is no space below the specified control, the pop-up control is shown above it.
+ ///
+ /// is null.
+ public void Show(Control control)
+ {
+ if (control == null)
+ {
+ throw new ArgumentNullException("control");
+ }
+ SetOwnerItem(control);
+ Show(control, control.ClientRectangle);
+ }
+
+ ///
+ /// Shows pop-up window below the specified area of specified control.
+ ///
+ /// The control used to compute screen location of specified area.
+ /// The area of control below which the pop-up will be shown.
+ ///
+ /// When there is no space below specified area, the pop-up control is shown above it.
+ ///
+ /// is null.
+ public void Show(Control control, Rectangle area)
+ {
+ if (control == null)
+ {
+ throw new ArgumentNullException("control");
+ }
+ SetOwnerItem(control);
+ resizableTop = resizableRight = false;
+ Point location = control.PointToScreen(new Point(area.Left, area.Top + area.Height));
+ Rectangle screen = Screen.FromControl(control).WorkingArea;
+ if (location.X + Size.Width > (screen.Left + screen.Width))
+ {
+ resizableRight = true;
+ location.X = (screen.Left + screen.Width) - Size.Width;
+ }
+ if (location.Y + Size.Height > (screen.Top + screen.Height))
+ {
+ resizableTop = true;
+ location.Y -= Size.Height + area.Height;
+ }
+ location = control.PointToClient(location);
+ Show(control, location, ToolStripDropDownDirection.BelowRight);
+ }
+
+ private const int frames = 1;
+ private const int totalduration = 0; // ML : 2007-11-05 : was 100 but caused a flicker.
+ private const int frameduration = totalduration / frames;
+ ///
+ /// Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed.
+ ///
+ /// true if the owner is currently displayed; otherwise, false.
+ protected override void SetVisibleCore(bool visible)
+ {
+ double opacity = Opacity;
+ if (visible && fade && focusOnOpen) Opacity = 0;
+ base.SetVisibleCore(visible);
+ if (!visible || !fade || !focusOnOpen) return;
+ for (int i = 1; i <= frames; i++)
+ {
+ if (i > 1)
+ {
+ System.Threading.Thread.Sleep(frameduration);
+ }
+ Opacity = opacity * (double)i / (double)frames;
+ }
+ Opacity = opacity;
+ }
+
+ private bool resizableTop;
+ private bool resizableRight;
+
+ private void SetOwnerItem(Control control)
+ {
+ if (control == null)
+ {
+ return;
+ }
+ if (control is Popup)
+ {
+ Popup popupControl = control as Popup;
+ ownerPopup = popupControl;
+ ownerPopup.childPopup = this;
+ OwnerItem = popupControl.Items[0];
+ return;
+ }
+ if (control.Parent != null)
+ {
+ SetOwnerItem(control.Parent);
+ }
+ }
+
+ ///
+ /// Raises the event.
+ ///
+ /// An that contains the event data.
+ protected override void OnSizeChanged(EventArgs e)
+ {
+ content.MinimumSize = Size;
+ content.MaximumSize = Size;
+ content.Size = Size;
+ content.Location = Point.Empty;
+ base.OnSizeChanged(e);
+ }
+
+ ///
+ /// Raises the event.
+ ///
+ /// A that contains the event data.
+ protected override void OnOpening(CancelEventArgs e)
+ {
+ if (content.IsDisposed || content.Disposing)
+ {
+ e.Cancel = true;
+ return;
+ }
+ UpdateRegion();
+ base.OnOpening(e);
+ }
+
+ ///
+ /// Raises the event.
+ ///
+ /// An that contains the event data.
+ protected override void OnOpened(EventArgs e)
+ {
+ if (ownerPopup != null)
+ {
+ ownerPopup._resizable = false;
+ }
+ if (focusOnOpen)
+ {
+ content.Focus();
+ }
+ base.OnOpened(e);
+ }
+ ///
+ ///
+ ///
+ ///
+ protected override void OnClosed(ToolStripDropDownClosedEventArgs e)
+ {
+ if (ownerPopup != null)
+ {
+ ownerPopup._resizable = true;
+ }
+ base.OnClosed(e);
+ }
+ ///
+ ///
+ ///
+ public DateTime LastClosedTimeStamp = DateTime.Now;
+ ///
+ ///
+ ///
+ ///
+ protected override void OnVisibleChanged(EventArgs e)
+ {
+ if (Visible == false)
+ LastClosedTimeStamp = DateTime.Now;
+ base.OnVisibleChanged(e);
+ }
+
+ #endregion
+
+ #region " Resizing Support "
+
+ ///
+ /// Processes Windows messages.
+ ///
+ /// The Windows to process.
+ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+ protected override void WndProc(ref Message m)
+ {
+ if (InternalProcessResizing(ref m, false))
+ {
+ return;
+ }
+ base.WndProc(ref m);
+ }
+
+ ///
+ /// Processes the resizing messages.
+ ///
+ /// The message.
+ /// true, if the WndProc method from the base class shouldn't be invoked.
+ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+ public bool ProcessResizing(ref Message m)
+ {
+ return InternalProcessResizing(ref m, true);
+ }
+
+ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+ private bool InternalProcessResizing(ref Message m, bool contentControl)
+ {
+ if (m.Msg == NativeMethods.WM_NCACTIVATE && m.WParam != IntPtr.Zero && childPopup != null && childPopup.Visible)
+ {
+ childPopup.Hide();
+ }
+ if (!Resizable)
+ {
+ return false;
+ }
+ if (m.Msg == NativeMethods.WM_NCHITTEST)
+ {
+ return OnNcHitTest(ref m, contentControl);
+ }
+ else if (m.Msg == NativeMethods.WM_GETMINMAXINFO)
+ {
+ return OnGetMinMaxInfo(ref m);
+ }
+ return false;
+ }
+
+ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+ private bool OnGetMinMaxInfo(ref Message m)
+ {
+ NativeMethods.MINMAXINFO minmax = (NativeMethods.MINMAXINFO)Marshal.PtrToStructure(m.LParam, typeof(NativeMethods.MINMAXINFO));
+ minmax.maxTrackSize = this.MaximumSize;
+ minmax.minTrackSize = this.MinimumSize;
+ Marshal.StructureToPtr(minmax, m.LParam, false);
+ return true;
+ }
+
+ private bool OnNcHitTest(ref Message m, bool contentControl)
+ {
+ int x = NativeMethods.LOWORD(m.LParam);
+ int y = NativeMethods.HIWORD(m.LParam);
+ Point clientLocation = PointToClient(new Point(x, y));
+
+ GripBounds gripBouns = new GripBounds(contentControl ? content.ClientRectangle : ClientRectangle);
+ IntPtr transparent = new IntPtr(NativeMethods.HTTRANSPARENT);
+
+ if (resizableTop)
+ {
+ if (resizableRight && gripBouns.TopLeft.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTTOPLEFT;
+ return true;
+ }
+ if (!resizableRight && gripBouns.TopRight.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTTOPRIGHT;
+ return true;
+ }
+ if (gripBouns.Top.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTTOP;
+ return true;
+ }
+ }
+ else
+ {
+ if (resizableRight && gripBouns.BottomLeft.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTBOTTOMLEFT;
+ return true;
+ }
+ if (!resizableRight && gripBouns.BottomRight.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTBOTTOMRIGHT;
+ return true;
+ }
+ if (gripBouns.Bottom.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTBOTTOM;
+ return true;
+ }
+ }
+ if (resizableRight && gripBouns.Left.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTLEFT;
+ return true;
+ }
+ if (!resizableRight && gripBouns.Right.Contains(clientLocation))
+ {
+ m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTRIGHT;
+ return true;
+ }
+ return false;
+ }
+
+ private VS.VisualStyleRenderer sizeGripRenderer;
+ ///
+ /// Paints the size grip.
+ ///
+ /// The instance containing the event data.
+ public void PaintSizeGrip(PaintEventArgs e)
+ {
+ if (e == null || e.Graphics == null || !resizable)
+ {
+ return;
+ }
+ Size clientSize = content.ClientSize;
+ if (Application.RenderWithVisualStyles)
+ {
+ if (this.sizeGripRenderer == null)
+ {
+ this.sizeGripRenderer = new VS.VisualStyleRenderer(VS.VisualStyleElement.Status.Gripper.Normal);
+ }
+ this.sizeGripRenderer.DrawBackground(e.Graphics, new Rectangle(clientSize.Width - 0x10, clientSize.Height - 0x10, 0x10, 0x10));
+ }
+ else
+ {
+ ControlPaint.DrawSizeGrip(e.Graphics, content.BackColor, clientSize.Width - 0x10, clientSize.Height - 0x10, 0x10, 0x10);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/PopupComboBox.Designer.cs b/Source/ryControls/CheckBoxComboBox/PopupComboBox.Designer.cs
new file mode 100644
index 0000000..aa061ef
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/PopupComboBox.Designer.cs
@@ -0,0 +1,48 @@
+namespace PresentationControls
+{
+ partial class PopupComboBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ if (dropDown != null)
+ {
+ dropDown.Dispose();
+ }
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.SuspendLayout();
+ //
+ // PopupComboBox
+ //
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/PopupComboBox.cs b/Source/ryControls/CheckBoxComboBox/PopupComboBox.cs
new file mode 100644
index 0000000..ecc9159
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/PopupComboBox.cs
@@ -0,0 +1,153 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Security.Permissions;
+
+namespace PresentationControls
+{
+ ///
+ /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp".
+ /// Represents a Windows combo box control with a custom popup control attached.
+ ///
+ [ToolboxBitmap(typeof(System.Windows.Forms.ComboBox)), ToolboxItem(true), ToolboxItemFilter("System.Windows.Forms"), Description("Displays an editable text box with a drop-down list of permitted values.")]
+ public partial class PopupComboBox : ComboBox
+ {
+ ///
+ /// Initializes a new instance of the PopupControl.PopupComboBox class.
+ ///
+ public PopupComboBox()
+ {
+ InitializeComponent();
+ base.DropDownHeight = base.DropDownWidth = 1;
+ base.IntegralHeight = false;
+ }
+
+ ///
+ /// The pop-up wrapper for the dropDownControl.
+ /// Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property.
+ /// Note however the pop-up properties must be set after the dropDownControl is assigned, since this
+ /// popup wrapper is recreated when the dropDownControl is assigned.
+ ///
+ protected Popup dropDown;
+
+ private Control dropDownControl;
+ ///
+ /// Gets or sets the drop down control.
+ ///
+ /// The drop down control.
+ public Control DropDownControl
+ {
+ get
+ {
+ return dropDownControl;
+ }
+ set
+ {
+ if (dropDownControl == value)
+ return;
+ dropDownControl = value;
+ dropDown = new Popup(value);
+ }
+ }
+
+ ///
+ /// Shows the drop down.
+ ///
+ public void ShowDropDown()
+ {
+ if (dropDown != null)
+ {
+ dropDown.Show(this);
+ }
+ }
+
+ ///
+ /// Hides the drop down.
+ ///
+ public void HideDropDown()
+ {
+ if (dropDown != null)
+ {
+ dropDown.Hide();
+ }
+ }
+
+ ///
+ /// Processes Windows messages.
+ ///
+ /// The Windows to process.
+ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+ protected override void WndProc(ref Message m)
+ {
+ if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND))
+ {
+ if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN)
+ {
+ // Blocks a redisplay when the user closes the control by clicking
+ // on the combobox.
+ TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp);
+ if (TimeSpan.TotalMilliseconds > 500)
+ ShowDropDown();
+ return;
+ }
+ }
+ base.WndProc(ref m);
+ }
+
+ #region " Unused Properties "
+
+ /// This property is not relevant for this class.
+ /// This property is not relevant for this class.
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
+ public new int DropDownWidth
+ {
+ get { return base.DropDownWidth; }
+ set { base.DropDownWidth = value; }
+ }
+
+ /// This property is not relevant for this class.
+ /// This property is not relevant for this class.
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
+ public new int DropDownHeight
+ {
+ get { return base.DropDownHeight; }
+ set
+ {
+ dropDown.Height = value;
+ base.DropDownHeight = value;
+ }
+ }
+
+ /// This property is not relevant for this class.
+ /// This property is not relevant for this class.
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
+ public new bool IntegralHeight
+ {
+ get { return base.IntegralHeight; }
+ set { base.IntegralHeight = value; }
+ }
+
+ /// This property is not relevant for this class.
+ /// This property is not relevant for this class.
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
+ public new ObjectCollection Items
+ {
+ get { return base.Items; }
+ }
+
+ /// This property is not relevant for this class.
+ /// This property is not relevant for this class.
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
+ public new int ItemHeight
+ {
+ get { return base.ItemHeight; }
+ set { base.ItemHeight = value; }
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/ryControls/CheckBoxComboBox/PopupComboBox.resx b/Source/ryControls/CheckBoxComboBox/PopupComboBox.resx
new file mode 100644
index 0000000..3276f5c
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/PopupComboBox.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ False
+
+
\ No newline at end of file
diff --git a/Source/ryControls/CheckBoxComboBox/Selection Wrappers/ListSelectionWrapper.cs b/Source/ryControls/CheckBoxComboBox/Selection Wrappers/ListSelectionWrapper.cs
new file mode 100644
index 0000000..ae5b2f6
--- /dev/null
+++ b/Source/ryControls/CheckBoxComboBox/Selection Wrappers/ListSelectionWrapper.cs
@@ -0,0 +1,241 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+using System.ComponentModel;
+
+namespace PresentationControls
+{
+ ///
+ /// Maintains an additional "Selected" and "Count" value for each item in a List.
+ /// Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and
+ /// whether it is selected or not.
+ /// It also caters for a Count, if needed.
+ ///
+ public class ListSelectionWrapper : List>
+ {
+ #region CONSTRUCTOR
+
+ ///
+ /// No property on the object is specified for display purposes, so simple ToString() operation
+ /// will be performed. And no Counts will be displayed
+ ///
+ public ListSelectionWrapper(IEnumerable source) : this(source, false) { }
+ ///
+ /// No property on the object is specified for display purposes, so simple ToString() operation
+ /// will be performed.
+ ///
+ public ListSelectionWrapper(IEnumerable source, bool showCounts)
+ : base()
+ {
+ _Source = source;
+ _ShowCounts = showCounts;
+ if (_Source is IBindingList)
+ ((IBindingList)_Source).ListChanged += new ListChangedEventHandler(ListSelectionWrapper_ListChanged);
+ Populate();
+ }
+ ///
+ /// A Display "Name" property is specified. ToString() will not be performed on items.
+ /// This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ /// If a PropertyDescriptor is not found, a Property will be used.
+ ///
+ public ListSelectionWrapper(IEnumerable source, string usePropertyAsDisplayName) : this(source, false, usePropertyAsDisplayName) { }
+ ///
+ /// A Display "Name" property is specified. ToString() will not be performed on items.
+ /// This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values.
+ /// If a PropertyDescriptor is not found, a Property will be used.
+ ///
+ public ListSelectionWrapper(IEnumerable source, bool showCounts, string usePropertyAsDisplayName)
+ : this(source, showCounts)
+ {
+ _DisplayNameProperty = usePropertyAsDisplayName;
+ }
+
+ #endregion
+
+ #region PRIVATE PROPERTIES
+
+ ///
+ /// Is a Count indicator used.
+ ///
+ private bool _ShowCounts;
+ ///
+ /// The original List of values wrapped. A "Selected" and possibly "Count" functionality is added.
+ ///
+ private IEnumerable _Source;
+ ///
+ /// Used to indicate NOT to use ToString(), but read this property instead as a display value.
+ ///
+ private string _DisplayNameProperty = null;
+
+ #endregion
+
+ #region PUBLIC PROPERTIES
+
+ ///
+ /// When specified, indicates that ToString() should not be performed on the items.
+ /// This property will be read instead.
+ /// This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values.
+ ///
+ public string DisplayNameProperty
+ {
+ get { return _DisplayNameProperty; }
+ set { _DisplayNameProperty = value; }
+ }
+ ///
+ /// Builds a concatenation list of selected items in the list.
+ ///
+ public string SelectedNames
+ {
+ get
+ {
+ string Text = "";
+ foreach (ObjectSelectionWrapper Item in this)
+ if (Item.Selected)
+ Text += (
+ string.IsNullOrEmpty(Text)
+ ? String.Format("\"{0}\"", Item.Name)
+ : String.Format(" & \"{0}\"", Item.Name));
+ return Text;
+ }
+ }
+ ///
+ /// Indicates whether the Item display value (Name) should include a count.
+ ///
+ public bool ShowCounts
+ {
+ get { return _ShowCounts; }
+ set { _ShowCounts = value; }
+ }
+
+ #endregion
+
+ #region HELPER MEMBERS
+
+ ///
+ /// Reset all counts to zero.
+ ///
+ public void ClearCounts()
+ {
+ foreach (ObjectSelectionWrapper Item in this)
+ Item.Count = 0;
+ }
+ ///
+ /// Creates a ObjectSelectionWrapper item.
+ /// Note that the constructor signature of sub classes classes are important.
+ ///
+ ///
+ ///
+ private ObjectSelectionWrapper CreateSelectionWrapper(IEnumerator Object)
+ {
+ Type[] Types = new Type[] { typeof(T), this.GetType() };
+ ConstructorInfo CI = typeof(ObjectSelectionWrapper).GetConstructor(Types);
+ if (CI == null)
+ throw new Exception(String.Format(
+ "The selection wrapper class {0} must have a constructor with ({1} Item, {2} Container) parameters.",
+ typeof(ObjectSelectionWrapper),
+ typeof(T),
+ this.GetType()));
+ object[] parameters = new object[] { Object.Current, this };
+ object result = CI.Invoke(parameters);
+ return (ObjectSelectionWrapper)result;
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ObjectSelectionWrapper FindObjectWithItem(T Object)
+ {
+ return Find(new Predicate>(
+ delegate(ObjectSelectionWrapper target)
+ {
+ return target.Item.Equals(Object);
+ }));
+ }
+
+ /*
+ public TSelectionWrapper FindObjectWithKey(object key)
+ {
+ return FindObjectWithKey(new object[] { key });
+ }
+
+ public TSelectionWrapper FindObjectWithKey(object[] keys)
+ {
+ return Find(new Predicate(
+ delegate(TSelectionWrapper target)
+ {
+ return
+ ReflectionHelper.CompareKeyValues(
+ ReflectionHelper.GetKeyValuesFromObject(target.Item, target.Item.TableInfo),
+ keys);
+ }));
+ }
+
+ public object[] GetArrayOfSelectedKeys()
+ {
+ List