() { new WXContact() { NickName = wXMsgs[0].StrTalker, UserName = wXMsgs[0].StrTalker } };
+ list_sessions.ItemsSource = wXContacts;
+ }
+ }
+ }
+
+ }
+
+ }
+
+ private void btn_analyse_Click(object sender, RoutedEventArgs e)
+ {
+ if(UserReader == null || CurrentUserBakConfig == null)
+ {
+ MessageBox.Show("请先读取数据");
+ return;
+ }
+ Analyse analyse = new Analyse(CurrentUserBakConfig, UserReader);
+ analyse.Show();
}
}
}
diff --git a/Model/WXModel.cs b/Model/WXModel.cs
index 787826c..329f688 100644
--- a/Model/WXModel.cs
+++ b/Model/WXModel.cs
@@ -24,6 +24,16 @@ private void OnPropertyChanged(string propertyName)
}
}
+ public class WXMsgGroup
+ {
+ [Column("StrTalker")]
+ public string UserName { get; set; } = "";
+
+ [Column("MsgCount")]
+ public int MsgCount { get; set; }
+ public string NickName { get; set; } = "";
+ }
+
public class WXUserInfo
{
public string UserName { get; set; } = "";
diff --git a/README.md b/README.md
index 94eea23..28edf65 100644
--- a/README.md
+++ b/README.md
@@ -4,22 +4,25 @@
- ֧��3.9.6.33�汾�����汾���¿���version.json���Ӱ汾�ź͵�ַ��������°汾֧��
- ����ͼƬ����Ƶ����Ƶ
- ����Html�ļ�
+- ֧������Ƶ�ʷ�����ȫ��Ϣ����������
-����Ŀ����ѧϰʹ�ã������˱����Լ����ţ�������������;ʹ�á�
-
+����Ŀ����ѧϰʹ�ã���Ҫ�����˱����Լ����ż�¼���������ڷǷ���;��
����Ŀ�Ͻ����á�
+�����ʲô�õĽ�����������������ʲô���⣬��ӭ��issue��������ء�
#### ʹ��
1.���ţ�����¼��
2.�ڹ������Ϸ����������ѡ��Ҫ�����Ĺ�������
-3.ѡ�иոմ����Ĺ�������������ܡ����統ǰ��ţ���ѡ���Ӧ���Ž��н��գ�
-4.ѡ�иոմ����Ĺ������������ȡ
+3.���½��ᵯ��Handle64��Э��˵����ͬ�⼴�ɡ���û��������ʾ�����µ�һ���½�����
+4.ѡ�иոմ����Ĺ�������������ܡ����統ǰ��ţ���ѡ���Ӧ���Ž��н��գ�
+5.ѡ�иոմ����Ĺ������������ȡ
����ʹ�ðɣ�
#### ע��
+����Ŀ����.NET��������Ҫ��װ.NET Desktop Runtime����δ��װ��˫��EXEʱ����ʾ��
���ʹ�ù����з�����������ɾ����������һ�£��������������û���������Ŀ¼�����ɵ�md5�ļ��С�
-�ѽ��յĹ���������ֱ�Ӷ�ȡ
-�ٴ�ǿ�����������˱����Լ���ʹ��
+�ѽ��ܵĹ���������ֱ�Ӷ�ȡ��
+�ٴ�ǿ������Ҫ���ڸ��˱����Լ���ʹ�ã��������ڷǷ���;���Ͻ����ã�
#### �ο�/����
����վ�ڴ����ǵļ������ɵ���Ŀ������Ŀ �ο�/���� ������ ��Ŀ/���� �ڴ��롣
diff --git a/WXUserReader.cs b/WXUserReader.cs
index 793a000..1b349e6 100644
--- a/WXUserReader.cs
+++ b/WXUserReader.cs
@@ -52,7 +52,7 @@ public void LoadDB(string path)
return con.Query(query);
}
- public List? GetWXMsgs(string uid)
+ public List? GetWXMsgs(string uid,string msg = "")
{
List tmp = new List();
for (int i = 0; i <= 99; i++)
@@ -63,8 +63,23 @@ public void LoadDB(string path)
if (con == null)
return tmp;
- string query = "select * from MSG where StrTalker=?";
- List wXMsgs = con.Query(query, uid);
+ List? wXMsgs = null;
+ if (msg == "")
+ {
+ string query = "select * from MSG where StrTalker=?";
+ wXMsgs = con.Query(query, uid);
+ }
+ else if(uid == "")
+ {
+ string query = "select * from MSG where StrContent like ?";
+ wXMsgs = con.Query(query, string.Format("%{0}%", msg));
+ }
+ else
+ {
+ string query = "select * from MSG where StrTalker=? and StrContent like ?";
+ wXMsgs = con.Query(query, uid, string.Format("%{0}%", msg));
+ }
+
foreach (WXMsg w in wXMsgs)
{
tmp.Add(w);
@@ -73,7 +88,6 @@ public void LoadDB(string path)
}
return tmp;
}
-
public WXSessionAttachInfo? GetWXMsgAtc(WXMsg msg)
{
SQLiteConnection con = DBInfo["MultiSearchChatMsg"];
@@ -101,7 +115,6 @@ public void LoadDB(string path)
else
return null;
}
-
public WXMediaMsg? GetVoiceMsg(WXMsg msg)
{
for (int i = 0; i <= 99; i++)
@@ -120,7 +133,6 @@ public void LoadDB(string path)
}
return null;
}
-
public string? GetAttachment(WXMsgType type, WXMsg msg)
{
if (UserBakConfig == null)
@@ -182,7 +194,7 @@ public void LoadDB(string path)
if (path == null)
return null;
- // 该相对路径
+ // 改相对路径
path = path.Replace(UserBakConfig.UserWorkspacePath + "\\", "");
return path;
@@ -217,6 +229,31 @@ public void LoadDB(string path)
}
return file_path;
}
+ public List GetWXMsgGroup()
+ {
+ List g = new List();
+ for (int i = 0; i <= 99; i++)
+ {
+ if (DBInfo.ContainsKey("MSG" + i.ToString()))
+ {
+ SQLiteConnection con = DBInfo["MSG" + i.ToString()];
+ if (con == null)
+ return g;
+
+ string query = "select StrTalker,Count(localId) as MsgCount from MSG GROUP BY StrTalker";
+ List wXMsgs = con.Query(query);
+ foreach (WXMsgGroup w in wXMsgs)
+ {
+ WXMsgGroup? tmp = g.Find(x => x.UserName == w.UserName);
+ if (tmp == null)
+ g.Add(w);
+ else
+ tmp.MsgCount += g.Count;
+ }
+ }
+ }
+ return g;
+ }
}
public enum WXMsgType
diff --git a/WechatPCMsgBakTool.csproj b/WechatPCMsgBakTool.csproj
index 8bbe8f2..5af2826 100644
--- a/WechatPCMsgBakTool.csproj
+++ b/WechatPCMsgBakTool.csproj
@@ -6,9 +6,9 @@
enable
true
True
- 0.3.1.0
- 0.3.1.0
- 0.3.1.0
+ 0.4.0.0
+ 0.4.0.0
+ 0.4.0.0