摘要:
public T DeSerializer<T>(string serializer) { DataContractSerializer ser = new DataContractSerializer(typeof(T)); MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(serializer)); T DatatractDto = (T)ser.ReadObject(ms); ms.Close(); return DatatractDto; }public string Serialize<T>(T 阅读全文
摘要:
定义combox绑定类:public class ComboxData { public string Text{ set; get; } public string Value{ set; get; } public override string ToString() { return Text; } }具体绑定:DevExpress.XtraEditors.ComboBoxEdit combox;ComboxData data = new ComboxData(); data.Text ="需要显示的文本"; data.Value= “类似Tag功能”; combox 阅读全文
摘要:
初始化: DevExpress.XtraEditors.ImageComboBoxEdit imageComboBox=new DevExpress.XtraEditors.ImageComboBoxEdi();图片容器: DevExpress.Utils.ImageCollection imageCollection;设置ImageComboxEdit 的图片集合: imageComboBox.Properties.SmallImages=imageCollection;添加子项: ImageComboBoxItem item = new ImageComboBoxItem(); item. 阅读全文