public EventWithParamViewModel(Event ev, EventParam eventParam, EventWithParamListViewModel eventWithParamListViewModel)
 {
     this.EventWithParamListViewModel = eventWithParamListViewModel;
     this.Name = ev.Name;
     this.Probability = ev.Probability;
     this.EventParam = eventParam;
     this.AddEventCommand = new DelegateCommand<object>(this.OnAddEvent, this.CanAddEvent);
 }
 public EventWithParamViewModel(EventWithParamListViewModel eventWithParamListViewModel)
 {
     var ev = new Event();
     var paramValue = new EventParam();
     this.EventWithParamListViewModel = eventWithParamListViewModel;
     this.Name = ev.Name;
     this.Probability = ev.Probability;
     this.EventParam = paramValue;
     this.AddEventCommand = new DelegateCommand<object>(this.OnAddEvent, this.CanAddEvent);
 }
Exemplo n.º 3
0
        public EventWithParamViewModel(EventWithParamListViewModel eventWithParamListViewModel)
        {
            var ev         = new Event();
            var paramValue = new EventParam();

            this.EventWithParamListViewModel = eventWithParamListViewModel;
            this.Name            = ev.Name;
            this.Probability     = ev.Probability;
            this.EventParam      = paramValue;
            this.AddEventCommand = new DelegateCommand <object>(this.OnAddEvent, this.CanAddEvent);
        }
 private void BindElements()
 {
     _eventWithParamListViewModel = new EventWithParamListViewModel(_baseLayer);
     EventListControl.DataContext = _eventWithParamListViewModel;
     EventControl.DataContext = new EventWithParamViewModel(_eventWithParamListViewModel);
 }