public IFormattedValue VisitNumericValueViewModel(INumericValueViewModel numericValueViewModel) { var numericValue = (numericValueViewModel as IEditableValueViewModel)?.FormattedValue as INumericValue; numericValue.NumValue = double.Parse(numericValueViewModel.NumValue); return(numericValue); }
public Result VisitNumericValueViewModel(INumericValueViewModel numericValueViewModel) { var copyFrom = _editableValueViewModel as INumericValueViewModel; if (copyFrom == null) { return(Result.Create(false)); } numericValueViewModel.NumValue = copyFrom.NumValue; return(Result.Create(true)); }
private void InsertRow(IEnumerable <IFormattedValueViewModel> formattedValueViewModels) { List <IFormattedValueViewModel> listToInsert = new List <IFormattedValueViewModel>(formattedValueViewModels); if (IsTransponed) { if (_journalDataTable.ColumnNamesStrings != null) { IStringValueViewModel stringValueViewModel = StaticContainer.Container.Resolve <IStringValueViewModel>(); stringValueViewModel.StringValue = _journalDataTable.ColumnNamesStrings[_collection.Count]; listToInsert.Insert(0, stringValueViewModel); } if ((_journalDataTable.IsBaseNumeration) && (_journalDataTable.RowHeadersStrings != null)) { INumericValueViewModel numericValueViewModel = StaticContainer.Container.Resolve <INumericValueViewModel>(); numericValueViewModel.NumValue = (_collection.Count + 1).ToString(); listToInsert.Insert(0, numericValueViewModel); } } else { if ((_journalDataTable.IsBaseNumeration) && _journalDataTable.ColumnNamesStrings != null) { INumericValueViewModel numericValueViewModel = StaticContainer.Container.Resolve <INumericValueViewModel>(); numericValueViewModel.NumValue = (_collection.Count + 1).ToString(); listToInsert.Insert(0, numericValueViewModel); } if ((_journalDataTable.RowHeadersStrings != null)) { IStringValueViewModel stringValueViewModel = StaticContainer.Container.Resolve <IStringValueViewModel>(); if (_journalDataTable.RowHeadersStrings.Count > _collection.Count) { stringValueViewModel.StringValue = _journalDataTable.RowHeadersStrings[_collection.Count]; } else { stringValueViewModel.StringValue = string.Empty; } listToInsert.Insert(0, stringValueViewModel); } } Application.Current.Dispatcher.Invoke(() => { _collection.Add(listToInsert); }); }
public bool VisitNumericValueViewModel(INumericValueViewModel numericValueViewModel) { return((_baseFormattedValueViewModel as INumericValueViewModel).NumValue != numericValueViewModel.NumValue); }
public Result VisitNumericValueViewModel(INumericValueViewModel numericValueViewModel) { numericValueViewModel.NumValue = (_formattedValue as INumericValue).NumValue.ToString(); return(Result.Create(true)); }
public bool VisitNumericValueViewModel(INumericValueViewModel numericValueViewModel) { throw new NotImplementedException(); }