public InstructionDetailsViewModel(XInstruction instruction = null) { SelectZoneCommand = new RelayCommand(OnSelectZoneCommand, CanSelect); SelectDeviceCommand = new RelayCommand(OnSelectDeviceCommand, CanSelect); SelectDirectionCommand = new RelayCommand(OnSelectDirectionCommand, CanSelect); GetMediaCommand = new RelayCommand(OnGetMedia); RemoveMediaCommand = new RelayCommand(OnRemoveMedia); if (instruction != null) { Title = "Редактирование инструкции"; Instruction = instruction; CopyProperties(); } else { Title = "Новая инструкция"; Instruction = new XInstruction(); CopyProperties(); } }
public InstructionViewModel(XInstruction instruction) { Instruction = instruction; }