| | |
| | | <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs"> |
| | | <Files> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" Line="19" Column="106" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs" Line="28" Column="58" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs" Line="80" Column="25" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" Line="158" Column="54" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs" Line="49" Column="22" /> |
| | | <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs" Line="34" Column="10" /> |
| | | <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="10" Column="28" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="78" Column="1" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="99" Column="47" /> |
| | | <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs" Line="8" Column="2" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="HDL_APP_Project" expanded="True"> |
| | | <Node name="HDL_ON" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="DAL" expanded="True"> |
| | | <Node name="Server" expanded="True" /> |
| | | </Node> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="UI2" expanded="True"> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="Video" expanded="True"> |
| | | <Node name="VideoSend.cs" selected="True" /> |
| | | <Node name="4-PersonalCenter" expanded="True"> |
| | | <Node name="PirDevice" expanded="True"> |
| | | <Node name="View" expanded="True" /> |
| | | <Node name="PirSend.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | <Node name="FuntionControlView" expanded="True"> |
| | | <Node name="Video" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | |
| | | <String>Shared.IOS/Shared.IOS.csproj</String> |
| | | </DisabledProjects> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore /> |
| | | </MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | |
| | | Address = mHome.homeAddress, |
| | | isAllowCreateScene = mHome.isAllowCreateScene, |
| | | }; |
| | | #if DEBUG |
| | | |
| | | UserInfo.Current.regionList.Add(home); |
| | | continue; |
| | | #endif |
| | | if (home.isBindGateway) |
| | | { |
| | | UserInfo.Current.regionList.Add(home); |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | // public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | /// <summary> |
| | | /// RegionMark |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod videoMethod = new UI2.FuntionControlView.Video.VideoMethod(); |
| | | videoMethod.getVideo((device) => |
| | | { |
| | | videoMethod.MianView(this, device); |
| | | }, this, true); |
| | | return; |
| | | |
| | | var page = new BrandListPage();// AddThirdPartyBrandListpage(); // BrandListPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | |
| | | { |
| | | //清空之前数据 |
| | | brandList.Clear(); |
| | | var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); |
| | | for (int a = 0; a < jArray.Count; a++) |
| | | try |
| | | { |
| | | var jay = jArray[a]; |
| | | var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); |
| | | var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str); |
| | | if (brand != null) |
| | | var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); |
| | | for (int a = 0; a < jArray.Count; a++) |
| | | { |
| | | if (null == brandList.Find((c) => c.id == brand.id)) |
| | | var jay = jArray[a]; |
| | | var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); |
| | | var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str); |
| | | if (brand != null) |
| | | { |
| | | brandList.Add(brand); |
| | | if (null == brandList.Find((c) => c.id == brand.id)) |
| | | { |
| | | brandList.Add(brand); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | actionBrand(brandList); |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | actionBrand(brandList); |
| | | }); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "123456" |
| | | }; |
| | | bjFl.AddChidren(regionBtn); |
| | | // bjFl.AddChidren(regionBtn); |
| | | /// <summary> |
| | | ///收藏图标 |
| | | /// </summary> |
| | |
| | | UnSelectedImagePath = "MusicIcon/collect.png", |
| | | SelectedImagePath = "MusicIcon/collectSelected.png", |
| | | }; |
| | | bjFl.AddChidren(collectIconBtn); |
| | | // bjFl.AddChidren(collectIconBtn); |
| | | ///可视对讲图标 |
| | | Button intercomBtnIcon = new Button |
| | | { |
| | |
| | | vv.BeginHeaderRefreshingAction += () => |
| | | { |
| | | VideoMethod videoMethod = new VideoMethod(); |
| | | var list = videoMethod.getCall(video.id); |
| | | var list = videoMethod.GetCall(video.id); |
| | | RefreshView(vv, list); |
| | | //关闭刷新View; |
| | | vv.EndHeaderRefreshing(); |
| | |
| | | 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(); // 相差秒数 |
| | |
| | | |
| | | public class VideoSend |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// 检查住宅是否绑定丰林,并获取门口机列表 |
| | | /// </summary> |
| | |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_Check); |
| | | return responsePackNew; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取通话记录 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static ResponsePackNew GetCall(string flBindId) |
| | | { |
| | | var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", 100 } }; |
| | | var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", int.MaxValue } }; |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_GetCallList); |
| | | return responsePackNew; |
| | | } |
| | |
| | | ///标记是否成功 |
| | | bool if_bool = false; |
| | | //临时密码 |
| | | string pwd = VideoMethod.getCode(); |
| | | string pwd = VideoMethod.GetCode(); |
| | | var jobject = new JObject();
jobject.Add("communityID", video.flCmtId);//社区ID |
| | | jobject.Add("fromTime", VideoMethod.GetCurrentTimeStamp());//开始时间 |
| | | jobject.Add("validTime", VideoMethod.GetTomorrowTimeStamp());//有效时间 |