|
|
@ -7,14 +7,80 @@ using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Windows.Forms; |
|
|
|
using SKYPE4COMLib; |
|
|
|
|
|
|
|
namespace Skype_History_Viewer |
|
|
|
{ |
|
|
|
public partial class FrmMain : Form |
|
|
|
{ |
|
|
|
private Boolean connected = false; |
|
|
|
private Skype skype = new Skype(); |
|
|
|
|
|
|
|
public FrmMain() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
connected = connectToSkype(); |
|
|
|
} |
|
|
|
|
|
|
|
private void cmdAdd_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
if(!connected) |
|
|
|
{ |
|
|
|
errorMessage(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void errorMessage() |
|
|
|
{ |
|
|
|
connected = connectToSkype(); |
|
|
|
if(!connected) |
|
|
|
{ |
|
|
|
MessageBox.Show("Could not connect to skype, please make sure that skype is running and this plugin is allowed."); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Boolean connectToSkype() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
//attaches the program to skype
|
|
|
|
skype.Attach(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
catch |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void cmdExport_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
if (!connected) |
|
|
|
{ |
|
|
|
errorMessage(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void cmdExportAll_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
if (!connected) |
|
|
|
{ |
|
|
|
errorMessage(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |