/// <summary> /// Initializes a new instance of <see cref="BucketControlViewModel"/> class and copies data from existing Record /// </summary> /// <param name="bucket"></param> public BucketControlViewModel(Bucket bucket) : this(bucket.Address) { for (int i = 0; i < bucket.Records.Length; i++) { RecordControlViewModels.Add(new RecordControlViewModel() { Record = bucket.Records[i] }); } }
public BucketControlViewModel(BucketControlViewModel bucketControlViewModel) : this(bucketControlViewModel.Address) { Visibility = bucketControlViewModel.Visibility; OverrunedRecords = bucketControlViewModel.OverrunedRecords; foreach (RecordControlViewModel recordControl in bucketControlViewModel.RecordControlViewModels) { RecordControlViewModels.Add(new RecordControlViewModel() { Record = recordControl.Record }); } }