Example #1
0
 private Validator InitializeValidator(Model _model, IUserInterface _ui)
 {
     Validator _validator;
     string extFolder = Constants.EXTENSIONS_FOLDER + Constants.EXTENSIONS_XML;
     IExtensionDataset extensions = Landis.Extensions.Dataset.LoadOrCreate(extFolder);
     RasterFactory rasterFactory = new RasterFactory();
     Landis.Landscapes.LandscapeFactory landscapeFactory = new Landis.Landscapes.LandscapeFactory();
     _validator = new Validator(extensions, rasterFactory, landscapeFactory, _model, _ui);
     return _validator;
 }
Example #2
0
 private Model InitializeModel()
 {
     Model model;
     //@ToDo: Is it okay to hard-code this path? If the widget runs from the LANDIS-II bin, shouldn't be needed
     //Landis.Core.IExtensionDataset extensions = Landis.Extensions.Dataset.LoadOrCreate();
     string extFolder = Constants.EXTENSIONS_FOLDER + Constants.EXTENSIONS_XML;
     IExtensionDataset extensions = Landis.Extensions.Dataset.LoadOrCreate(extFolder);
     //IExtensionDataset extensions = Landis.Extensions.Dataset.LoadOrCreate();
     RasterFactory rasterFactory = new RasterFactory();
     Landis.Landscapes.LandscapeFactory landscapeFactory = new Landis.Landscapes.LandscapeFactory();
     model = new Landis.Model(extensions, rasterFactory, landscapeFactory);
     return model;
 }