private void btnDial_Click(object sender, EventArgs e) { if (!AvPlayer.IsIdle()) { AvPlayer.StopChat(); } else if (OnDial != null) { OnDial.Invoke(this, new AvChatEventArgs((AvChatTypeE)(cboChatType.SelectedIndex))); } }
private void FlashEvent(object sender, _IShockwaveFlashEvents_FlashCallEvent e) { XmlDocument document = new XmlDocument(); document.LoadXml(e.request); XmlAttributeCollection attributes = document.FirstChild.Attributes; String command = attributes.Item(0).InnerText; XmlNodeList list = document.GetElementsByTagName("arguments"); switch (command) { case "ConnectionSuccess": bool isMuted = (list[0].InnerText == "true"); AvPlayer.ChatInitialized(isMuted); break; case "ConnectionFailed": //ChatClient.Write(ClientWindow, ChatMessageTypeE.Error, ClientWindow, Msg.GetMsg(MsgE.InfoNoAvService),0); AvPlayer.StopChat(true); break; case "PlayStreamFailed": AvPlayer.StopChat(true); break; case "OnUnmuted": this.Hide(); break; case "OnError": switch (list[0].InnerText) { case "2126": //MessageBox.Show("Could not connect to server."); break; default: //MessageBox.Show("Error:" + list[0].InnerText); break; } break; default: //MessageBox.Show("Event" + command); break; } }