/// <summary>
        /// Setup constructor
        /// </summary>
        /// <param name="viewFactory">View factory</param>
        /// <param name="context">Selected biome context</param>
        /// <param name="completeBiomeList">List of all biomes that can be selected</param>
        /// <param name="currentBiomeList">Current biome list</param>
        /// <param name="view">View to watch</param>
        /// <exception cref="System.ArgumentNullException">Thrown if workspace, model or view are null</exception>
        public BiomeListController( IViewFactory viewFactory, SelectedBiomeContext context, BiomeListModel completeBiomeList, BiomeListModel currentBiomeList, IBiomeListView view )
        {
            Arguments.CheckNotNull( viewFactory, "viewFactory" );
            Arguments.CheckNotNull( context, "context");
            Arguments.CheckNotNull( completeBiomeList, "completeBiomeList" );
            Arguments.CheckNotNull( currentBiomeList, "currentBiomeList" );
            Arguments.CheckNotNull( view, "view" );

            m_ViewFactory = viewFactory;
            m_Context = context;
            m_AllBiomes = completeBiomeList;
            m_CurrentBiomes = currentBiomeList;

            //	Run through all the available biomes
            foreach ( BiomeModel model in m_AllBiomes.Models )
            {
                //	Add the current biome to the view. Set it as selected if it is in the current biome list
                view.AddBiome( model, m_CurrentBiomes.Models.IndexOf( model ) != -1 );
            }

            view.OnCreateBiome += OnCreateBiome;
            view.OnAddBiome += OnAddBiome;
            view.OnRemoveBiome += OnRemoveBiome;
            view.BiomeSelected += OnBiomeSelected;
            view.OnDeleteBiome += OnDeleteBiome;
            m_View = view;
        }
        /// <summary>
        /// Setup constructor
        /// </summary>
        /// <param name="biomes">Biome list</param>
        public BiomeListLatitudeDistributionModel( BiomeListModel biomes )
        {
            Arguments.CheckNotNull( biomes, "biomes" );
            m_Biomes = biomes;
            m_Biomes.Models.ListChanged += Models_ListChanged;

            float latitudeStep = 1.0f / biomes.Models.Count;
            for ( int biomeIndex = 0; biomeIndex < biomes.Models.Count; ++biomeIndex )
            {
                BiomeModel biome = biomes.Models[ biomeIndex ];
                float minLatitude = biomeIndex * latitudeStep;
                float maxLatitude = ( biomeIndex + 1 ) * latitudeStep;
                BiomeLatitudeRangeDistribution distribution = new BiomeLatitudeRangeDistribution( biome, minLatitude, maxLatitude );
                distribution.DistributionChanged += OnDistributionChanged;
                m_Distributions.Add( distribution );
            }
        }
 /// <summary>
 /// Creates a biome terrain texture view
 /// </summary>
 public IBiomeTerrainTextureView CreateBiomeTerrainTextureView( SelectedBiomeContext context, BiomeListModel model )
 {
     IBiomeTerrainTextureView view = new BiomeTerrainTextureViewControl( );
     new BiomeTerrainTextureController( context, view );
     return view;
 }
 /// <summary>
 /// Creates a biome list view
 /// </summary>
 public IBiomeListView CreateBiomeListView( SelectedBiomeContext context, BiomeListModel allBiomes, BiomeListModel currentBiomes )
 {
     IBiomeListView view = new BiomeListControl( );
     new BiomeListController( this, context, allBiomes, currentBiomes, view );
     return view;
 }