Пример #1
0
 private void OnParameterSourceAdded(JsonInput control)
 {
     if (this.ParameterSourceAdded != null)
     {
         this.ParameterSourceAdded(this, control);
     }
 }
Пример #2
0
 internal void SetParameterSources()
 {
     foreach (string parameterSourceJsonId in parameterSourceJsonIds)
     {
         if (Parent is UserControl)
         {
             foreach (Control control in Parent.Controls)
             {
                 if (control is JsonInput)
                 {
                     JsonInput inputControl = (JsonInput)control;
                     if (inputControl.JsonId.Equals(parameterSourceJsonId))
                     {
                         AddParameterSource(inputControl);
                     }
                 }
             }
         }
         else if (ParentJavascriptPage != null)
         {
             //ParentJavascriptPage.AddJsonControl(this);
             IJsonControl control = ParentJavascriptPage.FindJsonControl(parameterSourceJsonId);
             if (control != null && control is JsonInput)
             {
                 AddParameterSource((JsonInput)control);
             }
             else
             {
                 throw new ParameterSourceNotFoundException(parameterSourceJsonId);
             }
         }
     }
 }
Пример #3
0
        public void AddParameterSource(JsonInput control)
        {
            if (parameterSources == null)
            {
                parameterSources = new List <JsonInput>();
            }

            parameterSources.Add(control);
            OnParameterSourceAdded(control);
        }
Пример #4
0
        protected string GetParameterIdArray()
        {
            string retVal = "[ ";

            for (int i = 0; i < parameterSources.Count; i++)
            {
                JsonInput source = parameterSources[i];
                retVal += string.Format("'{0}'", source.InputJsonId.Trim());
                if (i < parameterSources.Count - 1)
                {
                    retVal += ", ";
                }
            }
            retVal += " ]";
            return(retVal);
        }
Пример #5
0
 private void OnParameterSourceAdded(JsonInput control)
 {
     if (this.ParameterSourceAdded != null)
         this.ParameterSourceAdded(this, control);
 }
Пример #6
0
        public void AddParameterSource(JsonInput control)
        {
            if (parameterSources == null)
                parameterSources = new List<JsonInput>();

            parameterSources.Add(control);
            OnParameterSourceAdded(control);
        }