private void updateInputParamsPage() { // Update input parameters page if (configuration != null && configuration.InputParameters != null && configuration.InputParameters.Count > 0) { // Create input params page content and add page to collection if not already present inputParamsPage.Content = createPageContent(GPConfigUIBuilder.GenerateParameterUI(configuration.InputParameters)); if (!Pages.Contains(inputParamsPage)) { Pages.Insert(1, inputParamsPage); } } // Remove input params page if current GP task has no input parameters else if (Pages.Contains(inputParamsPage)) { Pages.Remove(inputParamsPage); } }
private void updateOutputParamsPage() { // Update output parameters page if (configuration != null && configuration.OutputParameters != null && configuration.OutputParameters.Count > 0) { // Create output params page content outputParamsPage.Content = createPageContent(GPConfigUIBuilder.GenerateParameterUI(configuration.OutputParameters)); // Add page to collection if not already present. Note that insertion index depends on whether // input prams page is present. if (!Pages.Contains(outputParamsPage) && Pages.Contains(inputParamsPage)) { Pages.Insert(2, outputParamsPage); } else if (!Pages.Contains(outputParamsPage)) { Pages.Insert(1, outputParamsPage); } } // Remove output params page if current GP task has no output parameters else if (Pages.Contains(outputParamsPage)) { Pages.Remove(outputParamsPage); } }