Windows Form
文章平均质量分 60
zexu82
这个作者很懒,什么都没留下…
展开
-
动态加载 usercontrol
private UserControl currentUserControl; private void button1_Click(object sender, System.EventArgs e) { if (this.currentUserControl != null) { this.panel1.Controls.Remove(currentUserControl); this.currentUserControl = null; } this.转载 2010-12-03 01:49:00 · 612 阅读 · 0 评论 -
nettier business object validation code
protected override void AddValidationRules() { //Validation rules based on database schema. // string validate ValidationRules.AddRule(CommonRules.Str原创 2011-08-11 22:37:23 · 500 阅读 · 0 评论 -
ObjectDatasource and IDataErrorInfo with WinForms
1. create the form. 2. create the Business-object Customer, implement the IDataErrorInfo using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Compon转载 2011-07-21 17:44:56 · 1528 阅读 · 0 评论 -
Custom data binding, window form
// custom Object Public Class Customer { // class to get set a string to format of (key=value;key=value;...;...;) private NVParser parser = new NVParser(); public Customer() { parser.原创 2012-05-01 00:44:12 · 391 阅读 · 0 评论 -
custom format Property of business object for the data binding
This normally used for a generated business object. (nettier) get the business object. create a new Property Display Name, which based on property FirstName and Surname: The first line is importan原创 2011-08-03 00:55:40 · 390 阅读 · 0 评论 -
devexpress xtrareport
Create custom summary in End User Designer (script) (windows form) ///////////////////////////////////////////// // select a label (sho原创 2011-09-30 19:09:28 · 1996 阅读 · 0 评论 -
xtraReport save to DB
// create the DatabaseReportStorage class which used to override the save, save as function. using System; using System.Collections.Ge原创 2011-10-04 01:23:05 · 2182 阅读 · 0 评论 -
C# listbox remove selected items
<br />while( list.SelectedIndices.Count > 0 )<br />{<br /> list.Items.RemoveAt(list.SelectedIndices[0]);<br />}转载 2010-12-02 17:55:00 · 1207 阅读 · 0 评论 -
window form 下拉菜单的动态加载
<br /><br />// Get the selected item in the combobox KeyValuePair<string, string> selectedPair = (KeyValuePair<string, string>)cboData.S转载 2010-12-01 19:43:00 · 1313 阅读 · 0 评论 -
listbox bind datasource, refresh data
1, set the binding source, select the datasource from system business object this.listBox1.DataSource = this.iLicenseKeyBindingSource; thi原创 2011-08-04 19:53:25 · 1794 阅读 · 2 评论 -
form.AutoSize
Form.AutoSize is working on runtime, not working on design view, other controls.AutoSize is working on the design view. Form.AutoSize原创 2011-08-03 00:03:34 · 511 阅读 · 0 评论 -
NumericUpDown validate
ValueChanged event of the numericUpDown control doesn't fire when a user types in a value (instead of clicking on the up/down buttons). Tha原创 2011-07-14 00:13:36 · 968 阅读 · 0 评论 -
MessageBox
MessageBox.Show("Message here"); DialogResult dr = MessageBox.Show(this, "Are you sure you want to delete room ?", "Delete Room",MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); if (dr == DialogResult.Yes) { } e原创 2011-06-01 16:56:00 · 350 阅读 · 0 评论 -
calculate all controls size and position in the form when the form resize
// class with calculate size and position of control.class UIElement { // those properties get the Control current size, font, position public Control Control { get; set; } publi原创 2012-09-25 18:30:22 · 403 阅读 · 0 评论