public void DisplayMessage(DotMSN.Message message, string displayName) { FontStyle fontStyle; switch(message.Decorations) { case DotMSN.MSNTextDecorations.Bold: fontStyle = FontStyle.Bold; break; case DotMSN.MSNTextDecorations.Italic: fontStyle = FontStyle.Italic; break; case DotMSN.MSNTextDecorations.Strike: fontStyle = FontStyle.Strikeout; break; case DotMSN.MSNTextDecorations.Underline: fontStyle = FontStyle.Underline; break; case DotMSN.MSNTextDecorations.None: default: fontStyle = FontStyle.Regular; break; } Font font = new Font(message.Font, TextFont.Size, fontStyle); DisplayMessage(message.Text, message.Color, displayName, false, font); }
public void SetConversation(DotMSN.Conversation conv) { ShowConnected(); this._conversation = conv; if(conv != null) { conv.AllContactsLeft += new DotMSN.Conversation.AllContactsLeftHandler(conv_AllContactsLeft); conv.ConnectionClosed += new DotMSN.Conversation.ConnectionClosedHandler(conv_ConnectionClosed); conv.ContactJoin += new DotMSN.Conversation.ContactJoinHandler(conv_ContactJoin); conv.ContactLeave += new DotMSN.Conversation.ContactLeaveHandler(conv_ContactLeave); conv.MessageReceived += new DotMSN.Conversation.MessageReceivedHandler(conv_MessageReceived); conv.UserTyping += new DotMSN.Conversation.UserTypingHandler(conv_UserTyping); conv.FileTransferHandler.InvitationReceived += new DotMSN.FileTransferHandler.FileTransferInvitationHandler(FileTransferHandler_InvitationReceived); this.user.DisplayName = conv.Messenger.Owner.Mail; clientLeft = true; } else { this.user.DisplayName = "NULL"; clientLeft = false; } }
private void fileTransfer_Started(DotMSN.FileTransfer sender, EventArgs e) { messageFormOwner.DisplayMessage("fileTransfer_Started: " + sender.FileSize); timer.Start(); UpdateDataEvent(); }
private void fileTransfer_TransferCancelled(DotMSN.FileTransfer sender, DotMSN.FileTransferCancelledEventArgs e) { messageFormOwner.DisplayMessage("fileTransfer_TransferCancelled: " + e.CancelCode); timer.Stop(); UpdateDataEvent(); }
private void fileTransfer_Progressing(DotMSN.FileTransfer sender, EventArgs e) { if((this.recivedLastTick++ % 1000) == 0) { UpdateDataEvent(); //messageFormOwner.DisplayMessage("fileTransfer_Progressing: " + sender.BytesProcessed); } }
private void fileTransfer_Completed(DotMSN.FileTransfer sender, EventArgs e) { messageFormOwner.DisplayMessage("File Completed"); timer.Stop(); UpdateDataEvent(); }
private void fileTransfer_Accepted(DotMSN.FileTransfer sender, EventArgs e) { messageFormOwner.DisplayMessage("File Accepted"); UpdateDataEvent(); }
public MSNFileTransfer(DotMSN.FileTransfer initFileTransfer, MessageForm initForm) { msnFileTransfer = initFileTransfer; msnFileTransfer.Accepted += new DotMSN.FileTransfer.FileTransferHandler(fileTransfer_Accepted); msnFileTransfer.Completed += new DotMSN.FileTransfer.FileTransferHandler(fileTransfer_Completed); msnFileTransfer.InvitationCancelled += new DotMSN.FileTransfer.FileTransferInvitationCancelledHandler(fileTransfer_InvitationCancelled); msnFileTransfer.Progressing += new DotMSN.FileTransfer.FileTransferHandler(fileTransfer_Progressing); msnFileTransfer.Started += new DotMSN.FileTransfer.FileTransferHandler(fileTransfer_Started); msnFileTransfer.TransferCancelled += new DotMSN.FileTransfer.FileTransferCancelledHandler(fileTransfer_TransferCancelled); messageFormOwner = initForm; }
public DGPContact(DotMSN.Contact msnContact) { this._msnContact = msnContact; }