///public List<ZelloPTTLib.IContact> lstForwardAudio = new List<ZelloPTTLib.IContact>(); String GetSaveFileName(ZelloPTTLib.IMessage pMessage) { StringBuilder sb = new StringBuilder(savePath); sb.Append(@"\msg"); sb.Append((cntMessages).ToString("D4")); ZelloPTTLib.IContact cnt = null; if (pMessage.Incoming) { ZelloPTTLib.IAudioInMessage pAIM = pMessage as ZelloPTTLib.IAudioInMessage; if (pAIM != null) { sb.Append("("); cnt = pAIM.Sender; if (cnt != null) { sb.Append(cnt.Name); } if (pAIM.Author != null) { sb.Append("__"); sb.Append(pAIM.Author.Name); } sb.Append(")"); } } sb.Append(".wav"); return(sb.ToString()); }
void ptt_MessageOutError(ZelloPTTLib.IMessage pMessage, ZelloPTTLib.IContact pContact) { if (pMessage != null && pContact != null) { Debug.WriteLine("Outgoing message " + pMessage.Id + " to " + pContact.Name + " error"); } }
void ptt_AudioMessageInStop(ZelloPTTLib.IAudioInMessage pMessage) { if (pMessage != null) { ZelloPTTLib.IContact pContact = pMessage.Sender; if (pContact != null) { Debug.WriteLine("Incoming message " + pMessage.Id + " from " + pContact.Name + " stops"); } } }
void ptt_MessageOutEnd(ZelloPTTLib.IMessage pMessage, ZelloPTTLib.IContact pContact) { if (pMessage != null && pContact != null) { ZelloPTTLib.IAudioOutMessage pAudioMessage = (ZelloPTTLib.IAudioOutMessage)pMessage; if (pAudioMessage != null) { Debug.WriteLine("Outgoing message " + pMessage.Id + " to " + pContact.Name + " ends, duration " + pAudioMessage.Duration); } } }
void ptt_AudioMessageInStart(ZelloPTTLib.IAudioInMessage pMessage, ref bool pbActivate) { if (pMessage != null) { ZelloPTTLib.IContact pContact = pMessage.Sender; if (pContact != null) { Debug.WriteLine("Incoming message " + pMessage.Id + " from " + pContact.Name + " starts"); } // Activate incoming message if possible pbActivate = true; } }
void ptt_MessageInEnd(ZelloPTTLib.IMessage pMsg) { if (pMsg != null) { ZelloPTTLib.IAudioInMessage pMessage = (ZelloPTTLib.IAudioInMessage)pMsg; if (pMessage != null) { ZelloPTTLib.IContact pContact = pMessage.Sender; if (pContact != null) { Debug.WriteLine("Incoming message " + pMsg.Id + " from " + pContact.Name + " ends, duration " + pMessage.Duration); } } } }
void ptt_MessageInBegin(ZelloPTTLib.IMessage pMsg) { if (pMsg != null) { ZelloPTTLib.IAudioInMessage pMessage = (ZelloPTTLib.IAudioInMessage)pMsg; if (pMessage != null) { ZelloPTTLib.IContact pContact = pMessage.Sender; if (pContact != null) { Debug.WriteLine("Incoming message " + pMsg.Id + " from " + pContact.Name + " begins"); } } } }
void tmUpdateOnlineContacts_Tick(object sender, EventArgs e) { if (bUpdateOnlineContats) { List <ContactInfo> lst = new List <ContactInfo>(10); List <ContactInfo> lstLive = new List <ContactInfo>(10); bUpdateOnlineContats = false; ZelloPTTLib.IContacts cnts = ptt.Contacts; int idxMax = cnts.Count; for (int idx = 0; idx < idxMax; ++idx) { ZelloPTTLib.IContact cnt = cnts.get_Item(idx); ZelloPTTLib.ONLINE_STATUS st = cnt.Status; if (st == ZelloPTTLib.ONLINE_STATUS.OSAVAILABLE || st == ZelloPTTLib.ONLINE_STATUS.OSSTANDBY || st == ZelloPTTLib.ONLINE_STATUS.OSHEADPHONES || st == ZelloPTTLib.ONLINE_STATUS.OSAWAY || st == ZelloPTTLib.ONLINE_STATUS.OSBUSY) { ContactInfo cn = new ContactInfo(); cn.id = cnt.Id; if (cnt.Type == ZelloPTTLib.CONTACT_TYPE.CTCHANNEL) { cn.name = cnt.Name + "(channel)"; } else if (cnt.Type == ZelloPTTLib.CONTACT_TYPE.CTGROUP) { cn.name = cnt.Name + "(group)"; } else { cn.name = cnt.Name; } lst.Add(cn); if (st != ZelloPTTLib.ONLINE_STATUS.OSSTANDBY) { lstLive.Add(cn); } } } reloadList(cbForwardAudio, lstLive); reloadList(cbSendAudioFile, lst); } }