CustomFunctionUI.WatermarkFunctionUIForm.UpdateUI C# (CSharp) Method

UpdateUI() public method

Updates the UI textboxes using the properties that have been set.
public UpdateUI ( ) : void
return void
        public void UpdateUI()
        {
            if (myInputRaster != null)
                inputRasterTxtbox.Text = GetInputRasterName(myInputRaster);
            blendPercentTxtbox.Text = Convert.ToString(myBlendPercentage);
            watermarkImageTxtbox.Text = myWaterMarkImagePath;
            LocationComboBx.SelectedIndex = (int)myWatermarkLocation;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Activate the form.
 /// </summary>
 /// <returns>Handle to the form</returns>
 public int Activate()
 {
     if (templateMode)
     {
         // In template mode, set the form values using the RasterFunctionVariables
         myForm.BlendPercentage    = (double)myBlendPercentageVar.Value;
         myForm.WatermarkImagePath = (string)myWatermarkImagePathVar.Value;
         myForm.WatermarkLocation  = (CustomFunction.esriWatermarkLocation)myWatermarkLocationVar.Value;
         myForm.InputRaster        = myRasterVar;
     }
     else
     {
         // Otherwise use the arguments object to update the form values.
         myForm.WatermarkLocation  = myArgs.WatermarkLocation;
         myForm.BlendPercentage    = myArgs.BlendPercentage;
         myForm.WatermarkImagePath = myArgs.WatermarkImagePath;
         myForm.InputRaster        = myArgs.Raster;
     }
     myForm.UpdateUI();
     myForm.Activate();
     return(myForm.Handle.ToInt32());
 }