Exemplo n.º 1
0
		private void InitializeStandardTypes() {
			this.Register(typeof(Boolean), typeof(BooleanCellEditor));
			this.Register(typeof(Int16), typeof(IntUpDown));
			this.Register(typeof(Int32), typeof(IntUpDown));
			this.Register(typeof(Int64), typeof(IntUpDown));
			this.Register(typeof(UInt16), typeof(UintUpDown));
			this.Register(typeof(UInt32), typeof(UintUpDown));
			this.Register(typeof(UInt64), typeof(UintUpDown));
			this.Register(typeof(Single), typeof(FloatCellEditor));
			this.Register(typeof(Double), typeof(FloatCellEditor));
			this.Register(typeof(DateTime), delegate(Object model, OLVColumn column, Object value) {
				DateTimePicker c = new DateTimePicker();
				c.Format = DateTimePickerFormat.Short;
				return c;
			});
			this.Register(typeof(Boolean), delegate(Object model, OLVColumn column, Object value) {
				CheckBox c = new BooleanCellEditor2();
				c.ThreeState = column.TriStateCheckBoxes;
				return c;
			});
		}
Exemplo n.º 2
0
 private void InitializeStandardTypes()
 {
     this.Register(typeof(Boolean), typeof(BooleanCellEditor));
     this.Register(typeof(Int16), typeof(IntUpDown));
     this.Register(typeof(Int32), typeof(IntUpDown));
     this.Register(typeof(Int64), typeof(IntUpDown));
     this.Register(typeof(UInt16), typeof(UintUpDown));
     this.Register(typeof(UInt32), typeof(UintUpDown));
     this.Register(typeof(UInt64), typeof(UintUpDown));
     this.Register(typeof(Single), typeof(FloatCellEditor));
     this.Register(typeof(Double), typeof(FloatCellEditor));
     this.Register(typeof(DateTime), delegate(Object model, OLVColumn column, Object value) {
         DateTimePicker c = new DateTimePicker();
         c.Format         = DateTimePickerFormat.Short;
         return(c);
     });
     this.Register(typeof(Boolean), delegate(Object model, OLVColumn column, Object value) {
         CheckBox c   = new BooleanCellEditor2();
         c.ThreeState = column.TriStateCheckBoxes;
         return(c);
     });
 }