public void CopyTo(CanTxMessageItem target) { target.Name = Name; target.Key = Key; target.IsPeriod = IsPeriod; target.PeriodTime = PeriodTime; target.Type = Type; target.Remote = Remote; target.ArbitrationId = CustomDataConversion.StringToUInt32HighSpeed(ArbitrationId); target.Data = CustomDataConversion.StringToByteArrayHighSpeed(Data); target.Documentation = Documentation; target.Description = Description; }
/// <summary> /// Visszatöltés /// </summary> /// <param name="target"></param> public void CopyTo(CanTxMessageCollection target) { target.Clear(); target.RaiseListChangedEvents = false; foreach (var item in this) { var targetItem = new CanTxMessageItem(); item.CopyTo(targetItem); ((CanTxMessageCollection)target).Add(targetItem); } target.RaiseListChangedEvents = true; target.ResetBindings(); }
protected override object MakeNewItem(Type type) { var name = CollectionTools.GetNewName(_collection.Cast <CanTxMessageItem>().Select(n => n.Name).ToArray <string>(), "New_Message"); var newItem = new CanTxMessageItem() { Name = name, Key = string.Empty, IsPeriod = false, Type = ArbitrationIdType.Standard, Remote = false, ArbitrationId = 1, Data = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, Documentation = string.Empty, Description = string.Empty }; return(newItem); }