private void MoveBarcode(BarcodeViewModel source, BarcodeViewModel target) { var workspace = GetWorkspaceByBarcode(source); var barcodes = workspace.Barcodes; barcodes.Move(barcodes.IndexOf(source), barcodes.IndexOf(target)); }
public BarcodeViewModel(BarcodeViewModel barcodeViewModel) { Title = barcodeViewModel.Title; Description = barcodeViewModel.Description; Barcode = barcodeViewModel.Barcode.Clone(); GenerationData = new GenerationData(barcodeViewModel.GenerationData); }
private WorkspaceViewModel GetWorkspaceByBarcode(BarcodeViewModel barcode) { return(app.Workspaces.FirstOrDefault(w => w.Barcodes.Contains(barcode))); }