/// <summary>
 /// Creates a new instance of ProjectionElement
 /// </summary>
 public ProjectionElement(ProjectionParam value)
 {
     
     _tthelp = new ToolTip();
     base.Param = value;
     InitializeComponent();
     if (value == null) return;
     base.GroupBox.Text = value.Name;
     if(value.Value != null)
     {
         lblProjection.Text = value.Value.ToProj4String();
     }
     value.ValueChanged += _value_ValueChanged;
 }
        /// <summary>
        /// The parameters array should be populated with default values here
        /// </summary>
        /// <returns></returns>
        public void Initialize()
        {
            _inputParam = new Parameter[3];
            _inputParam[0] = new FeatureSetParam(TextStrings.InputFeatureSet);
            _inputParam[0].HelpText = TextStrings.InputFeatureSettoreproject;

            _inputParam[1] = new ProjectionParam(TextStrings.SourceProjection);
            _inputParam[1].HelpText = TextStrings.sourceprojectiondifferent;

            _inputParam[2] = new ProjectionParam(TextStrings.DesiredOutputProjection);
            _inputParam[2].HelpText = TextStrings.Thedestinationprojection;

            _outputParam = new Parameter[1];
            _outputParam[0] = new FeatureSetParam(TextStrings.OutputFeatureSet);
            _outputParam[0].HelpText = TextStrings.SelectResultFeatureSetDirectory;
        }
        private void cmdSelect_Click(object sender, System.EventArgs e)
        {
            ProjectionSelectDialog dlg = new ProjectionSelectDialog();
            if (dlg.ShowDialog() != DialogResult.OK) return;
            if(Param == null)
            {
                Param = new ProjectionParam("dest", dlg.SelectedCoordinateSystem);
            }
            else
            {
                Param.Value = dlg.SelectedCoordinateSystem;
            }
            lblProjection.Text = Param.Value.ToProj4String();
            _tthelp.SetToolTip(lblProjection, Param.Value.ToProj4String());
            

        }