📄 collectionprogress.cs
字号:
if (infoById.PagingUrlList.IndexOf("\r\n") <= 0)
{
interceptionContent = this.AddPagingContent(infoById.PagingUrlList, collectionCommon, collectionFieldRuleInfo, interceptionContent);
return interceptionContent;
}
foreach (string str4 in infoById.PagingUrlList.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
{
interceptionContent = this.AddPagingContent(str4, collectionCommon, collectionFieldRuleInfo, interceptionContent);
}
}
return interceptionContent;
case 4:
{
string str5 = collectionCommon.GetInterceptionString(content, infoById.PagingBeginCode, infoById.PagingEndCode);
if (!string.IsNullOrEmpty(str5))
{
ArrayList list2 = collectionCommon.GetArray(str5, infoById.LinkBeginCode, infoById.LinkEndCode);
StringBuilder builder = new StringBuilder();
for (int k = 0; k < list2.Count; k++)
{
if (builder.Length > 0)
{
builder.Append("," + collectionCommon.DefiniteUrl(list2[k].ToString(), this.m_CollectionItemInfo.Url));
}
else
{
builder.Append(collectionCommon.DefiniteUrl(list2[k].ToString(), this.m_CollectionItemInfo.Url));
}
}
if (!string.IsNullOrEmpty(builder.ToString()))
{
foreach (string str6 in builder.ToString().Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
{
interceptionContent = this.AddPagingContent(str6, collectionCommon, collectionFieldRuleInfo, interceptionContent);
}
}
return interceptionContent;
}
return interceptionContent;
}
}
}
return interceptionContent;
}
private DataTable GetDataTableField(string link, NodeInfo nodeInfo)
{
DataTable dataTable = new DataTable();
dataTable.Columns.Add("FieldName");
dataTable.Columns.Add("FieldValue");
dataTable.Columns.Add("FieldType");
dataTable.Columns.Add("FieldLevel");
DataRow row = dataTable.NewRow();
row["FieldName"] = "NodeId";
row["FieldValue"] = this.m_CollectionItemInfo.NodeId;
row["FieldType"] = FieldType.NodeType;
row["FieldLevel"] = 0;
dataTable.Rows.Add(row);
row = dataTable.NewRow();
row["FieldName"] = "Inputer";
row["FieldValue"] = this.m_UserName;
row["FieldType"] = FieldType.TextType;
row["FieldLevel"] = 0;
dataTable.Rows.Add(row);
string checkStr = "Title,Status,EliteLevel,Priority,Hits,DayHits,WeekHits,MonthHits,UpdateTime,NodeId,TemplateFile,InfoId,SpecialId";
FieldType none = FieldType.None;
foreach (CollectionFieldRuleInfo info in this.m_CollectionFieldRuleInfoList)
{
CollectionCommon common;
string httpPage;
string str3;
string str4;
int fieldLevel = 1;
if (StringHelper.FoundCharInArr(checkStr, info.FieldName))
{
fieldLevel = 0;
}
if (System.Enum.IsDefined(typeof(FieldType), info.FieldType))
{
none = (FieldType) System.Enum.Parse(typeof(FieldType), info.FieldType);
}
switch (info.RuleType)
{
case 0:
{
continue;
}
case 1:
{
row = this.DesignatedDataRow(dataTable, row, none, info, fieldLevel);
continue;
}
case 2:
{
common = new CollectionCommon();
Uri url = new Uri(common.DefiniteUrl(link, this.m_CollectionItemInfo.Url));
httpPage = common.GetHttpPage(url, this.m_CollectionItemInfo.CodeType);
str3 = common.GetInterceptionString(httpPage, info.BeginCode, info.EndCode);
switch (none)
{
case FieldType.MultipleTextType:
case FieldType.MultipleHtmlTextType:
case FieldType.LinkType:
case FieldType.PictureType:
case FieldType.NodeType:
case FieldType.InfoType:
case FieldType.SkinType:
case FieldType.DownServerType:
case FieldType.SpecialType:
case FieldType.ProductType:
goto Label_0933;
case FieldType.NumberType:
case FieldType.StatusType:
goto Label_032B;
case FieldType.MoneyType:
goto Label_0393;
case FieldType.DateTimeType:
goto Label_03FB;
case FieldType.BoolType:
goto Label_0469;
case FieldType.FileType:
goto Label_0821;
case FieldType.KeywordType:
goto Label_04D1;
case FieldType.ContentType:
goto Label_056F;
case FieldType.MultiplePhotoType:
goto Label_0710;
}
goto Label_0933;
}
default:
{
continue;
}
}
if ((none == FieldType.TitleType) && string.IsNullOrEmpty(str3))
{
this.m_Result = false;
return dataTable;
}
if (str3.Length > 0xff)
{
str3 = str3.Substring(0, 0xff);
}
str3 = CommonFilter(info.FilterRuleId, info.PrivateFilter, common, str3);
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = str3;
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
continue;
Label_032B:
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = DataConverter.CFloat(str3).ToString();
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
continue;
Label_0393:
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = DataConverter.CDecimal(str3).ToString();
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
continue;
Label_03FB:
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = DataConverter.CDate(str3).ToString();
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
continue;
Label_0469:
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = DataConverter.CBool(str3).ToString();
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
continue;
Label_04D1:
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = CollectionCommon.CreateKeyWord(CommonFilter(info.FilterRuleId, info.PrivateFilter, common, str3).Replace(",", "|").Replace(",", "|"), DataConverter.CLng(info.SpecialSetting));
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
continue;
Label_056F:
str4 = CommonFilter(info.FilterRuleId, info.PrivateFilter, common, str3);
if (string.IsNullOrEmpty(str4))
{
this.m_Result = false;
return dataTable;
}
if (info.UsePaging)
{
this.m_ArrPaging = "";
str4 = CommonFilter(info.FilterRuleId, info.PrivateFilter, common, this.GetAllContent(httpPage, str3, common, info));
}
this.m_DefaultPicUrl = "";
this.m_UploadFiles = "";
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
if (DataConverter.CBool(info.SpecialSetting))
{
str4 = this.SavePhoto(str4, nodeInfo, common);
}
row["FieldValue"] = str4;
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
row = dataTable.NewRow();
row["FieldName"] = "DefaultPicurl";
row["FieldValue"] = this.m_DefaultPicUrl;
row["FieldType"] = none;
row["FieldLevel"] = 0;
dataTable.Rows.Add(row);
row = dataTable.NewRow();
row["FieldName"] = "UploadFiles";
row["FieldValue"] = this.m_UploadFiles;
row["FieldType"] = none;
row["FieldLevel"] = 0;
dataTable.Rows.Add(row);
continue;
Label_0710:
this.m_ThumbPhoto = "";
if (info.SpecialSetting.IndexOf("$$$") > 0)
{
string[] strArray = info.SpecialSetting.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries);
bool isThumb = DataConverter.CBool(strArray[0]);
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = this.SaveMultiplePhoto(str3, nodeInfo, common, isThumb);
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
if (isThumb)
{
row = dataTable.NewRow();
row["FieldName"] = strArray[1];
row["FieldValue"] = this.m_ThumbPhoto;
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
}
}
continue;
Label_0821:
this.m_FileDown = "";
if (info.SpecialSetting.IndexOf("$$$") > 0)
{
string[] strArray2 = info.SpecialSetting.Split(new string[] { "$$$" }, StringSplitOptions.RemoveEmptyEntries);
bool isDown = DataConverter.CBool(strArray2[1]);
row = dataTable.NewRow();
row["FieldName"] = info.FieldName;
row["FieldValue"] = this.SaveFile(str3, nodeInfo, common, isDown, strArray2[0]);
row["FieldType"] = none;
row["FieldLevel"] = fieldLevel;
dataTable.Rows.Add(row);
if (isDown)
{
row = dataTable.NewRow();
row["FieldName"] = strArray2[2];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -