/// <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());
}