Example #1
0
        public static IEnumerable <ResourceItem> GetResourceKeys(Screen Screen, DropDownListControl Control, String Prefix)
        {
            List <ResourceItem> retVal = new List <ResourceItem>();

            //add title
            AddResourceKey(retVal, Screen, Control, Prefix, "EmptyMessage", Control.EmptyMessage);
            AddResourceKey(retVal, Screen, Control, Prefix, "AdditionalListItemText", Control.AdditionalListItemText);


            return(retVal);
        }
Example #2
0
        public static IEnumerable <ResourceItem> GetResourceKeys(Screen Screen, Widget Control, String Prefix)
        {
            List <ResourceItem> retVal = new List <ResourceItem>();

            //add title
            AddResourceKey(retVal, Screen, Control, Prefix, "Label", Control.Label);
            //sub titles
            if (Control.IsRequired)
            {
                AddResourceKey(retVal, Screen, Control, Prefix, "IsRequired.ErrorMessage", String.Format("{0} is required", Control.Label));
            }

            foreach (BaseValidator v in Control.Validators)
            {
                AddResourceKey(retVal, Screen, Control, Prefix, String.Format("Validators.{0}.ErrorMessage", v.Name), v.ErrorMessage);
            }


            //screens with action links
            //EmailAddress
            //HyperLink
            //Label
            //ListBox
            //LookupDropDownList
            //LookupListBox
            //MultiComboDropDownList
            //PickerControl
            //WorkflowStatus
            switch (Control.Type.ToLower())
            {
            case "dropdownlist":
                retVal.AddRange(DropDownListControl.GetResourceKeys(Screen, ((DropDownListControl)Control), Prefix));
                break;

            case "emailaddress":
                retVal.AddRange(EmailAddressControl.GetResourceKeys(Screen, ((EmailAddressControl)Control), Prefix));
                break;

            case "hyperlink":
                retVal.AddRange(HyperLinkControl.GetResourceKeys(Screen, ((HyperLinkControl)Control), Prefix));
                break;

            case "label":
                retVal.AddRange(LabelControl.GetResourceKeys(Screen, ((LabelControl)Control), Prefix));
                break;

            case "listbox":
                retVal.AddRange(ListBoxControl.GetResourceKeys(Screen, ((ListBoxControl)Control), Prefix));
                break;

            case "lookupdropdownlist":
                retVal.AddRange(LookupDropDownListControl.GetResourceKeys(Screen, ((LookupDropDownListControl)Control), Prefix));
                break;

            case "lookuplistbox":
                retVal.AddRange(LookupListBoxControl.GetResourceKeys(Screen, ((LookupListBoxControl)Control), Prefix));
                break;

            case "multicombodropdownlist":
                retVal.AddRange(MultiComboDropDownListControl.GetResourceKeys(Screen, ((MultiComboDropDownListControl)Control), Prefix));
                break;

            case "pickercontrol":
                retVal.AddRange(PickerControl.GetResourceKeys(Screen, ((PickerControl)Control), Prefix));
                break;

            case "treeview":
                retVal.AddRange(TreeViewControl.GetResourceKeys(Screen, ((TreeViewControl)Control), Prefix));
                break;

            case "workflowstatus":
                retVal.AddRange(WorkflowStatusControl.GetResourceKeys(Screen, ((WorkflowStatusControl)Control), Prefix));
                break;
            }

            return(retVal);
        }