private void RaiseSubRecordEvent(SubRecordEventArgs e) { if (SubRecord != null) { SubRecord(this, e); } }
private void StatusChangedHandler_SubRecordAdded(object sender, SubRecordEventArgs e) { if (InvokeRequired) { Invoke(new EventHandler <SubRecordEventArgs>(StatusChangedHandler_SubRecordAdded), new object[] { sender, e }); } else { AddSubRecord(e.ParentID, e.SubRecord, true); } }
public void StatusProvider_SubRecord(object sender, SubRecordEventArgs e) { foreach (IStatusChangedHandler subscriber in _subscribers.ToList()) { try { subscriber.SubRecord(new SubRecordData(e.ParentID, e.SubRecord.Time, EnumConverter.ConvertEnumValue <RecordStatus, RecordStatusData>(e.SubRecord.Status), e.SubRecord.Folder, e.SubRecord.Name, e.SubRecord.Size)); } catch { _subscribers.Remove(subscriber); } } }
private void SubRecordAdded(object sender, SubRecordEventArgs e) { RaiseSubRecordEvent(e); }