How to get Unseen MessageListRequest?

Mar 8, 2010 at 10:42 AM

Hello,

I know there was already a previous Discussion regarding Unseen Message in the ConsoleTest and have been unsuccessfully experimenting with the

code in InterIMAPGUITest for some hours to list the Unseen Msg UIDs in the messageListBox.

Can anyone show me the right direction to implement this?

Thank you.

 

Coordinator
Mar 26, 2010 at 12:44 PM
Hello, The async code currently has a nearly completed request that will generate a list of new messages for all folders in the account. It's called NewMessageRequest.cs and it's in the Common/Requests folder. The method is not complete as it doesn't actually surface the resulting message list, but that can be changed rather easily. You could also modify it to accept a folder name, IFolder object, or array of IFolder objects so that you can narrow down the number of folders you are interested in checking. This method is also not currently asynchronous, so using it in a GUI app will block the GUI thread while it is running. In the future i will be adding a formal async new message request that will solve this problem. You could also modify the NewMessageRequest class as it is and add your own RequestCompletedCallback event and fire that event in the delegate of the SearchRequest object. Just be sure to remove the while loop that checks for the folder count so that you don't block the UI. In your event handler, you can get the folder that it just checked like this: IFolder folder = req.PreCommand.ParameterObjs[0] as IFolder;
Nov 29, 2010 at 8:54 PM
Edited Nov 30, 2010 at 3:55 PM

--future comment to come --