public ExpressionInstanceVM() { Reset = new DelegateCommand<object>(ResetHandler); Close = new DelegateCommand<object>(CloseHandler); _inputs = new ObservableCollection<ObservableInputVM>(); Inputs = new ReadOnlyObservableCollection<ObservableInputVM>(_inputs); if (IsInDesignMode()) { Definition = new ExpressionDefinition("Zip", "To jest opis Zip ... ", "(a,b) => z.Zip(b, (x,y) => x + y)"); _inputs.Add(new ObservableInputVM()); Output = new ObservableOutputVM(); } }
public ExpressionInstanceVM() { Reset = new DelegateCommand <object>(ResetHandler); Close = new DelegateCommand <object>(CloseHandler); _inputs = new ObservableCollection <ObservableInputVM>(); Inputs = new ReadOnlyObservableCollection <ObservableInputVM>(_inputs); if (IsInDesignMode()) { Definition = new ExpressionDefinition("Zip", "To jest opis Zip ... ", "(a,b) => z.Zip(b, (x,y) => x + y)"); _inputs.Add(new ObservableInputVM()); Output = new ObservableOutputVM(); } }
private void ResetHandler(object obj) { CleanUp(); _cleanedUp = false; _instance = ExpressionInstance.Create(Definition); // input & output _inputs.Clear(); foreach (var input in _instance.Inputs.Select(g => new ObservableInputVM(g))) { _inputs.Add(input); } Output = new ObservableOutputVM(_instance.Output); Diagram = _instance.Diagram; }
private void ResetHandler(object obj) { CleanUp(); _cleanedUp = false; _instance = ExpressionInstance.Create(Definition); // input & output _inputs.Clear(); foreach (var input in _instance.Inputs.Select(g => new ObservableInputVM(g))) _inputs.Add(input); Output = new ObservableOutputVM(_instance.Output); Diagram = _instance.Diagram; }