public OtherSettingsViewModel(ConfigRepository configRepository, IOtherSettingsView view)
        {
            _view = view;

            _otherSettings = new ObservableCollection<SettingViewModel>();
            foreach (var kv in configRepository.OtherSettings)
            {
                _otherSettings.Add(new SettingViewModel(kv.Key, kv.Value));
            }
            SettingsView = CollectionViewSource.GetDefaultView(_otherSettings);
            SettingsView.SortDescriptions.Add(new SortDescription("Key", ListSortDirection.Ascending));

            AddCmd = new RelayCommand(OnAdd);
            RemoveCmd = new RelayCommand<object>(OnRemove);
        }
        public MainViewModel(IMainWindow view, IOtherSettingsView viewOtherSettings)
        {
            _view = view;

            _measRepository = new MeasRepository("data/measurements.csv");
            _configRepository = new ConfigRepository("data/OmsLite.exe.config");

            _vmOtherSettings = new OtherSettingsViewModel(_configRepository, viewOtherSettings);
            _vmChosenMeasurement = new ChosenMeasurementViewModel(_configRepository, _measRepository);
            _vmAllMeasurements = new AllMeasurementsViewModel(_measRepository, _vmChosenMeasurement);

            // ----------------- commands
            SaveCmd = new RelayCommand(Save, () => _dirty);

            // ----------------- messages
            Messenger.Default.Register<bool>(this, _ => { _dirty = true; });
        }