Browse Source

Connected the program to skype.

master
jrtechs 9 years ago
parent
commit
2997e9adb4
3 changed files with 80 additions and 0 deletions
  1. +3
    -0
      Skype History Viewer/Form1.Designer.cs
  2. +66
    -0
      Skype History Viewer/Form1.cs
  3. +11
    -0
      Skype History Viewer/Skype History Viewer.csproj

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

@ -62,6 +62,7 @@
this.cmdExportAll.TabIndex = 2;
this.cmdExportAll.Text = "Export All To Text File";
this.cmdExportAll.UseVisualStyleBackColor = true;
this.cmdExportAll.Click += new System.EventHandler(this.cmdExportAll_Click);
//
// cmdExport
//
@ -71,6 +72,7 @@
this.cmdExport.TabIndex = 3;
this.cmdExport.Text = "Export Selected to Text File";
this.cmdExport.UseVisualStyleBackColor = true;
this.cmdExport.Click += new System.EventHandler(this.cmdExport_Click);
//
// cmdAdd
//
@ -80,6 +82,7 @@
this.cmdAdd.TabIndex = 4;
this.cmdAdd.Text = "View History for Selected User";
this.cmdAdd.UseVisualStyleBackColor = true;
this.cmdAdd.Click += new System.EventHandler(this.cmdAdd_Click);
//
// cmdClear
//

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

@ -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
{
}
}
}
}

+ 11
- 0
Skype History Viewer/Skype History Viewer.csproj View File

@ -79,6 +79,17 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<COMReference Include="SKYPE4COMLib">
<Guid>{03282B5D-B38F-469D-849A-09B0A7F4881B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Loading…
Cancel
Save