| | |
| | | try |
| | | { |
| | | listESVideoInfo = VideoSend.GetVideoInfoList(video); |
| | | listCall = getCall(video.id); |
| | | listCall = GetCall(video.id); |
| | | } |
| | | catch |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="action">回调函数</param> |
| | | /// <param name="frame">log父控件</param> |
| | | public void getVideo(Action<VideoClouds> action, FrameLayout frame, bool tag) |
| | | /// <param name="tag">是否要显示log(默认显示tag=true)</param> |
| | | public void GetVideo(Action<VideoClouds> action, FrameLayout frame, bool tag) |
| | | { |
| | | VideoClouds videoObj =null; |
| | | ThreadSend(null, (responsePackNew) => |
| | | { |
| | | try |
| | | { |
| | | var str = responsePackNew.Data.ToString(); |
| | | var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); |
| | | videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); |
| | | action(videoObj); |
| | | } |
| | | catch { } |
| | | catch { |
| | | action(videoObj); |
| | | } |
| | | }, "获取可视对讲", "fram", frame, null, tag); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取历史通话记录 |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | public List<CallView> getCall(string id) |
| | | public List<CallView> GetCall(string id) |
| | | { |
| | | List<CallView> callViewList = new List<CallView>(); |
| | | try |
| | |
| | | } |
| | | catch { } |
| | | return callViewList; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 发送命令线程 |
| | | /// </summary> |
| | |
| | | /// <param name="tag">是否要显示log</param> |
| | | public static void ThreadSend(VideoClouds videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true) |
| | | { |
| | | |
| | | //加载log |
| | | Loading loading = new Loading(); |
| | | if (view == "dialog") |
| | |
| | | /// <summary> |
| | | /// 随机密码6位 |
| | | /// </summary> |
| | | /// <returns></returns>
public static string getCode()
{
Random rand = new Random();
string code = "";
for (int ctr = 0; ctr < 6; ctr++)
{
code += rand.Next(10).ToString();
}
return code;
} |
| | | /// <returns></returns>
public static string GetCode()
{
Random rand = new Random();
string code = "";
for (int ctr = 0; ctr < 6; ctr++)
{
code += rand.Next(10).ToString();
}
return code;
} |
| | | /// <summary>
/// 获取当前时间戳
/// </summary>
/// <returns></returns>
public static string GetCurrentTimeStamp()
{
//TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
//return Convert.ToInt64(ts.TotalSeconds).ToString();
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 |
| | | |
| | | return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 相差秒数 |