Пример #1
0
        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]);
            }
        }