void tmplChatBox_LinkClicked(ChatBox sender, string id, string url) { if (!url.Contains(":")) { return; } string action = url.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]; string argument = url.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]; ChatSession tmplChatSession = null; switch (action) { case "ft-accept": sender.SetLink(id, "", true); myClientForm.FileTransferProcessAccept(sender.JID, argument); break; case "ft-decline": sender.SetLink(id, "", true); myClientForm.FileTransferProcessCancel(sender.JID, argument); break; case "ar-open": tmplChatSession = (ChatSession)myChatSessions[myChatSessionsTabControl.SelectedTab.Tag]; if (tmplChatSession != null) { myClientForm.OpenArchiveWindow(tmplChatSession.JabberUser); } break; case "vc-accept": sender.SetLink(id, "", true); tmplChatSession = (ChatSession)myChatSessions[myChatSessionsTabControl.SelectedTab.Tag]; if (tmplChatSession != null) { myClientForm.VideoSessionProcessInviationResult(sender.JID, argument, true); } break; case "vc-decline": sender.SetLink(id, "", true); tmplChatSession = (ChatSession)myChatSessions[myChatSessionsTabControl.SelectedTab.Tag]; if (tmplChatSession != null) { myClientForm.VideoSessionProcessInviationResult(sender.JID, argument, false); } break; } }