Пример #1
0
        private void CmdSelectClick(object sender, EventArgs e)
        {
            ExtentDialog dlg = new ExtentDialog();

            Extent ext = null;

            if (Param != null)
            {
                ext = Param.Value;
            }
            dlg.Extent = ext; // Null clears the dialog, otherwise we use the specified values.

            if (dlg.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (Param == null)
            {
                Param = new ExtentParam("extent", dlg.Extent);
            }
            else
            {
                Param.Value = dlg.Extent;
            }
            lblExtent.Text = Param.Value.ToString();
            _tthelp.SetToolTip(lblExtent, Param.Value.ToString());
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of ProjectionElement
 /// </summary>
 public ExtentElement(ExtentParam value)
 {
     _tthelp = new ToolTip();
     base.Param = value;
     InitializeComponent();
     if (value == null) return;
     GroupBox.Text = value.Name;
     if (value.Value != null)
     {
         lblExtent.Text = value.Value.ToString();
     }
     value.ValueChanged += ParamValueChanged;
 }
Пример #3
0
 /// <summary>
 /// Creates a new instance of ProjectionElement
 /// </summary>
 public ExtentElement(ExtentParam value)
 {
     _tthelp    = new ToolTip();
     base.Param = value;
     InitializeComponent();
     if (value == null)
     {
         return;
     }
     GroupBox.Text = value.Name;
     if (value.Value != null)
     {
         lblExtent.Text = value.Value.ToString();
     }
     value.ValueChanged += ParamValueChanged;
 }
Пример #4
0
        /// <summary>
        /// Adds Elements to the dialog based on what input Parameter the ITool contains
        /// </summary>
        private void PopulateInputElements()
        {
            // Loops through all the Parameter in the tool and generated their element
            foreach (Parameter param in _tool.InputParameters)
            {
                // We make sure that the input parameter is defined
                if (param == null)
                {
                    continue;
                }

                // We add an event handler that fires if the parameter is changed
                param.ValueChanged += ParamValueChanged;
                ExtentParam p = param as ExtentParam;
                if (p != null && p.DefaultToMapExtent)
                {
                    p.Value = _extent;
                }

                // Retrieve the dialog element from the parameter and add it to the dialog
                AddElement(param.InputDialogElement(DataSets));
            }
        }
Пример #5
0
        /// <summary>
        /// The Parameter array should be populated with default values here
        /// </summary>
        public override void Initialize()
        {
            _inputParam = new Parameter[4];
            _inputParam[0] = new FileParam(TextStrings.lasFilename, "LAS Files(*.las)|*.las")
                                 {
                                     HelpText = TextStrings.LasFullpath
                                 };
            ExtentParam p = new ExtentParam(TextStrings.RasterExtent);
            p.HelpText = TextStrings.GeographicExtent;
            p.DefaultToMapExtent = true;

            _inputParam[1] = p;

            _inputParam[2] = new IntParam(TextStrings.NumRows) { HelpText = TextStrings.numberofrows };

            _inputParam[3] = new IntParam(TextStrings.NumColumns) { HelpText = TextStrings.numberofcolums };

            _outputParam = new Parameter[1];
            _outputParam[0] = new RasterParam(TextStrings.OutputRaster) { HelpText = TextStrings.ResultRasterDirectory };
        }
Пример #6
0
        private void CmdSelectClick(object sender, EventArgs e)
        {
            ExtentDialog dlg = new ExtentDialog();

            Extent ext = null;
            if (Param != null) ext = Param.Value;
            dlg.Extent = ext; // Null clears the dialog, otherwise we use the specified values.

            if (dlg.ShowDialog() != DialogResult.OK) return;
            if (Param == null)
            {
                Param = new ExtentParam("extent", dlg.Extent);
            }
            else
            {
                Param.Value = dlg.Extent;
            }
            lblExtent.Text = Param.Value.ToString();
            _tthelp.SetToolTip(lblExtent, Param.Value.ToString());
        }