예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SupplyCareSettingCtrlVm"/> class.
        /// </summary>
        /// <param name="mainWindowVm">The main window vm.</param>
        public SupplyCareSettingCtrlVm(MainWindowVm mainWindowVm)
        {
            this.SupplyCareSettingItems = new ObservableCollection <SupplyCareSettingItemVm>();

            this.mainWindowViewModel = mainWindowVm;

            this.saveConfigurationCommand = new DelegateCommand(this.SaveConfiguration);
            this.loadConfigurationCommand = new DelegateCommand(this.LoadConfiguration);

            this.exportConfigurationCommand = new DelegateCommand(this.ExportConfiguration);
            this.importConfigurationCommand = new DelegateCommand(this.ImportConfiguration);

            var supplyCareWebServerSettingsCtrl = new SupplyCareWebServerSettingsCtrl();

            this.supplyCareWebServerSettingsControlVm = new SupplyCareWebServerSettingsControlVm(mainWindowVm);

            var supplyCareSamplingRateSettingsCtrl = new SupplyCareSamplingRateSettingsCtrl();

            this.supplyCareSamplingRateSettingsControlVm = new SupplyCareSamplingRateSettingsControlVm(mainWindowVm);

            var supplyCareSettingItemVm = new SupplyCareSettingItemVm(this, supplyCareWebServerSettingsCtrl, this.supplyCareWebServerSettingsControlVm, Resources.WebServer, true, @"SupplyCare WebServer Configuration");

            supplyCareSettingItemVm.IsExpanded = false;
            this.SupplyCareSettingItems.Add(supplyCareSettingItemVm);

            supplyCareSettingItemVm            = new SupplyCareSettingItemVm(this, supplyCareSamplingRateSettingsCtrl, this.supplyCareSamplingRateSettingsControlVm, Resources.OPCTimeSchedule, true, @"OPC time schedule");
            supplyCareSettingItemVm.IsExpanded = false;
            this.SupplyCareSettingItems.Add(supplyCareSettingItemVm);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SupplyCareSettingCtrlVm"/> class.
        /// </summary>
        public SupplyCareSettingCtrlVm()
        {
            this.SupplyCareSettingItems = new ObservableCollection <SupplyCareSettingItemVm>();

            var supplyCareSamplingRateSettingsCtrl = new SupplyCareSamplingRateSettingsCtrl();
            var supplyCareSettingItemVm            = new SupplyCareSettingItemVm(this, supplyCareSamplingRateSettingsCtrl, this.supplyCareSamplingRateSettingsControlVm, Resources.OPCTimeSchedule, true, @"OPC time schedule");

            supplyCareSettingItemVm.IsExpanded = false;
            this.SupplyCareSettingItems.Add(supplyCareSettingItemVm);
        }