protected PivotModelBase(EditLogViewModel parentViewModel) { _parentViewModel = parentViewModel; }
//public EditLogPageModel() // : this(DesignData.CreateBatLog()) //{ // Calls = new ObservableCollection<BatCallViewModel>(BatLog.Calls.Select((c, i) => new BatCallViewModel(BatLog, c, i+1))); // if (Calls.Any()) // { // SelectedCall = Calls.First(); // } //} public EditCallsPivotModel(BatNodeLog batLog, EditLogViewModel parentViewModel) : base(parentViewModel) { BatLog = batLog; Name = batLog.Name; Description = batLog.Description; StartDate = new DateTimeOffset(BatLog.LogStart.Date); StartTime = batLog.LogStart.TimeOfDay; ToggleEnabledCommand = new RelayCommand(() => { if (SelectedCall != null) { SelectedCall.Enabled = !SelectedCall.Enabled; } }); }