Exemplo n.º 1
0
 public SettingsModel()
 {
     _printerSettings            = new PrinterSettingsModel();
     _printerSettingsCollection  = new ObservableCollection <PrinterSettingsModel>();
     _globalSettings             = new GlobalSettingsModel();
     _commonSettings             = new CommonSettingsModel();
     _threedSettings             = new ThreeDSettingsModel();
     _slicerSettingsCollection   = new ObservableCollection <SlicerSettingsModel>();
     _statisticModel             = new StatisticModel();
     _materialSettingsCollection = new ObservableCollection <MaterialSettingsModel>();
 }
Exemplo n.º 2
0
        public void SetIndexByPrinterSettings(PrinterSettingsModel model)
        {
            int index = _printerSettingsCollection.IndexOf(model);

            if (index != -1)
            {
                _selectedPrinterSettingsIndex = index;
            }
            else
            {
                throw new Exception("object not found in collection (SetIndexByPrinterSettings)");
            }
        }