public ChangePassword(ProfileInfo details, SocketClient client) { InitializeComponent(); this.currentPassword = details.password; myClient = client; userDetails = details; }
private void openLoginScreen() { myClient.CloseSocket(true); myClient = new SocketClient("127.0.0.1", 20000, false, ((char)2).ToString(), ((char)3).ToString()); startupScreen = new LoginScreen(myClient, this); startupScreen.Show(); startupScreen.FormClosed += new FormClosedEventHandler(userLoggedIn); }
public RequestReplyWindow(SocketClient client, long myUID, long friendsUID, string friendName) { InitializeComponent(); this.myUID = myUID; friendUID = friendsUID; this.friendName = friendName; myClient = client; label.Text = friendName + " wants to be your friend. You can accept or decline the request by pressing the buttons below"; }
public ChatWindow(SocketClient client, long myUID, long friendsUID, string friendName) { InitializeComponent(); this.myUID = myUID; friendUID = friendsUID; this.friendName = friendName; myClient = client; label1.Text = friendName; synthesizer = new SpeechSynthesizer(); }
public void CreateSocket() { SocketHandler.SocketServer mySockets = new SocketHandler.SocketServer(0, 1000); SocketHandler.SocketClient clientSocket = null; mySockets.Init(); mySockets.Start(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"), 20000)); clientSocket = new SocketHandler.SocketClient("127.0.0.1", 20000, false, ((char)2).ToString(), ((char)3).ToString()); System.Threading.Thread.Sleep(1000); Assert.AreEqual(true, clientSocket.Connected); }
public CreateGroupForm(List<messageSpecs.FriendStatusMessage> _friendsList, SocketClient myClient, long UserID) { InitializeComponent(); var Online = messageSpecs.FriendStatusMessage.LoggedOnStatus.Online; var Offline = messageSpecs.FriendStatusMessage.LoggedOnStatus.Offline; this.friendsList = _friendsList.Where(item => (item.UserStatus == Online) || (item.UserStatus == Offline)).ToList(); this._myClient = myClient; this.UserID = UserID; ListBoxLoad(); }
public LoginScreen(SocketClient client, HomePage mainScreen) { InitializeComponent(); myClient = client; this.mainScreen = mainScreen; tmrMessages.Tick += new EventHandler(clientStatusCheck); tmrMessages.Start(); if (!string.IsNullOrEmpty(Properties.Settings.Default.UserName)) { textBoxUserName.Text = Properties.Settings.Default.UserName; textBoxPassword.Text = Properties.Settings.Default.Password; } }
public AddContacts(SocketClient client, ProfileInfo profileInfo) { myClient = client; userInfo = profileInfo; InitializeComponent(); }
public void CreateUser() { SocketHandler.SocketServer mySockets = new SocketHandler.SocketServer(0, 1000); SocketHandler.SocketClient clientSocket = null; mySockets.Init(); mySockets.Start(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"), 20000)); clientSocket = new SocketHandler.SocketClient("127.0.0.1", 20000, false, ((char)2).ToString(), ((char)3).ToString()); messageSpecs.UserCreationMessage myCreationMessage = new messageSpecs.UserCreationMessage(); myCreationMessage.EmailAddress = "*****@*****.**"; myCreationMessage.UserName = "******"; myCreationMessage.FirstName = "Cody"; myCreationMessage.LastName = "Eidsness"; clientSocket.Send(myCreationMessage.getMessageString()); for(int i = 1;i<=5;i++) { System.Threading.Thread.Sleep(1000); while (clientSocket.messageQueue.Count > 0) { if (clientSocket.messageQueue.Dequeue().Substring(0, 5) == UserCreationMessage.CreateUserMessageType) { return; } } } Assert.Fail("Never got login message back"); }
public void AddContact() { SocketHandler.SocketServer mySockets = new SocketHandler.SocketServer(0, 1000); SocketHandler.SocketClient clientSocket = null; mySockets.Init(); mySockets.Start(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"), 20000)); clientSocket = new SocketHandler.SocketClient("127.0.0.1", 20000, false, ((char)2).ToString(), ((char)3).ToString()); messageSpecs.AddContactMessage x = new messageSpecs.AddContactMessage(); x.sender = "10006"; x.receiver = "2"; clientSocket.Send(x.getMessageString()); for (int i = 1; i <= 5; i++) { System.Threading.Thread.Sleep(1000); while (clientSocket.messageQueue.Count > 0) { if (clientSocket.messageQueue.Dequeue().Substring(0, 5) == AddContactMessage.AddContactMessageType) return; } } Assert.Fail("Never got login message back"); }
public ProfileDetails(SocketClient client) { InitializeComponent(); myClient = client; }
public ChangeUserSettings(ProfileInfo details, SocketClient client) { InitializeComponent(); myClient = client; userDetails = details; }