예제 #1
0
        private void prvConvWindow_FormClosed(object sender, FormClosedEventArgs e)
        {
            //TODO : filter send to server by ifremoved from list<>
            privateConversation _temp = (privateConversation)sender;

            _temp.Dispose();

            for (int index = 0; index < prvConversations.Count; index++)
            {
                if (prvConversations[index] == _temp)
                {
                    prvConversations.Remove(_temp);

                    closePrivate closePrv = new closePrivate();
                    closePrv.setWhoSent(username);
                    closePrv.setToWho(_temp.withWho);

                    dataTypes objectToSend = new dataTypes();
                    objectToSend.setType(typeof(closePrivate).ToString());
                    objectToSend.setObject(closePrv);

                    netServ.sendObjectToServer(objectToSend);

                    break;
                }
            }
        }
예제 #2
0
        internal void closePrivate(closePrivate closePrv)
        {
            privateConversation thisConversation = getWindowByUser(closePrv.whoSent);

            thisConversation.disableControls();
            prvConversations.Remove(thisConversation);
        }
예제 #3
0
        private void showPrivateWindow(object data)
        {
            privateConversation thisConversation = new privateConversation((string)data, this, netServ);

            prvConversations.Add(thisConversation);

            thisConversation.FormClosed += new FormClosedEventHandler(prvConvWindow_FormClosed);
            thisConversation.Text        = "PRV: " + (string)data;
            thisConversation.ShowDialog();
        }
예제 #4
0
        private void showPrivateWindow(object data)
        {
            privateConversation thisConversation = new privateConversation((string)data, this, netServ);
            prvConversations.Add(thisConversation);

            thisConversation.FormClosed += new FormClosedEventHandler(prvConvWindow_FormClosed);
            thisConversation.Text = "PRV: " + (string)data;
            thisConversation.ShowDialog();
        }
예제 #5
0
        internal void pushPrivateToWindow(privateMessage prvMsg)
        {
            privateConversation thisConv = getWindowByUser(prvMsg.whoSent);

            thisConv.appendText("[" + prvMsg.whoSent + "] " + prvMsg.message);
        }