private void GetLanguage() { ListItemCollection LIC = BSHelper.LanguagesByFolder("Setup/Languages/"); foreach (ListItem item in LIC) { ddLanguage.Items.Add(item); } ddLanguage.SelectedValue = (string)Session["lang"]; }
private void FillSettings() { try { if (Blogsa.Settings.Count > 0) { txtblog_description.Text = Blogsa.Settings["blog_description"].ToString(); txtblog_name.Text = Blogsa.Settings["blog_name"].ToString(); txtrecent_comments_count.Text = Blogsa.Settings["recent_comments_count"].ToString(); txtrecent_posts_count.Text = Blogsa.Settings["recent_posts_count"].ToString(); txtshow_post_count.Text = Blogsa.Settings["show_post_count"].ToString(); txtpermaexpression.Text = Blogsa.Settings["permaexpression"].ToString(); rblpermalink.SelectedValue = Blogsa.Settings["permalink"].ToString(); ddladd_comment_approve.SelectedValue = Blogsa.Settings["add_comment_approve"].ToString(); txtallowed_html_tags.Text = Blogsa.Settings["allowed_html_tags"].Value; // Language ListItemCollection licAdminLanguages = BSHelper.LanguagesByFolder("/Languages/Admin/"); ListItemCollection licLanguages = BSHelper.LanguagesByFolder("/Languages/Main/"); foreach (ListItem item in licLanguages) { ddllanguage.Items.Add(item); } foreach (ListItem item in licAdminLanguages) { ddladmin_language.Items.Add(item); } ddllanguage.SelectedValue = Blogsa.Settings["language"].ToString(); ddlpaging.SelectedValue = Blogsa.Settings["paging"].ToString(); ddlpagingstyle.SelectedValue = Blogsa.Settings["pagingstyle"].ToString(); ddlcomment_sendmail.SelectedValue = Blogsa.Settings["comment_sendmail"].ToString(); ddladmin_language.SelectedValue = Blogsa.Settings["admin_language"].Value; // Smpt Settings txtsmtp_email.Text = Blogsa.Settings["smtp_email"].ToString(); txtsmtp_name.Text = Blogsa.Settings["smtp_name"].ToString(); txtsmtp_pass.Text = Blogsa.Settings["smtp_pass"].ToString(); txtsmtp_port.Text = Blogsa.Settings["smtp_port"].ToString(); txtsmtp_server.Text = Blogsa.Settings["smtp_server"].ToString(); txtsmtp_user.Text = Blogsa.Settings["smtp_user"].ToString(); ddlsmtp_usessl.SelectedValue = Blogsa.Settings["smtp_usessl"].ToString(); // Library Settings txtlibrary_thumbnail_height.Text = Blogsa.Settings["library_thumbnail_height"].ToString(); txtlibrary_thumbnail_width.Text = Blogsa.Settings["library_thumbnail_width"].ToString(); txtlibrary_thumbnail_web_height.Text = Blogsa.Settings["library_thumbnail_web_height"].ToString(); txtlibrary_thumbnail_web_width.Text = Blogsa.Settings["library_thumbnail_web_width"].ToString(); ddllibrary_usethumbnail.SelectedValue = Blogsa.Settings["library_usethumbnail"].ToString(); ddlmultilanguage.SelectedValue = Blogsa.Settings["multilanguage"].Value; } else { MessageBox1.Message = Language.Admin["SettingNotFound"]; MessageBox1.Type = MessageBox.ShowType.Normal; } } catch (System.Exception ex) { MessageBox1.Message = ex.Message; MessageBox1.Type = MessageBox.ShowType.Error; } }