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>());
     }
 }
 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>());
     }
 }
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     if (this.UseWarningPanel)
     {
         this.warningPanel = this.CreateWarningPanel("PropertyPaneWarningPanel");
         this.Controls.Add(this.warningPanel);
     }
     if (this.Content != null && this.Sections.Count > 0)
     {
         throw new NotSupportedException("PropertyPage control cannot have both sections and content");
     }
     if (this.Content != null)
     {
         PropertiesContentPanel propertiesContentPanel = new PropertiesContentPanel();
         propertiesContentPanel.ID = "contentContainer";
         this.Controls.Add(propertiesContentPanel);
         this.Content.InstantiateIn(propertiesContentPanel);
     }
 }
Exemple #5
0
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     this.warningPanel = this.CreateWarningPanel("PropertyPaneWarningPanel");
     this.Controls.Add(this.warningPanel);
     if (this.Content != null && this.Sections.Count > 0)
     {
         throw new NotSupportedException("Properties control cannot have both sections and content");
     }
     if (this.Content != null)
     {
         this.ContentContainer    = new PropertiesContentPanel();
         this.ContentContainer.ID = "contentContainer";
         this.Controls.Add(this.ContentContainer);
         this.Content.InstantiateIn(this.ContentContainer);
     }
     if (this.ServiceUrl != null)
     {
         if (this.HasSaveMethod)
         {
             if (!this.UseSetObject && (!string.IsNullOrEmpty(this.SaveMethod) || !string.IsNullOrEmpty(this.SaveMethodExpression)))
             {
                 throw new NotSupportedException("Not supported to set \"UseSetObject\" to false and then use the properties \"SaveMethod\" or \"SaveMethodExpression\" on properties control");
             }
             this.SaveWebServiceMethod                  = new WebServiceMethod();
             this.SaveWebServiceMethod.ID               = "Save";
             this.SaveWebServiceMethod.ServiceUrl       = this.ServiceUrl;
             this.SaveWebServiceMethod.AlwaysInvokeSave = (this.AlwaysInvokeSave ?? (!this.UseSetObject));
             if (string.IsNullOrEmpty(this.SaveMethodExpression) && !string.IsNullOrEmpty(this.SaveMethod))
             {
                 this.SaveWebServiceMethod.Method = this.SaveMethod;
             }
             else
             {
                 this.SaveWebServiceMethod.Method = (this.UseSetObject ? "SetObject" : "NewObject");
             }
             if (this.ParameterSet != WebServiceParameterNames.NONE)
             {
                 this.SaveWebServiceMethod.ParameterNames = this.ParameterSet;
             }
             else
             {
                 this.SaveWebServiceMethod.ParameterNames = (this.UseSetObject ? WebServiceParameterNames.SetObject : WebServiceParameterNames.NewObject);
             }
             IPrincipal user = this.Context.User;
             foreach (WebServiceExceptionHandler webServiceExceptionHandler in this.ExceptionHandlers)
             {
                 if (webServiceExceptionHandler.ApplyRbacRolesAndAddControls(this, user))
                 {
                     this.SaveWebServiceMethod.ExceptionHandlers.Add(webServiceExceptionHandler);
                     this.RemoveMetaAttributes(webServiceExceptionHandler);
                 }
             }
             this.Controls.Add(this.SaveWebServiceMethod);
         }
         if (this.UseSetObject)
         {
             this.RefreshWebServiceMethod                = new WebServiceMethod();
             this.RefreshWebServiceMethod.ID             = "Refresh";
             this.RefreshWebServiceMethod.ServiceUrl     = this.ServiceUrl;
             this.RefreshWebServiceMethod.Method         = "GetObject";
             this.RefreshWebServiceMethod.ParameterNames = WebServiceParameterNames.GetObject;
             this.Controls.Add(this.RefreshWebServiceMethod);
         }
     }
 }