Browse Source

Export selected user to text file added

master
jrtechs 8 years ago
parent
commit
bcf0f2437d
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      Skype History Viewer/Form1.cs

+ 21
- 0
Skype History Viewer/Form1.cs View File

@ -99,7 +99,28 @@ namespace Skype_History_Viewer
}
else
{
//exports selected users skype history
String name = lstUsers.GetItemText(lstUsers.SelectedItem);
System.IO.StreamWriter file = new System.IO.StreamWriter("Skype"+name+"History.txt");
String line = "";
foreach (Chat oChat in skype.Chats)
{
foreach (ChatMessage oMessage in oChat.Messages)
{
if(oMessage.Sender.FullName.Equals(name))
{
if (chTime.Checked) line = oMessage.Timestamp.ToString() + " ";
if (chUser.Checked) line += oMessage.Sender.FullName + " ";
line += oMessage.Body;
file.WriteLine(line);
line = "";
}
}
}
file.Close();
}
}

Loading…
Cancel
Save