/// <summary>Adds the phone node.</summary>
 /// <param name="phoneName">Name of the phone.</param>
 /// <param name="path">The path of phone folder.</param>
 /// <param name="format">The format of messages within folder.</param>
 private void AddPhoneNode(string phoneName, string path, MessageFormat format)
 {
     MobilePhone phone = new MobilePhone(phoneName, format, path);
     TreeNode node = tvParents.Nodes[0].Nodes.Add(phoneName);
     node.Tag = phone;
     phone.MessagesRetrieved += new EventHandler(MessageFolder_MessagesRetrieved);
     phone.MessagesRetrievalProgress += new EventHandler<MessageFolder.MessagesRetrievalProgressEventArgs>(MessageFolder_MessagesRetrieved);
     tvParents.SelectedNode = node;//select each node to add the folders
 }
 /// <summary>Re-populates initialises the phone using the selected directory.</summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void folderSelector_SelectionChanged(object sender, EventArgs e)
 {
     string fullPath = folderSelector.SelectionName;
     string phoneName = System.IO.Path.GetFileName(fullPath);
     string folderPath = System.IO.Path.GetDirectoryName(fullPath);
     phone = new MobilePhone(phoneName, format, folderPath);
     phone.MessagesRetrieved += new EventHandler(phone_MessagesRetrieved);
     phone.RetrieveMessages(".");
 }