/// <summary> /// Creates a new instance of the frmAssignProjection class /// </summary> public ReprojectForm(IAppContext context, IReprojectingService reprojectingService) : base(context) { _reprojectingService = reprojectingService; InitializeComponent(); if (context == null) { throw new ArgumentException("No reference to MapWindow was passed"); } if (reprojectingService == null) { throw new ArgumentNullException("reprojectingService"); } var database = context.Projections; if (database == null) { throw new InvalidCastException("Invalid instance of projection database was passed"); } LayersControl1.Initialize(context); if (ProjectionTreeView1.Initialize(database, context)) { ProjectionTreeView1.RefreshList(); } LayersControl1.ControlType = LayersControl.CustomType.Projection; }
/// <summary> /// Creates a new instance of MismatchTester class /// </summary> public ProjectionMismatchService(IAppContext context, IReprojectingService reprojectingService) { if (context == null) { throw new ArgumentNullException("context"); } if (reprojectingService == null) { throw new ArgumentNullException("reprojectingService"); } _context = context; _reprojectingService = reprojectingService; }