private void FillLanguageDropdown()
 {
     if (!base.IsPostBack)
     {
         LanguageList           langList = new LanguageList();
         PropertiesContentPanel propertiesContentPanel = (PropertiesContentPanel)this.DataClassificationLanguage.Controls[0];
         DropDownList           dropDownList           = (DropDownList)propertiesContentPanel.FindControl("ddLanguage");
         HashSet <int>          expectedCultureLcids   = LanguagePackInfo.expectedCultureLcids;
         IEnumerable <ListItem> source = expectedCultureLcids.Select(delegate(int lcid)
         {
             CultureInfo cultureInfo = new CultureInfo(lcid);
             return(new ListItem(RtlUtil.ConvertToDecodedBidiString(langList.GetDisplayValue(cultureInfo.Name), RtlUtil.IsRtl), cultureInfo.Name));
         });
         dropDownList.Items.AddRange((from i in source
                                      orderby i.Text
                                      select i).ToArray <ListItem>());
     }
 }
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (!base.IsPostBack)
     {
         LanguageList           langList = new LanguageList();
         PropertiesContentPanel propertiesContentPanel = (PropertiesContentPanel)this.outlooksettings.Controls[0];
         DropDownList           dropDownList           = (DropDownList)propertiesContentPanel.FindControl("ddLocale");
         HashSet <int>          expectedCultureLcids   = LanguagePackInfo.expectedCultureLcids;
         IEnumerable <ListItem> source = expectedCultureLcids.Select(delegate(int lcid)
         {
             CultureInfo cultureInfo = new CultureInfo(lcid);
             return(new ListItem(RtlUtil.ConvertToDecodedBidiString(langList.GetDisplayValue(cultureInfo.Name), RtlUtil.IsRtl), cultureInfo.Name));
         });
         dropDownList.Items.AddRange((from i in source
                                      orderby i.Text
                                      select i).ToArray <ListItem>());
     }
 }
Esempio n. 3
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (!base.IsPostBack)
     {
         new LanguageList();
         PropertiesContentPanel propertiesContentPanel           = (PropertiesContentPanel)this.newEditRemoteDomainPropertySheet.Controls[0];
         DropDownList           dropDownList                     = (DropDownList)propertiesContentPanel.FindControl("ddMIMECharacterSet");
         DropDownList           dropDownList2                    = (DropDownList)propertiesContentPanel.FindControl("ddNonMIMECharacterSet");
         DomainContentConfig.CharacterSetInfo[] characterSetList = DomainContentConfig.CharacterSetList;
         IEnumerable <ListItem> source = from aCharacterSet in characterSetList
                                         select new ListItem(aCharacterSet.CharsetDescription, aCharacterSet.CharacterSetName);
         dropDownList2.Items.AddRange(source.ToArray <ListItem>());
         dropDownList.Items.AddRange(source.ToArray <ListItem>());
     }
 }