From 232070c7a697bd5c7e3cd5115da22fd9a749e3e0 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 29 三月 2021 18:04:05 +0800
Subject: [PATCH] 2021-3-29-11
---
HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs | 90 ++++++++++++++++++--------------------------
1 files changed, 37 insertions(+), 53 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
index f49dd0e..c3752e2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
@@ -1,13 +1,15 @@
锘縰sing System;
using HDL_ON.UI.Music;
+using System.Collections.Generic;
using Shared;
+using static HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod;
+
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
public class MainView : FrameLayout
{
- public void Show()
+ public void Show(List<ESVideoInfo> listVideo, List<CallView> listCall)
{
-
this.BackgroundColor = MusicColor.ViewColor;
var topView = new TopView();
this.AddChidren(topView.TopFLayoutView());
@@ -28,8 +30,8 @@
pageView.AddChidren(view1);
var view2 = new FrameLayout();
pageView.AddChidren(view2);
- View1(view1);
- View2(view2);
+ View1(view1, listVideo);
+ View2(view2, listCall);
Button btn11 = new Button
{
X = Application.GetRealWidth(170),
@@ -91,9 +93,9 @@
/// 绗竴涓晫闈�
/// </summary>
/// <param name="view1">鐖舵帶浠�</param>
- void View1(FrameLayout view1)
+ void View1(FrameLayout view1, List<ESVideoInfo> list)
{
-
+
var bjFl = new FrameLayout
{
Y = Application.GetRealHeight(24),
@@ -158,24 +160,25 @@
};
bjFl.AddChidren(intercomBtnIcon);
- var vv = new VerticalScrolViewLayout {
+ var vv = new VerticalScrolViewLayout
+ {
Y = Application.GetRealHeight(306),
Height = Application.GetRealHeight(220),
Width = Application.GetRealWidth(327),
};
bjFl.AddChidren(vv);
//鏁扮粍涓暟
- int value = 15;
+ //int value = 15;
//鍏堣绠楁暟鎹墍闇�瑕佺殑寰堥珮搴︼紱
int l = 0;
- if (value % 3 == 0)
+ if (list.Count % 3 == 0)
{
- l = value / 3;
+ l = list.Count / 3;
}
else
{
- l = (value / 3) + 1;
+ l = (list.Count / 3) + 1;
}
var fL = new FrameLayout
{
@@ -184,8 +187,10 @@
};
vv.AddChidren(fL);
int line = 0;
- for (int i = 1, j = 0; i <= value; i++, j++)
+ for (int i = 1, j = 0; i <= list.Count; i++, j++)
{
+ var video = list[i - 1];
+
var fLayout = new FrameLayout
{
Width = Application.GetRealWidth(50),
@@ -213,11 +218,12 @@
TextSize = TextSize.Text10,
TextColor = CSS.CSS_Color.TextualColor,
TextAlignment = TextAlignment.Center,
- Text="鏌ョ湅鍗曞厓鏈�"
+ Text = video.DeviceName,
};
fLayout.AddChidren(iconNameBtn);
- var clickBtn = new Button { Tag = i };
+ var clickBtn = new Button { Tag = video };
+
fLayout.AddChidren(clickBtn);
if (i % 3 == 0)
{
@@ -228,35 +234,9 @@
// GetIconAndText(i, deviceIconBtn, iconNameBtn);
clickBtn.MouseUpEventHandler += (sender, e) =>
{
+ var eSVideoInfo = clickBtn.Tag as ESVideoInfo;
+ ESOnVideo.Current.ShowESVideoMonitor(eSVideoInfo);
- ////1=绌鸿皟;2=鐢佃;3=椋庢墖;4=鏈洪《鐩�;5=DVD/EVD/VCD;6=鎶曞奖浠�;7=鑷畾涔�;
- //int if_value = int.Parse(clickBtn.Tag.ToString());
- //if (if_value == 7)
- //{
- // Method method = new Method();
- // method.AddControl(this, (control) =>
- // {
- // AddButton addButton = new AddButton();
- // MainPage.BasePageView.AddChidren(addButton);
- // addButton.Show(control);
- // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- // });
- //}
- //else
- //{
- // if (DeviceTypeList.Count == 0)
- // {
- // GetDeviceTypeList(true, () =>
- // {
- // DeviceTypeViewClick(if_value);
-
- // });
- // }
- // else
- // {
- // DeviceTypeViewClick(if_value);
- // }
- //}
};
}
@@ -266,9 +246,9 @@
/// 绗簩涓晫闈�
/// </summary>
/// <param name="view2">鐖舵帶浠�</param>
- void View2(FrameLayout view2)
+ void View2(FrameLayout view2, List<CallView> listCall)
{
-
+
var bjFl = new FrameLayout
{
Y = Application.GetRealHeight(24),
@@ -317,24 +297,28 @@
Width = Application.GetRealWidth(295),
};
bjFl.AddChidren(vv);
- for (int i = 0; i < 6; i++)
+ for (int i = 0; i < listCall.Count; i++)
{
-
- if (i == 0|| i == 2)
+ var year = listCall[i];
+ View.FrameLayout50 frameLayout50 = new View.FrameLayout50();
+ vv.AddChidren(frameLayout50.FLayoutView());
+ for (int j = 0; j < year.callList.Count; j++)
{
- View.FrameLayout50 frameLayout50 = new View.FrameLayout50();
- vv.AddChidren(frameLayout50.FLayoutView());
- }
- else
- {
+ var call = year.callList[j];
View.FrameLayout60 frameLayout60 = new View.FrameLayout60();
vv.AddChidren(frameLayout60.FLayoutView());
}
+
}
}
-
+ public string getTime(string str)
+ {
+ var dd = Convert.ToDateTime(str);
+ var time = dd.ToString("HH") + ":" + dd.ToString("mm");
+ return time;
+ }
}
}
--
Gitblit v1.8.0