public override LogicElementViewModel Clone() { var model = new SystemJournal(); model.CopyValues(GetModel()); return(new SystemJournalViewModel(model, _globalCommands) { Caption = this.Caption }); }
public SystemJournalViewModel(LogicElement model, IApplicationGlobalCommands globalCommands) { _globalCommands = globalCommands; _model = (SystemJournal)model; _logicElementModel = _model; ElementName = "Журнал Системы"; Description = "Елемент выходного дискретного сигнала Журнал Системы"; Symbol = "ЖС"; ConnectorViewModels = new ObservableCollection <ConnectorViewModel>(); OutputSignals = new ObservableCollection <string>(); SetModel(this._model); }
private void UpdateProperties(SystemJournal journal) { this.OutputSignals.Clear(); this.OutputSignals.AddCollection(journal.OutputSignals); this.SelectedSignal = this.OutputSignals[journal.OutputSignalNum]; }