Beispiel #1
0
 private void ResetForm()
 {
     TB_IPDisplay.Text = "";
     TB_Payload.Text   = "";
     CB_Type.ResetText();
     CB_Variant.ResetText();
 }
Beispiel #2
0
        public CB_Type ReadTypeInformationLibre(String Name, CB_File File)
        {
            CB_Type Type = CB_Type.Deleted;

            if (ExistInformationLibre(Name, File))
            {
                Type = (CB_Type)this.DBSage.cbSysLibre.First(i => i.CB_Name == Name && i.CB_File.ToUpper() == File.ToString().ToUpper()).CB_Type;
            }

            return(Type);
        }
Beispiel #3
0
 private void ResetForm()
 {
     TB_DWN.Text   = "";
     TB_UP.Text    = "";
     TB_IP.Text    = "";
     TB_Other.Text = "";
     CB_Type.ResetText();
     CB_Product.ResetText();
     CB_Variant.ResetText();
     CB_NoCyc.Checked = false;
     CB_NoTTF.Checked = false;
     CB_NoGen.Checked = false;
     CB_Save.Checked  = false;
     CB_Cert.Checked  = false;
     CB_Cert.Visible  = false;
 }
        private void CreateCustomFields()
        {
            EntityType      entityType          = ProjContext.EntityTypes.ProjectEntity;
            CustomFieldType customFieldType     = CustomFieldType.TEXT;
            LookupTable     selectedLookupTable = null;
            bool            allowMultiSelect    = false;

            CB_EntityType.InvokeIfRequired(cb => entityType = cb.SelectedValue as EntityType);
            CB_Type.InvokeIfRequired(sb => customFieldType  = (CustomFieldType)CB_Type.SelectedValue);
            CB_LookupTable.InvokeIfRequired(cb =>
            {
                if (cb.SelectedIndex <= 0)
                {
                    return;
                }
                selectedLookupTable = cb.SelectedValue as LookupTable;
                if (CBX_AllowMultiSelect.Checked)
                {
                    allowMultiSelect = true;
                }
            });
            for (int customFieldCount = 1; customFieldCount <= Convert.ToInt32(NUD_CFNumber.Value); customFieldCount++)
            {
                CustomFieldCreationInformation cfCi = new CustomFieldCreationInformation
                {
                    Name       = TB_Name.Text + customFieldCount,
                    EntityType = entityType,
                    FieldType  = customFieldType
                };
                Log.WriteVerbose(new SourceInfo(), TB_Status, "Creating custom field with name {0}", cfCi.Name);
                if (selectedLookupTable != null)
                {
                    cfCi.LookupTable = selectedLookupTable;
                    Log.WriteVerbose(new SourceInfo(), TB_Status, "Setting custom field to use lookup table {0}", selectedLookupTable.Name);
                }

                cfCi.LookupAllowMultiSelect = allowMultiSelect;
                ProjContext.CustomFields.Add(cfCi);
            }
            ProjContext.CustomFields.Update();
            ProjContext.ExecuteQuery();
        }