-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwndPrivateChat.cs
44 lines (39 loc) · 1.07 KB
/
wndPrivateChat.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Media;
namespace WalkieTalkie
{
public partial class wndPrivateChat : Form
{
private int uniqueID;
private User remoteUser;
public wndPrivateChat(int uID, IPEndPoint eP, User rUser)
{
uniqueID = uID;
remoteUser = rUser;
InitializeComponent();
this.Text = remoteUser.ToString() + " Private Chat";
}
public int UniqueID
{
get { return uniqueID; }
}
public User RemoteUser
{
get { return remoteUser; }
}
public wndPrivateChat FindActiveChatSession(List<wndPrivateChat> activeSessions, IPAddress destAddress)
{
foreach (wndPrivateChat window in activeSessions)
if (destAddress == window.remoteUser.IP)
return window;
return null;
}
}
}