Skip to content

Commit

Permalink
1.0.0.44
Browse files Browse the repository at this point in the history
  • Loading branch information
x-nas committed Nov 17, 2024
1 parent ce9082a commit b5ecca7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
8 changes: 4 additions & 4 deletions WPELibrary/Lib/Socket_Cache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ public static void AddToFilterList_New(string sFName, Socket_Cache.SocketPacket.

string sFSearch = Socket_Operation.GetFilterString_ByBytes(bBuffer);

Socket_Cache.FilterList.AddFilter_New(sFName, false, string.Empty, FilterMode, FilterAction, FilterFunction, FilterStartFrom, sFSearch, string.Empty);
Socket_Cache.FilterList.AddFilter_New(false, sFName, false, string.Empty, FilterMode, FilterAction, FilterFunction, FilterStartFrom, sFSearch, string.Empty);
Socket_Operation.ShowMessageBox(String.Format(MultiLanguage.GetDefaultLanguage(MultiLanguage.MutiLan_27), sFName));
}
catch (Exception ex)
Expand All @@ -607,15 +607,15 @@ public static void AddFilter_New()
Socket_Cache.Filter.FilterFunction FilterFunction = new Socket_Cache.Filter.FilterFunction(true, true, true, true, false, false, false, false);
Socket_Cache.Filter.FilterStartFrom FilterStartFrom = Socket_Cache.Filter.FilterStartFrom.Head;

AddFilter_New(string.Empty, false, string.Empty, FilterMode, FilterAction, FilterFunction, FilterStartFrom, string.Empty, string.Empty);
AddFilter_New(false, string.Empty, false, string.Empty, FilterMode, FilterAction, FilterFunction, FilterStartFrom, string.Empty, string.Empty);
}
catch (Exception ex)
{
Socket_Operation.DoLog(MethodBase.GetCurrentMethod().Name, ex.Message);
}
}

public static void AddFilter_New(string FName, bool bAppointHeader, string FilterHeaderContent, Socket_Cache.Filter.FilterMode FilterMode, Socket_Cache.Filter.FilterAction FilterAction, Socket_Cache.Filter.FilterFunction FilterFunction, Socket_Cache.Filter.FilterStartFrom FilterStartFrom, string FSearch, string FModify)
public static void AddFilter_New(bool IsEnable, string FName, bool bAppointHeader, string FilterHeaderContent, Socket_Cache.Filter.FilterMode FilterMode, Socket_Cache.Filter.FilterAction FilterAction, Socket_Cache.Filter.FilterFunction FilterFunction, Socket_Cache.Filter.FilterStartFrom FilterStartFrom, string FSearch, string FModify)
{
try
{
Expand All @@ -626,7 +626,7 @@ public static void AddFilter_New(string FName, bool bAppointHeader, string Filte
FName = MultiLanguage.GetDefaultLanguage(MultiLanguage.MutiLan_50) + " " + FNum.ToString();
}

Socket_FilterInfo sc = new Socket_FilterInfo(false, FNum, FName, bAppointHeader, FilterHeaderContent, FilterMode, FilterAction, FilterFunction, FilterStartFrom, FSearch, FModify);
Socket_FilterInfo sc = new Socket_FilterInfo(IsEnable, FNum, FName, bAppointHeader, FilterHeaderContent, FilterMode, FilterAction, FilterFunction, FilterStartFrom, FSearch, FModify);

lstFilter.Add(sc);
}
Expand Down
11 changes: 9 additions & 2 deletions WPELibrary/Lib/Socket_Operation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ public static bool SaveFilterList(string FilePath, int FilterIndex)

for (int i = Start; i < End; i++)
{
string sIsEnable = Socket_Cache.FilterList.lstFilter[i].IsEnable.ToString();
string sFNum = Socket_Cache.FilterList.lstFilter[i].FNum.ToString();
string sFName = Socket_Cache.FilterList.lstFilter[i].FName;
string sFAppointHeader = Socket_Cache.FilterList.lstFilter[i].AppointHeader.ToString();
Expand All @@ -1646,6 +1647,10 @@ public static bool SaveFilterList(string FilePath, int FilterIndex)
XmlElement xeFilter = doc.CreateElement("Filter");
xeFilterList.AppendChild(xeFilter);

XmlElement xeIsEnable = doc.CreateElement("IsEnable");
xeIsEnable.InnerText = sIsEnable;
xeFilter.AppendChild(xeIsEnable);

XmlElement xeFNum = doc.CreateElement("Num");
xeFNum.InnerText = sFNum;
xeFilter.AppendChild(xeFNum);
Expand Down Expand Up @@ -1754,6 +1759,7 @@ public static bool LoadFilterList(string FilePath)

foreach (XmlNode xnFilter in xnFilterList.ChildNodes)
{
string sIsEnable = xnFilter.SelectSingleNode("IsEnable").InnerText;
string sFNum = xnFilter.SelectSingleNode("Num").InnerText;
string sFName = xnFilter.SelectSingleNode("Name").InnerText;
string sFAppointHeader = xnFilter.SelectSingleNode("AppointHeader").InnerText;
Expand All @@ -1765,14 +1771,15 @@ public static bool LoadFilterList(string FilePath)
string sFSearch = xnFilter.SelectSingleNode("Search").InnerText;
string sFModify = xnFilter.SelectSingleNode("Modify").InnerText;

bool bIsEnable = bool.Parse(sIsEnable);
bool bAppointHeader = bool.Parse(sFAppointHeader);

Socket_Cache.Filter.FilterMode FilterMode = GetFilterMode_ByString(sFMode);
Socket_Cache.Filter.FilterAction FilterAction = GetFilterAction_ByString(sFAction);
Socket_Cache.Filter.FilterFunction FilterFunction = GetFilterFunction_ByString(sFFunction);
Socket_Cache.Filter.FilterStartFrom FilterStartFrom = GetFilterStartFrom_ByString(sFStartFrom);

Socket_Cache.FilterList.AddFilter_New(sFName, bAppointHeader, sFHeaderContent, FilterMode, FilterAction, FilterFunction, FilterStartFrom, sFSearch, sFModify);
Socket_Cache.FilterList.AddFilter_New(bIsEnable, sFName, bAppointHeader, sFHeaderContent, FilterMode, FilterAction, FilterFunction, FilterStartFrom, sFSearch, sFModify);
}
}
}
Expand Down Expand Up @@ -2022,7 +2029,7 @@ public static int CopyFilter_ByFilterIndex(int iFIndex)
string FSearch = Socket_Cache.FilterList.lstFilter[iFIndex].FSearch;
string FModify = Socket_Cache.FilterList.lstFilter[iFIndex].FModify;

Socket_Cache.FilterList.AddFilter_New(FName, bAppointHeader, HeaderContent, FMode, FAction, FFunction, FStartFrom, FSearch, FModify);
Socket_Cache.FilterList.AddFilter_New(false, FName, bAppointHeader, HeaderContent, FMode, FAction, FFunction, FStartFrom, FSearch, FModify);

iReturn = Socket_Cache.FilterList.lstFilter.Count - 1;
}
Expand Down
2 changes: 1 addition & 1 deletion WPELibrary/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.44")]
[assembly: AssemblyVersion("1.0.0.45")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion WinsockPacketEditor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.0.0.44")]
[assembly: AssemblyVersion("1.0.0.45")]
//[assembly: AssemblyVersion("1.0.0.21")]
//[assembly: AssemblyFileVersion("1.0.0.21")]
2 changes: 1 addition & 1 deletion WinsockPacketEditor/WinsockPacketEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PublisherName>X-NAS</PublisherName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>44</ApplicationRevision>
<ApplicationRevision>45</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
Expand Down

0 comments on commit b5ecca7

Please sign in to comment.