public void ShowConfig(string controlId) { FormControlProperties prop = PluginHelper.NintexFormsContext.FormControls.Where(c => c.UniqueId == controlId).First(); FormControlConfiguration form = new FormControlConfiguration(prop); form.Show(); }
protected void InitializeFormControl() { frmFormControl.SetValue("WatermarkText", "Test"); if (!UseCustomSelector) { frmFormControl.FormControlName = "Uni_selector"; frmFormControl.SetValue("ObjectType", RelatedObjectType); frmFormControl.SetValue("ReturnColumnName", ReturnColumnName); frmFormControl.SetValue("ObjectSiteName", ObjectSiteName); frmFormControl.SetValue("DisplayNameFormat", DisplayNameFormat); frmFormControl.SetValue("SelectionMode", SelectionMode); frmFormControl.SetValue("AdditionalColumns", AdditionalColumns); frmFormControl.SetValue("WhereCondition", WhereCondition); frmFormControl.SetValue("OrderBy", OrderBy); frmFormControl.SetValue("EnabledColumnName", EnabledColumnName); frmFormControl.SetValue("AllowEditTextBox", AllowEditTextBox); frmFormControl.SetValue("UseAutocomplete", UseAutocomplete); frmFormControl.SetValue("ValuesSeparator", SeparatorCharacter); frmFormControl.SetValue("Transformation", Transformation); frmFormControl.SetValue("NoDataTransformation", NoDataTransformation); frmFormControl.SetValue("EncodeOutput", EncodeOutput); frmFormControl.SetValue("AllowEmpty", AllowEmpty); frmFormControl.SetValue("MaxDisplayedTotalItems", MaxDisplayedTotalItems); frmFormControl.SetValue("MaxDisplayedItems", MaxDisplayedItems); frmFormControl.SetValue("ItemsPerPage", ItemsPerPage); frmFormControl.SetValue("DisabledItems", DisabledItems); frmFormControl.SetValue("ButtonImage", ButtonImage); frmFormControl.SetValue("FilterControl", FilterControl); frmFormControl.SetValue("GridName", string.IsNullOrWhiteSpace(GridName) ? null : GridName); frmFormControl.SetValue("DialogGridName", string.IsNullOrWhiteSpace(DialogGridName) ? null : DialogGridName); } else { frmFormControl.FormControlName = FormControlName; foreach (string propVal in FormControlProperties.Split("\n\r".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)) { string prop = propVal.Split('|')[0]; string val = propVal.Split('|')[1]; frmFormControl.SetValue(prop, val.Replace("\\n", "\n")); } } //frmFormControl.Reload(); }
private void tabCtrlFunction_SelectedIndexChanged(object sender, EventArgs e) { FormControlProperties formCtrlProps = new FormControlProperties(); if (tabCtrlFunction.SelectedTab.Name == tabPageCopyByGroup.Name) { formCtrlProps.SourceFolderEnabled = true; formCtrlProps.TargetFolderEnabled = true; formCtrlProps.FileTypeEnabled = true; formCtrlProps.SortModeEnabled = true; formCtrlProps.ViewFileNameListEnabled = true; formCtrlProps.SpecFileListEnabled = true; formCtrlProps.FileTypeDefaultString = txtFileType.Text == "" ? "*" : txtFileType.Text; } else if (tabCtrlFunction.SelectedTab.Name == tabPageFileBatchChangeName.Name) { formCtrlProps.SourceFolderEnabled = true; formCtrlProps.TargetFolderEnabled = false; formCtrlProps.FileTypeEnabled = true; formCtrlProps.SortModeEnabled = true; formCtrlProps.ViewFileNameListEnabled = true; formCtrlProps.SpecFileListEnabled = true; formCtrlProps.FileTypeDefaultString = txtFileType.Text == "" ? "*" : txtFileType.Text; } else if (tabCtrlFunction.SelectedTab.Name == tabPageSporadicFunction.Name) { formCtrlProps.SourceFolderEnabled = true; formCtrlProps.TargetFolderEnabled = true; formCtrlProps.FileTypeEnabled = true; formCtrlProps.SortModeEnabled = false; formCtrlProps.ViewFileNameListEnabled = false; formCtrlProps.SpecFileListEnabled = false; formCtrlProps.FileTypeDefaultString = txtFileType.Text; } this.SetFormControlProperties(formCtrlProps); }
private void SetFormControlProperties(FormControlProperties formCtrlProps) { txtSourceFolder.Enabled = btnSourceFolderBrowser.Enabled = formCtrlProps.SourceFolderEnabled; txtTargetFolder.Enabled = btnTargetFolderBrowser.Enabled = formCtrlProps.TargetFolderEnabled; grpFileType.Enabled = formCtrlProps.FileTypeEnabled; txtFileType.Text = formCtrlProps.FileTypeDefaultString; grpSortMode.Enabled = formCtrlProps.SortModeEnabled; btnViewFileNameList.Enabled = formCtrlProps.ViewFileNameListEnabled; chkSpecFileList.Enabled = btnEditChangeFileList.Enabled = formCtrlProps.SpecFileListEnabled; if (formCtrlProps.SpecFileListEnabled) { this.chkSpecFileList_CheckedChanged(chkSpecFileList, new EventArgs()); } }
private void tabCtrlFunction_SelectedIndexChanged(object sender, EventArgs e) { FormControlProperties formCtrlProps = new FormControlProperties(); if (tabCtrlFunction.SelectedTab.Name == tabPageCopyByGroup.Name) { formCtrlProps.SourceFolderEnabled = true; formCtrlProps.TargetFolderEnabled = true; formCtrlProps.FileTypeEnabled = true; formCtrlProps.SortModeEnabled = true; formCtrlProps.ViewFileNameListEnabled = true; formCtrlProps.SpecFileListEnabled = true; formCtrlProps.FileTypeDefaultString = txtFileType.Text == "" ? "*" : txtFileType.Text; } else if (tabCtrlFunction.SelectedTab.Name == tabPageFileBatchChangeName.Name) { formCtrlProps.SourceFolderEnabled = true; formCtrlProps.TargetFolderEnabled = false; formCtrlProps.FileTypeEnabled = true; formCtrlProps.SortModeEnabled = true; formCtrlProps.ViewFileNameListEnabled = true; formCtrlProps.SpecFileListEnabled = true; formCtrlProps.FileTypeDefaultString = txtFileType.Text == "" ? "*" : txtFileType.Text; } else if (tabCtrlFunction.SelectedTab.Name == tabPageSporadicFunction.Name) { formCtrlProps.SourceFolderEnabled = true; formCtrlProps.TargetFolderEnabled = false; formCtrlProps.FileTypeEnabled = true; formCtrlProps.SortModeEnabled = false; formCtrlProps.ViewFileNameListEnabled = false; formCtrlProps.SpecFileListEnabled = false; formCtrlProps.FileTypeDefaultString = txtFileType.Text; } this.SetFormControlProperties(formCtrlProps); }
private void SetFormControlProperties(FormControlProperties formCtrlProps) { txtSourceFolder.Enabled = btnSourceFolderBrowser.Enabled = formCtrlProps.SourceFolderEnabled; txtTargetFolder.Enabled = btnTargetFolderBrowser.Enabled = formCtrlProps.TargetFolderEnabled; grpFileType.Enabled = formCtrlProps.FileTypeEnabled; txtFileType.Text = formCtrlProps.FileTypeDefaultString; grpSortMode.Enabled = formCtrlProps.SortModeEnabled; btnViewFileNameList.Enabled = formCtrlProps.ViewFileNameListEnabled; chkSpecFileList.Enabled = btnEditChangeFileList.Enabled = formCtrlProps.SpecFileListEnabled; if (formCtrlProps.SpecFileListEnabled) this.chkSpecFileList_CheckedChanged(chkSpecFileList, new EventArgs()); }
public FormControlConfiguration(FormControlProperties control) { InitializeComponent(); this.Text = control.DisplayName + " - " + control.UniqueId; StringBuilder sb = new StringBuilder(); foreach (string str in control.Border) { sb.Append(str).Append(", "); } if (sb.Length > 0) { sb.Remove(sb.Length - 2, 2); } textBox11.Text = sb.ToString(); textBox1.Text = control.BorderColor; textBox2.Text = control.BorderStyle; textBox3.Text = control.BackgroundColor; textBox4.Text = control.CanResizeAtRuntime.ToString(); textBox5.Text = control.VerticalAlign; textBox6.Text = control.PaddingWidth.ToString(); textBox7.Text = control.VerticalHeight; textBox8.Text = control.HorizontalWidth; textBox9.Text = control.IsVisible.ToString(); textBox10.Text = control.IsLocked.ToString(); textBox12.Text = control.ControlCssClass; textBox13.Text = control.CssClass; textBox14.Text = control.ExposedClientIdJavaScriptVariable; textBox15.Text = control.ExposeClientIdAsJavaScriptVariable.ToString(); textBox16.Text = control.Name; textBox17.Text = control.DisplayName; textBox18.Text = control.AlternateText; textBox19.Text = control.ControlVersion; textBox20.Text = control.FormControlTypeUniqueId; textBox21.Text = control.UniqueId; textBox22.Text = control.FormType; textBox23.Text = control.IsDirty.ToString(); textBox24.Text = control.TabIndex.ToString(); textBox25.Text = control.ControlMode; textBox26.Text = control.DefaultValue; textBox27.Text = control.DefaultValueSource; textBox28.Text = control.VariableSource; textBox29.Text = control.ValueToCompare; textBox30.Text = control.DialogTitle; textBox31.Text = control.HelpText; textBox32.Text = control.HelpTextSet; textBox33.Text = control.RequiredErrorMessage; textBox34.Text = control.CompareErrorMessage; textBox35.Text = control.CustomErrorMessage; textBox36.Text = control.UseCustomValidation.ToString(); textBox37.Text = control.CustomvalidationFunction; textBox38.Text = control.UseCompareValidation.ToString(); textBox39.Text = control.CompareOperator; textBox40.Text = control.ControlToCompare; textBox41.Text = control.CompareTo; textBox42.Text = control.IsRequired.ToString(); textBox43.Text = control.IsEnabled.ToString(); textBox45.Text = control.MaximumEntities.ToString(); textBox44.Text = control.InRepeater.ToString(); textBox46.Text = control.DataFieldDisplayName; textBox47.Text = control.DataField; textBox48.Text = control.MultiSelectChanged.ToString(); textBox49.Text = control.PickerDialogToolTip; textBox50.Text = control.SharePointGroup; textBox51.Text = control.MultiSelect.ToString(); }