/// <summary> /// 打开数据编辑窗体 /// </summary> /// <param name="value">编辑的数据</param> /// <returns></returns> public static object EditValue(object value, int chCount) { ChannelSelector form = new ChannelSelector(chCount); foreach (var item in (List <int>)value) { form.cklChannelsSelect.SetItemChecked(item, true); } form.temp = value; //form.selectChannels = (List<int>)value; form.CbxAllChannels.Checked = ((List <int>)value).Count == chCount; form.ShowDialog(); return(form.selectChannels); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { return(ChannelSelector.EditValue(value, AnalogInputEngine.channelCount)); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { //打开属性编辑器修改数据 return(ChannelSelector.EditValue(value, DigitalInputEngine.channelCount)); }