public InputViewModel(IWpfCalculationExecutor executor, IApplicationArguments arguments, IEventAggregator eventAggregator, InputStringValidator validator, IConversionProperties conversionProperties, IWindowProperties windowProperties, IUnitsAndAbbreviationsSource unitsAndAbbreviationsSource) { mExecutor = executor; mArguments = arguments; mEventAggregator = eventAggregator; mValidator = validator; mConversionProperties = conversionProperties; mWindowProperties = windowProperties; mUnitsAndAbbreviationsSource = unitsAndAbbreviationsSource; mStepExpander = mWindowProperties.AreStepsExpanded; }
public ShellViewModel( InputViewModel input, ConversionViewModel conversion, IEventAggregator eventAggregator, ConfigurationWindowViewModel configurationWindow, IWindowManager windowManager, IWindowProperties windowProperties, IConversionProperties conversionProperties) { mConfigurationWindow = configurationWindow; mWindowManager = windowManager; mWindowProperties = windowProperties; mConversionProperties = conversionProperties; Input = input; Conversion = conversion; eventAggregator.Subscribe(this); SetupWindowAttributesFromConfig(); }
public ConversionViewModel(IEventAggregator eventAggregator, IWindowProperties windowProperties, IConversionProperties conversionProperties) { mEventAggregator = eventAggregator; mWindowProperties = windowProperties; mConversionProperties = conversionProperties; SetListsForView(); AllUnitsAndAbbreviations = new List <List <UnitAbbreviationsAndNames> > { MetricalMasses, MetricalAreas, MetricalLengths, MetricalVolumes, ImperialMasses, ImperialAreas, ImperialLengths, ImperialVolumes }; SetUnitOnStartup(); mToMetric = mConversionProperties.DoUseMetricSystem; mToImperial = !mConversionProperties.DoUseMetricSystem; mUnitExpander = mWindowProperties.AreUnitsExpanded; }