Ejemplo n.º 1
0
        /// <summary>
        /// Create a new instant.
        /// </summary>
        /// <param name="param"></param>
        public IndexElement(IndexParam param)
        {
            InitializeComponent();
            GroupBox.Text = param.Name;

            //We save the parameters passed in
            base.Param = param;
            HandleStatusLight();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Fires when one of the paramters value has beend changed, usually when a user changes a input or output parameters value, this can be used to populate input2 parameters default values.
        /// </summary>
        /// <param name="sender">Sender that fired the event.</param>
        public override void ParameterChanged(Parameter sender)
        {
            // This will give the Featureset values to second parameter
            if (sender != _inputParam[0])
            {
                return;
            }

            FeatureSetParam fsp = _inputParam[0] as FeatureSetParam;
            IndexParam      ip  = _inputParam[1] as IndexParam;

            if (fsp?.Value != null && ip != null)
            {
                ip.Fs = fsp.Value as FeatureSet;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Once the parameters have been configured the Execute command can be called, it returns true if successful
        /// </summary>
        /// <param name="cancelProgressHandler">The progress handler.</param>
        /// <returns>True, if executed successfully.</returns>
        public override bool Execute(ICancelProgressHandler cancelProgressHandler)
        {
            IFeatureSet input1 = _inputParam[0].Value as IFeatureSet;

            input1?.FillAttributes();

            IndexParam ip     = _inputParam[1] as IndexParam;
            string     input2 = string.Empty;

            if (ip != null)
            {
                input2 = ip.Value;
            }

            IFeatureSet output = _outputParam[0].Value as IFeatureSet;

            return(Execute(input1, input2, output, cancelProgressHandler));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// The parameters array should be populated with default values here
        /// </summary>
        public override void Initialize()
        {
            _inputParam    = new Parameter[2];
            _inputParam[0] = new FeatureSetParam(TextStrings.input1FeatureSet)
            {
                HelpText = TextStrings.InputFeatureSettodelete
            };

            _inputParam[1] = new IndexParam(TextStrings.SelectFeaturestoDelete)
            {
                HelpText = TextStrings.ExpressionSelectFeatures
            };

            _outputParam    = new Parameter[1];
            _outputParam[0] = new FeatureSetParam(TextStrings.OutputFeatureSet)
            {
                HelpText = TextStrings.SelectResultFeatureSetDirectory
            };
        }