コード例 #1
0
        private void AddPropertyCombobox(string idPostfix, string defValue)
        {
            TraceableCombobox child = new TraceableCombobox
            {
                ID         = "Property" + idPostfix,
                Width      = new Unit(100.0, UnitType.Percentage),
                SelectOnly = true
            };

            child.SetList(this.PropertyList);
            if (string.IsNullOrEmpty(defValue))
            {
                child.Value = this.FormatDefaultText(EcmTexts.Localize("Select property", new object[0]));
            }
            else
            {
                foreach (string str in this.PropertyList)
                {
                    if (defValue.Equals(str, StringComparison.OrdinalIgnoreCase))
                    {
                        child.Value = str;
                        break;
                    }
                }
            }
            this.ParentControl.Controls.Add(child);
        }
コード例 #2
0
 protected void FieldChanged()
 {
     if (this.FieldsSection.Controls.Count >= 1)
     {
         System.Web.UI.Control control = this.FieldsSection.Controls[0];
         for (int i = control.Controls.Count - 1; i >= 0; i--)
         {
             TraceableCombobox combobox = control.Controls[i] as TraceableCombobox;
             if ((combobox != null) && combobox.ID.StartsWith("Field"))
             {
                 if ((combobox.GetList().Count > 0) && (combobox.Value[0] != '<'))
                 {
                     this.AddRow(combobox.ID.Substring("Field".Length));
                     SheerResponse.Refresh(this.FieldsSection);
                 }
                 break;
             }
         }
     }
 }
コード例 #3
0
 private void AddPropertyCombobox(string idPostfix, string defValue)
 {
     TraceableCombobox child = new TraceableCombobox
     {
         ID = "Property" + idPostfix,
         Width = new Unit(100.0, UnitType.Percentage),
         SelectOnly = true
     };
     child.SetList(this.PropertyList);
     if (string.IsNullOrEmpty(defValue))
     {
         child.Value = this.FormatDefaultText(EcmTexts.Localize("Select property", new object[0]));
     }
     else
     {
         foreach (string str in this.PropertyList)
         {
             if (defValue.Equals(str, StringComparison.OrdinalIgnoreCase))
             {
                 child.Value = str;
                 break;
             }
         }
     }
     this.ParentControl.Controls.Add(child);
 }