/// <summary> /// Setup constructor /// </summary> /// <param name="view">View to control</param> /// <param name="template">Template to control</param> /// <param name="model">Model to control</param> /// <exception cref="System.ArgumentNullException">Thrown if any argument is null</exception> public CloudModelTemplateViewController( ICloudModelTemplateView view, IPlanetSimpleCloudTemplate template, IPlanetSimpleCloudModel model ) { Arguments.CheckNotNull( view, "view" ); Arguments.CheckNotNull( template, "template" ); m_Model = model; m_Template = template; view.TemplateCloudLayerHeightChanged += OnTemplateCloudLayerHeightChanged; view.TemplateLowCoverageChanged += OnTemplateLowCoverageChanged; view.TemplateHighCoverageChanged += OnTemplateHighCoverageChanged; view.ModelCloudLayerHeightChanged += OnModelCloudLayerHeightChanged; view.ModelLowCoverageChanged += OnModelLowCoverageChanged; view.ModelHighCoverageChanged += OnModelHighCoverageChanged; view.EnableModelChanges = ( model != null ); }
/// <summary> /// Creates a view used to edit flat cloud model templates /// </summary> public IFlatCloudModelTemplateView CreateCloudTemplateView( IPlanetSimpleCloudTemplate template, IPlanetSimpleCloudModel model ) { FlatCloudModelTemplateControl view = new FlatCloudModelTemplateControl( ); new CloudModelTemplateViewController( view, template, model ); return view; }