コード例 #1
0
ファイル: ClientMW.cs プロジェクト: ady2pak/licenta-2012
        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
ファイル: ClientMW.cs プロジェクト: ady2pak/licenta-2012
 internal void closePrivate(closePrivate closePrv)
 {
     privateConversation thisConversation = getWindowByUser(closePrv.whoSent);
     thisConversation.disableControls();
     prvConversations.Remove(thisConversation);
 }