⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 field.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
            }
            string str3 = "$$$";
            return builder.ToString().TrimEnd(str3.ToCharArray());
        }

        private string GetProperties(string properties)
        {
            string[] strArray = DataSecurity.HtmlEncode(properties).Split(new string[] { "<br>" }, StringSplitOptions.RemoveEmptyEntries);
            StringBuilder builder = new StringBuilder();
            foreach (string str2 in strArray)
            {
                builder.Append(str2.Trim());
                builder.Append("|");
            }
            return builder.ToString().TrimEnd(new char[] { '|' });
        }

        private Collection<string> GetSettingsByFieldType(FieldType fieldType)
        {
            Collection<string> collection = new Collection<string>();
            switch (fieldType)
            {
                case FieldType.TextType:
                    collection.Add(this.TxtTextMaxLength.Text.Trim());
                    collection.Add(this.TxtTextSize.Text.Trim());
                    collection.Add("False");
                    collection.Add(this.DropTextIMEMode.SelectedValue);
                    collection.Add(this.AttachSingle.EnableInsideLink);
                    collection.Add(this.AttachSingle.EnableFilterWord);
                    collection.Add(this.AttachSingle.EnableShieldWord);
                    return collection;

                case FieldType.MultipleTextType:
                    collection.Add(this.TxtMultiTextWidth.Text.Trim());
                    collection.Add(this.TxtMultiTextRow.Text.Trim());
                    collection.Add(this.AttachMulit.EnableInsideLink);
                    collection.Add(this.AttachMulit.EnableFilterWord);
                    collection.Add(this.AttachMulit.EnableShieldWord);
                    return collection;

                case FieldType.MultipleHtmlTextType:
                    collection.Add(this.DropEditorType.SelectedValue);
                    collection.Add(this.TxtEditorWidth.Text.Trim());
                    collection.Add(this.TxtEditorHight.Text.Trim());
                    collection.Add(this.AttachMulitHtml.EnableInsideLink);
                    collection.Add(this.AttachMulitHtml.EnableFilterWord);
                    collection.Add(this.AttachMulitHtml.EnableShieldWord);
                    return collection;

                case FieldType.ListBoxType:
                    collection.Add(DataSecurity.HtmlEncode(this.HdnChoiceUrls.Value));
                    collection.Add(this.RadlChoiceType.SelectedValue);
                    collection.Add(this.RadlEnableFill.SelectedValue);
                    collection.Add(DataConverter.CLng(this.TxtRepeatColumns.Text, 1).ToString());
                    return collection;

                case FieldType.NumberType:
                    collection.Add(this.TxtNumberMinLength.Text.Trim());
                    collection.Add(this.TxtNumberMaxlength.Text.Trim());
                    collection.Add(this.DropNumberDecimals.SelectedValue);
                    collection.Add(this.ChkNumberPercent.Checked.ToString());
                    return collection;

                case FieldType.MoneyType:
                    collection.Add(this.TxtCurrencyMinLength.Text.Trim());
                    collection.Add(this.TxtCurrencyMaxLength.Text.Trim());
                    return collection;

                case FieldType.DateTimeType:
                    collection.Add(this.RadioDateTimeType.SelectedValue);
                    collection.Add(this.RadlDateTimeDefaultType.SelectedValue);
                    return collection;

                case FieldType.LookType:
                    collection.Add(this.DropLookupTable.SelectedValue);
                    collection.Add(this.DropLookupField.SelectedValue);
                    return collection;

                case FieldType.LinkType:
                    collection.Add(this.TxtURLMaxLength.Text.Trim());
                    collection.Add(this.TxtURLSize.Text.Trim());
                    return collection;

                case FieldType.BoolType:
                    collection.Add(this.DropBoolean.SelectedValue);
                    return collection;

                case FieldType.CountType:
                case FieldType.ColorType:
                case FieldType.NodeType:
                case FieldType.TemplateType:
                case FieldType.SkinType:
                case FieldType.StatusType:
                case FieldType.ProductType:
                    return collection;

                case FieldType.PictureType:
                    collection.Add(this.TxtImageTextLength.Text.Trim());
                    collection.Add(this.TxtImageSize.Text.Trim());
                    collection.Add(this.TextImageType.Text.Trim());
                    collection.Add(this.RadlIsFromSelected.SelectedValue);
                    collection.Add(this.RadlWsImage.SelectedValue);
                    collection.Add(this.RadlThumb.SelectedValue);
                    collection.Add(this.RadlIsUpload.SelectedValue);
                    collection.Add(this.RadlUploadFiles.SelectedValue);
                    return collection;

                case FieldType.FileType:
                    collection.Add(this.TxtFileSize.Text.Trim());
                    collection.Add(this.TextFileType.Text.Trim());
                    collection.Add(this.ChkDownLoadUrl.Checked.ToString());
                    collection.Add(this.ChkSoftSize.Checked.ToString());
                    collection.Add(this.TxtFileSizeField.Text);
                    return collection;

                case FieldType.InfoType:
                    collection.Add(this.TxtVirtualLinkWidth.Text.Trim());
                    collection.Add(this.TxtVirtualLinkRow.Text.Trim());
                    return collection;

                case FieldType.AuthorType:
                    collection.Add(this.TxtAuthorSize.Text);
                    return collection;

                case FieldType.SourceType:
                    collection.Add(this.TxtSourceSize.Text);
                    return collection;

                case FieldType.KeywordType:
                    collection.Add(this.TxtKeywordSize.Text);
                    return collection;

                case FieldType.OperatingType:
                    collection.Add(this.GetOperatingSystemSelectItem(this.TxtOperatingSystemSelectItem.Text));
                    collection.Add(this.TxtOperatingSystemSize.Text);
                    return collection;

                case FieldType.DownServerType:
                    collection.Add(this.TxtDownServerWidth.Text);
                    return collection;

                case FieldType.SpecialType:
                    collection.Add(this.TxtSpecialWidth.Text.Trim());
                    collection.Add(this.TxtSpecialRow.Text.Trim());
                    return collection;

                case FieldType.Producer:
                    collection.Add(this.TxtProducerSize.Text);
                    return collection;

                case FieldType.Trademark:
                    collection.Add(this.TxtTrademarkSize.Text);
                    return collection;

                case FieldType.ContentType:
                    collection.Add(this.TxtContentEditorWidth.Text);
                    collection.Add(this.TxtContentEditorHight.Text);
                    collection.Add(this.TextUploadImpType.Text);
                    collection.Add(this.TextUploadFlashType.Text);
                    collection.Add(this.TextUploadAnnexType.Text);
                    collection.Add(this.RadlContentWsImage.SelectedValue);
                    collection.Add(this.RadlContentThumb.SelectedValue);
                    collection.Add(this.TxtUploadSize.Text);
                    return collection;

                case FieldType.TitleType:
                    collection.Add(this.TxtTitleMaxLength.Text);
                    collection.Add(this.TxtTitleSize.Text);
                    collection.Add(this.RadCheckTitleValue.SelectedValue);
                    return collection;

                case FieldType.MultiplePhotoType:
                    collection.Add(this.TxtMultiPhotoSize.Text);
                    collection.Add(this.TxtMultiPhotoExt.Text);
                    collection.Add(this.ChkIsSaveThumb.Checked.ToString());
                    collection.Add(this.TxtThumbField.Text);
                    collection.Add(this.RadlMWsImage.SelectedValue);
                    return collection;

                case FieldType.Property:
                    collection.Add(this.GetProperties(this.TxtProperty.Text));
                    return collection;
            }
            return collection;
        }

        private void InitFieldSettingControls(FieldInfo fieldInfo)
        {
            Collection<string> settings = fieldInfo.Settings;
            switch (fieldInfo.FieldType)
            {
                case FieldType.TextType:
                    this.InitTxtText(fieldInfo);
                    return;

                case FieldType.MultipleTextType:
                    this.InitTxtMultiText(fieldInfo);
                    return;

                case FieldType.MultipleHtmlTextType:
                    this.DropEditorType.SelectedValue = settings[0];
                    this.TxtEditorWidth.Text = settings[1];
                    this.TxtEditorHight.Text = settings[2];
                    this.TxtMulitHtmlDefault.Text = fieldInfo.DefaultValue;
                    this.AttachMulitHtml.EnableInsideLink = settings[3];
                    this.AttachMulitHtml.EnableFilterWord = settings[4];
                    this.AttachMulitHtml.EnableShieldWord = settings[5];
                    return;

                case FieldType.ListBoxType:
                    this.HdnChoiceUrls.Value = DataSecurity.HtmlDecode(settings[0]);
                    foreach (string str in this.HdnChoiceUrls.Value.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries))
                    {
                        this.ChoiceUrl.Items.Add(new ListItem(str, str));
                    }
                    this.RadlChoiceType.SelectedValue = settings[1];
                    this.RadlEnableFill.SelectedValue = settings[2];
                    this.TxtChoiceDefaultValue.Text = fieldInfo.DefaultValue;
                    if (settings.Count > 3)
                    {
                        this.TxtRepeatColumns.Text = settings[3];
                    }
                    this.EBtnSubmit.Attributes.Add("onclick", "if(!ChangeHiddenFieldValue()){return false;}");
                    return;

                case FieldType.NumberType:
                    this.TxtNumberMinLength.Text = settings[0];
                    this.TxtNumberMaxlength.Text = settings[1];
                    this.DropNumberDecimals.SelectedValue = settings[2];
                    this.ChkNumberPercent.Checked = DataConverter.CBool(settings[3]);
                    this.TxtNumberDefaultValue.Text = fieldInfo.DefaultValue;
                    return;

                case FieldType.MoneyType:
                    this.TxtCurrencyMinLength.Text = settings[0];
                    this.TxtCurrencyMaxLength.Text = settings[1];
                    this.TxtCurrencyDefaultValue.Text = fieldInfo.DefaultValue;
                    return;

                case FieldType.DateTimeType:
                    BasePage.SetSelectedIndexByValue(this.RadioDateTimeType, settings[0]);
                    this.RadlDateTimeDefaultType.SelectedValue = settings[1];
                    if (settings[1] != "2")
                    {
                        break;
                    }
                    this.DpkDateTimeInputDefaultValue.Text = fieldInfo.DefaultValue;
                    return;

                case FieldType.LookType:
                    this.DropLookupTable.SelectedValue = settings[0];
                    this.DropLookupField.SelectedValue = settings[1];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -