示例#1
0
        public RouteEnginesVM(
            IAppConfig appConfig,
            IUserConfig userConfig)
        {
            _appConfig  = appConfig;
            _userConfig = userConfig;

            ProcessorTypes = new ObservableCollection <ProcessorType>(Enum.GetValues <ProcessorType>()
                                                                      .Where(x => x != ProcessorType.None));

            UnitTypes             = new ObservableCollection <UnitTypes>(Enum.GetValues <UnitTypes>());
            SelectedProcessorType = ProcessorTypes.FirstOrDefault(x => x != ProcessorType.Distance);

            _setState = PropertySettingState.Normal;
        }
示例#2
0
        // this constructor is intended solely for use at design-time
        public RouteEnginesVM()
        {
            _appConfig  = new MockAppConfig();
            _userConfig = new MockUserConfig();

            APIKey                = "some clever API key";
            APIKeyVisible         = Visibility.Visible;
            MaxDistanceMultiplier = 3;
            DistanceValue         = 2.0;

            ProcessorTypes = new ObservableCollection <ProcessorType>(Enum.GetValues <ProcessorType>()
                                                                      .Where(x => x != ProcessorType.None));

            SelectedProcessorType = ProcessorTypes.FirstOrDefault(x => x != ProcessorType.Distance);

            UnitTypes        = new ObservableCollection <UnitTypes>(Enum.GetValues <UnitTypes>());
            SelectedUnitType = UnitTypes[0];

            _setState = PropertySettingState.Normal;
        }