public void Start_Call() { if (AppTimer.search_timer_by_func(T_Check_AutoCall) == null) { Start_Auto_Call(); } }
public void Stop_Call() { if (AppTimer.search_timer_by_func(T_Check_AutoCall) != null) { Stop_Auto_Call(); AgeingCall.index = 0; } }
public bool CheckStateAgeing() { if (AppTimer.search_timer_by_func(T_Check_AutoCall) == null) { return(false); } else { return(true); } }
public void AutoCall() { DataBase.DevStruct dev; if (AgeingCall.index > AgeingCall.callList.Count() - 1) { AgeingCall.index = 0; } dev = AgeingCall.callList[AgeingCall.index++]; CallTabPage.talkback.audioDeal.projName = dev.Header; string Calling; string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); DataBase.recordStruct.TimeStart = time; DataBase.recordStruct.dev = dev; DataBase.recordStruct.CallPeriodSet = AgeingCall.CallTime; switch (dev.DeviceType) { case "IS": Calling = "呼叫" + dev.DeviceType + ":" + dev.DeviceNum; Call_IndoorStation(dev.DeviceNum); AppTimer.start_timer(AppTimer.register_timer(null, T_Handup, 0, null, AgeingCall.CallTime * 800, 1)); break; case "GU": Calling = "呼叫" + dev.DeviceType + ":" + dev.DeviceNum; Call_GU(dev.DeviceNum); AppTimer.start_timer(AppTimer.register_timer(null, T_Handup, 0, null, AgeingCall.CallTime * 800, 1)); break; case "MiniOS": Calling = "监视" + dev.DeviceType + ":" + dev.DeviceNum; Monitor_MiniOS(dev.DeviceNum); AppTimer.start_timer(AppTimer.register_timer(null, T_Pick, 0, null, 4000, 1)); break; case "OS": Calling = "监视" + dev.DeviceType + ":" + dev.DeviceNum; Monitor_OS(dev.DeviceNum); AppTimer.start_timer(AppTimer.register_timer(null, T_Pick, 0, null, 4000, 1)); break; default: break; } }
public CallTabPage() { InitializeComponent(); AppTimer.app_timer_init(); Remoter.Remoter_init(); LocalCfg.Addr = new byte[] { (byte)VsProtocol.DevType.DEV_INDOORPHONE, 1, 1, 8, 8, 1 }; VsProtocol.Change_IDToIP(LocalCfg.Addr, LocalCfg.IP); talkback = new Talkback(); talkback.talk_back_init(); talkback.udpDeal.app_udp_init(8300); talkback.udpDeal.set_multi_udp_recv_fun(UdpApp.udp_deal); talkback.videoDeal.video_manage.video_recv_callback = videoCallback; UdpApp.UdpAppInit(talkback); label1.Text = new IPAddress(LocalCfg.IP).ToString(); Output.outObject = richTextBox1; InitSetting(); }
static void T_Pick(int argc, object argv) { CallTabPage.talkback.pick(); //先摘机 AppTimer.start_timer(AppTimer.register_timer(null, T_Handup, 0, null, AgeingCall.TalkTime * 800, 1)); //再定时挂机 }
public void Start_Auto_Call() { AppTimer.start_timer(AppTimer.register_timer(null, T_Check_AutoCall, 0, null, 2500, 0)); AgeingCall.index = 0; }
public void Stop_Auto_Call() { AppTimer.stop_timer(AppTimer.search_timer_by_func(T_Check_AutoCall)); }