private void OpenLink(string link) { if (link.ToLower().StartsWith("note://")) { var n = VM.Repository.FindNoteByID(link.Substring("note://".Length)); if (n != null) { VM.SelectedNote = n; } else { System.Windows.MessageBox.Show("Note not found"); } } else if (link.ToLower().StartsWith("file://")) { Process.Start(link); } else if (ScintillaHighlighter.IsRawMail(link)) { Process.Start("mailto://" + link); } else { Process.Start(link); } }