陈嘉乐
2021-03-30 5d5a3cbf4aacca721745ff4267b0b4b4b437e548
2021-3-30-1
10个文件已修改
249 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/FengLinVideo/Form/ReverseCallFragment.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs 112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,35 +1,11 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" Line="12" Column="7" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs" Line="35" Column="39" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs" Line="68" Column="44" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" Line="64" Column="15" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="UI" expanded="True">
                <Node name="UI2" expanded="True">
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True" />
                  </Node>
                  <Node name="4-PersonalCenter" expanded="True">
                    <Node name="PirDevice" expanded="True" />
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="Video" expanded="True">
                      <Node name="MainView.cs" selected="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
            </Node>
          </Node>
        </State>
      </Pad>
    </Pads>
  </MonoDevelop.Ide.Workbench>
  <MonoDevelop.Ide.DebuggingService.PinnedWatches />
  <DisabledProjects>
@@ -38,11 +14,9 @@
    <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>
      <Breakpoint file="/Users/hdl/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs" line="12" column="1" />
    </BreakpointStore>
    <BreakpointStore />
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
  <MultiItemStartupConfigurations />
</Properties>
HDL-ON_Android/Assets/Language.ini
@@ -1265,6 +1265,22 @@
1075=网络不可用
1076=选择红外遥控器
4000=可视对讲
4001=通话记录
4002=*云端照片只保留30天
4003=门口机呼叫
4004=已接听
4005=已开锁
4006=年
4007=来自
4008=呼叫
4009=未开锁
4010=未接听
4011=已拒绝
4012=配置参数有异常!
5000=音乐
5001=组合
5002=设置
HDL-ON_Android/FengLinVideo/Form/ReverseCallFragment.cs
@@ -129,8 +129,11 @@
                    Thread.Sleep(15 * 1000);
                    Activity.RunOnUiThread(() =>
                    {
                        try {
                        if (unlockImg != null)
                            unlockImg.Enabled = true;
                        }
                        catch { }
                    });
                }).Start();
            }
HDL-ON_iOS/Resources/Language.ini
@@ -1266,6 +1266,20 @@
1075=网络不可用
1076=选择红外遥控器
4000=可视对讲
4001=通话记录
4002=*云端照片只保留30天
4003=门口机呼叫
4004=已接听
4005=已开锁
4006=年
4007=来自
4008=呼叫
4009=未开锁
4010=未接听
4011=已拒绝
4012=配置参数有异常!
5000=音乐
5001=组合
5002=设置
HDL_ON/Common/R.cs
@@ -742,6 +742,19 @@
        public const int ChooseInfraredRemoteControl = 1076;
        public const int keshiduijiang = 4000;
        public const int tonghuajilu = 4001;
        public const int baolu30 = 4002;
        public const int menkoujihujiao = 4003;
        public const int yijieting = 4004;
        public const int yikaisuo = 4005;
        public const int nian = 4006;
        public const int laizi = 4007;
        public const int hujiao = 4008;
        public const int weikaisuo = 4009;
        public const int weijieting = 4010;
        public const int yijujue = 4011;
        public const int peizhicanshuyouyichang = 4012;
        public const int a31Music = 5000;
        public const int merge = 5001;
HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
@@ -8,12 +8,12 @@
{
    public class MainView : FrameLayout
    {
        public void Show(List<ESVideoInfo> listVideo, List<CallView> listCall)
        public void Show(List<ESVideoInfo> listVideo, List<CallView> listCall, VideoClouds video)
        {
            this.BackgroundColor = MusicColor.ViewColor;
            var topView = new TopView();
            this.AddChidren(topView.TopFLayoutView());
            topView.topNameBtn.Text = "可视对讲";
            topView.topNameBtn.TextID =StringId.keshiduijiang;
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
            {
                RemoveFromParent();
@@ -31,7 +31,7 @@
            var view2 = new FrameLayout();
            pageView.AddChidren(view2);
            View1(view1, listVideo);
            View2(view2, listCall);
            View2(view2, listCall, video);
            Button btn11 = new Button
            {
                X = Application.GetRealWidth(170),
@@ -80,11 +80,11 @@
                if (pageView.PageIndex == 0)
                {
                    topView.topNameBtn.Text = "可视对讲";
                    topView.topNameBtn.TextID =StringId.keshiduijiang;
                }
                else
                {
                    topView.topNameBtn.Text = "通话记录";
                    topView.topNameBtn.TextID = StringId.tonghuajilu;
                }
            };
@@ -117,7 +117,8 @@
                TextColor = MusicColor.MusicTxet14Color,
                TextSize = TextSize.Text24,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "可视对讲",
                //Text = "可视对讲",
                TextID= StringId.keshiduijiang,
            };
            bjFl.AddChidren(nameBtn);
            /// <summary>
@@ -197,6 +198,7 @@
                    Height = Application.GetRealWidth(48),
                    X = Application.GetRealWidth(31 + (58 + 50) * j),
                    Y = Application.GetRealHeight(20 + (48 + 24) * line),
                    BackgroundColor=0xff357657
                };
                fL.AddChidren(fLayout);
@@ -235,6 +237,10 @@
                clickBtn.MouseUpEventHandler += (sender, e) =>
                {
                    var eSVideoInfo = clickBtn.Tag as ESVideoInfo;
                    if (string.IsNullOrEmpty(eSVideoInfo.uuid))
                    {
                        new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.peizhicanshuyouyichang));
                    }
                    ESOnVideo.Current.ShowESVideoMonitor(eSVideoInfo);
                };
@@ -246,7 +252,7 @@
        /// 第二个界面
        /// </summary>
        /// <param name="view2">父控件</param>
        void View2(FrameLayout view2, List<CallView> listCall)
        void View2(FrameLayout view2, List<CallView> listCall, VideoClouds video)
        {
            var bjFl = new FrameLayout
@@ -270,7 +276,7 @@
                TextColor = MusicColor.MusicTxet14Color,
                TextSize = TextSize.Text24,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "通话记录",
                TextID=StringId.tonghuajilu,
            };
            bjFl.AddChidren(nameBtn);
            /// <summary>
@@ -285,11 +291,11 @@
                TextColor = MusicColor.SelectedColor,
                TextSize = TextSize.Text12,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "*云端照片只保留30天"
                TextID=StringId.baolu30,
            };
            bjFl.AddChidren(regionBtn);
            var vv = new VerticalScrolViewLayout
            var vv = new VerticalRefreshLayout
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(58),
@@ -297,27 +303,105 @@
                Width = Application.GetRealWidth(295),
            };
            bjFl.AddChidren(vv);
            vv.BeginHeaderRefreshingAction += () =>
            {
                VideoMethod videoMethod = new VideoMethod();
                var list = videoMethod.getCall(video.id);
                RefreshView(vv, list);
                //关闭刷新View;
                vv.EndHeaderRefreshing();
            };
            RefreshView(vv, listCall);
        }
        /// <summary>
        /// 刷新界面
        /// </summary>
        /// <param name="vv"></param>
        /// <param name="listCall"></param>
        public void RefreshView(VerticalRefreshLayout vv, List<CallView> listCall)
        {
            vv.RemoveAll();
            for (int i = 0; i < listCall.Count; i++)
            {
                var year = listCall[i];
                View.FrameLayout50 frameLayout50 = new View.FrameLayout50();
                vv.AddChidren(frameLayout50.FLayoutView());
                frameLayout50.btnText.Text = year.year + Language.StringByID(StringId.nian);//年
                for (int j = 0; j < year.callList.Count; j++)
                {
                    var call = year.callList[j];
                    View.FrameLayout60 frameLayout60 = new View.FrameLayout60();
                    vv.AddChidren(frameLayout60.FLayoutView());
                }
                    ///呼叫时间
                    frameLayout60.btnTime.Text = getTime(call.callTime);
                    ///呼叫状态(0:未接;1:已接;2:拒接);是否开锁;
                    frameLayout60.btnStateText.Text = getStateText(call.callStatus) + "," + getUnlockText(call.isUnlock);
            }
        }
        }
        /// <summary>
        /// 获取显示时间文本
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public string getTime(string str)
        {
            var dd = Convert.ToDateTime(str);
            var time = dd.ToString("HH") + ":" + dd.ToString("mm");
            return time;
            var utcTime = Convert.ToDateTime(str);
            var dateTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
            return dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
        }
        /// <summary>
        /// 获取呼叫状态文本
        /// </summary>
        /// <param name="str">状态值0:未接;1:已接;2:拒接</param>
        /// <returns></returns>
        public string getStateText(string str)
        {
            string s = "";
            switch (str)
            {
                case "0":
                    {
                        s = Language.StringByID(StringId.weijieting);
                    }
                    break;
                case "1":
                    {
                        Language.StringByID(StringId.yijieting);
                    }
                    break;
                case "2":
                    {
                        Language.StringByID(StringId.yijujue);
                    }
                    break;
            }
            return s;
        }
        /// <summary>
        /// 获取开锁状态文本
        /// </summary>
        /// <param name="if_bool"></param>
        /// <returns></returns>
        public string getUnlockText(bool if_bool)
        {
            string s = "";
            if (if_bool)
            {
                s = Language.StringByID(StringId.yikaisuo);
            }
            else
            {
                s = Language.StringByID(StringId.weikaisuo);
            }
            return s;
        }
    }
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs
@@ -6,13 +6,19 @@
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
    public class VideoMethod : FrameLayout
    public class VideoMethod
    {
        public void MianView()
        /// <summary>
        /// 程序主入口
        /// </summary>
        /// <param name="frameLayout">log父控件</param>
        /// <param name="video">可视对讲对象</param>
        public void MianView(FrameLayout frameLayout, VideoClouds video)
        {
            var d = VideoSend.GetVideo();
            getVideo((video) =>
            {
            //加载log
            Loading loading = new Loading();
            frameLayout.AddChidren(loading);
            loading.Start();
                List<ESVideoInfo> listESVideoInfo = new List<ESVideoInfo>();
                List<CallView> listCall = new List<CallView>();
                new System.Threading.Thread(() =>
@@ -30,29 +36,29 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                        loading.Hide();
                            var mainView = new MainView();
                            MainPage.BasePageView.AddChidren(mainView);
                            mainView.Show(listESVideoInfo, listCall);
                        mainView.Show(listESVideoInfo, listCall, video);
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        });
                    }
                })
                { IsBackground = true }.Start();
            }, this, true);
        }
        /// <summary>
        /// 获取可视对讲
        /// </summary>
        /// <param name="action">回调函数</param>
        /// <param name="frame">log父控件</param>
        public void getVideo(Action<VideoObj> action, FrameLayout frame, bool tag)
        public void getVideo(Action<VideoClouds> action, FrameLayout frame, bool tag)
        {
            ThreadSend(null, (responsePackNew) =>
             {
                 try
                 {
                     var str = responsePackNew.Data.ToString();
                     var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoObj>(str);
                     var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str);
                     action(videoObj);
                 }
                 catch { }
@@ -67,6 +73,7 @@
            List<CallView> callViewList = new List<CallView>();
            try
            {
                List<Call> listCall = new List<Call>();
                var responsePackNew = VideoSend.GetCall(id);
                if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
@@ -77,6 +84,7 @@
                }
                List<string> strYear = new List<string>();
                //查询年份
                for (int i = 0; i < listCall.Count; i++)
                {
                    var call = listCall[i];
@@ -93,7 +101,7 @@
                    }
                }
                //重新存储
                for (int j = 0; j < strYear.Count; j++)
                {
                    var year = strYear[j];
@@ -130,7 +138,7 @@
        /// <param name="frame">log父控件</param>
        /// <param name="dialog">log父控件</param>
        /// <param name="tag">是否要显示log</param>
        public static void ThreadSend(VideoObj videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true)
        public static void ThreadSend(VideoClouds videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true)
        {
            //加载log
@@ -195,8 +203,9 @@
        }
        [Serializable]
        public class VideoObj
        public class VideoClouds
        {
            /// <summary>
            /// 丰林绑定id(flBindId)
@@ -276,7 +285,6 @@
            /// </summary>
            public string flBindId = string.Empty;
        }
        [Serializable]
        public class CallView
        {
@@ -288,8 +296,6 @@
           public List<Call> callList = new List<Call>();
        }
        
    }
}
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
@@ -39,13 +39,15 @@
        /// <summary>
        /// 获取门口机列表(1室内机,2室外机,3围墙机,4管理机,5二次确认机)
        /// </summary>
        public static List<ESVideoInfo> GetVideoInfoList(VideoObj video)
        public static List<ESVideoInfo> GetVideoInfoList(VideoClouds video)
        {
            List<ESVideoInfo> eSVideoInfosList = new List<ESVideoInfo>();
            var jobject = new JObject();
            jobject.Add("cmtID",video.flCmtId);
            jobject.Add("unitno", video.flBuildingId);
            jobject.Add("method", "getUUIDList");
            try
            {
            var str = HttpWebRequest(NewAPI.API_POST_FL_List, jobject.ToString(), "POST");
            if (string.IsNullOrEmpty(str))
            {
@@ -82,6 +84,8 @@
                eSVideoInfo.roomno = video.flRoomId;
                eSVideoInfosList.Add(eSVideoInfo);
            }
            }
            catch { }
            return eSVideoInfosList;
        }
        /// <summary>
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs
@@ -25,7 +25,7 @@
            TextSize = TextSize.text16,
            TextAlignment = TextAlignment.CenterLeft,
            IsBold = true,
            Text= "2020年",
            Text= "2020"+Language.StringByID(StringId.nian),
        };
        public Button btnClick = new Button
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
@@ -24,7 +24,8 @@
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textColor,
            TextSize = TextSize.text14,
            Text= "门口机呼叫",
            //Text= "门口机呼叫",
            TextID=StringId.menkoujihujiao,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
@@ -42,9 +43,9 @@
            Text = "15:01",
        };
        /// <summary>
        /// 编辑文本
        /// 状态文本
        /// </summary>
        public Button btnEditText = new Button
        public Button btnStateText = new Button
        {
            Y = Application.GetRealHeight(32),
            Width = Application.GetRealWidth(260),
@@ -91,7 +92,7 @@
        {
            frameLayout.AddChidren(btnText);
            frameLayout.AddChidren(btnTime);
            frameLayout.AddChidren(btnEditText);
            frameLayout.AddChidren(btnStateText);
            frameLayout.AddChidren(btnNextIcon);
            btnLine.Y = frameLayout.Height - 1;
            frameLayout.AddChidren(btnLine);