private void SaveFriendDict()
        {
            foreach (var file in IOTool.GetFiles(GetContactsDirPath()))
            {
                file.Delete();
            }

            foreach (var userID in _friendDict.Keys)
            {
                string filePath = GetContactsDirPath() + "/" + userID;
                IOTool.SerializeToFile <UserItem>(filePath, _friendDict[userID]);
            }
        }
示例#2
0
        private void SaveLogDict()
        {
            foreach (var file in IOTool.GetFiles(GetChatDirPath()))
            {
                file.Delete();
            }

            foreach (var userID in _chatLogDict.Keys)
            {
                string filePath = GetChatDirPath() + "/" + userID;
                IOTool.SerializeToFile <ChatLog>(filePath, _chatLogDict[userID]);
            }
        }
示例#3
0
        private void SaveGroupDict()
        {
            foreach (var file in IOTool.GetFiles(GetGroupDirPath()))
            {
                file.Delete();
            }

            foreach (var groupID in _groupDict.Keys)
            {
                string filePath = GetGroupDirPath() + "/" + groupID;
                IOTool.SerializeToFile <GroupItem>(filePath, _groupDict[groupID]);
            }
        }