File was renamed from HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainFragment.cs |
| | |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public class MotorCurtainFragment : FrameLayout |
| | | public partial class RollingShutterPage : FrameLayout |
| | | { |
| | | |
| | | #region 控件集合 |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// 功能名称按钮 |
| | | /// </summary> |
| | | Button btnFunctionName; |
| | | /// <summary> |
| | | /// 房间楼层信息按钮 |
| | | /// </summary> |
| | | Button btnFromFoorAndRoom; |
| | | /// <summary> |
| | | /// 收藏按钮 |
| | | /// </summary> |
| | | Button btnCollection; |
| | | /// <summary> |
| | | /// 窗帘关闭按钮 |
| | | /// </summary> |
| | | Button btnCurtainClose; |
| | | /// <summary> |
| | | /// 窗帘停止按钮 |
| | | /// </summary> |
| | | Button btnCurtainStop; |
| | | /// <summary> |
| | | /// 窗帘打开按钮 |
| | | /// </summary> |
| | | Button btnCurtainOpen; |
| | | #endregion |
| | | |
| | | #region 区域变量 |
| | | Function function; |
| | | Button btnCollection_Out; |
| | | Button btnFunctionName_Out; |
| | | Button btnFromFloor_Out; |
| | | /// <summary> |
| | | /// 刷新显示信息 |
| | | /// </summary> |
| | | Action actionRefresh; |
| | | #endregion |
| | | public MotorCurtainFragment(Function func) |
| | | public RollingShutterPage(Function func) |
| | | { |
| | | bodyView = this; |
| | | function = func; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut) |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Curtain),function); |
| | | btnCollection_Out = btnCollectionIcon; |
| | | btnFunctionName_Out = btnFunctionNameOut; |
| | | btnFromFloor_Out = btnFromFloorOut; |
| | | |
| | | |
| | | FrameLayout controlView = new FrameLayout() |
| | |
| | | }; |
| | | bodyView.AddChidren(controlView); |
| | | |
| | | Button btnFunctionName = new Button() |
| | | btnFunctionName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(14), |
| | |
| | | }; |
| | | controlView.AddChidren(btnFunctionName); |
| | | |
| | | Button btnFromFoorAndRoom = new Button() |
| | | btnFromFoorAndRoom = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnFunctionName.Bottom, |
| | |
| | | }; |
| | | controlView.AddChidren(btnFromFoorAndRoom); |
| | | |
| | | var btnCollection = new Button() |
| | | btnCollection = new Button() |
| | | { |
| | | X = Application.GetRealWidth(287), |
| | | Y = Application.GetRealHeight(21), |
| | | Width = Application.GetMinRealAverage(24), |
| | | Height = Application.GetMinRealAverage(24), |
| | | UnSelectedImagePath = "Collection/CollectionIcon.png", |
| | | SelectedImagePath = "Collection/CollectionGrayIcon.png", |
| | | X = Application.GetRealWidth(273), |
| | | Y = Application.GetRealHeight(14), |
| | | Width = Application.GetMinRealAverage(40), |
| | | Height = Application.GetMinRealAverage(40), |
| | | SelectedImagePath = "Collection/CollectionIcon.png", |
| | | UnSelectedImagePath = "Collection/CollectionGrayIcon.png", |
| | | IsSelected = function.collection |
| | | }; |
| | | controlView.AddChidren(btnCollection); |
| | | |
| | |
| | | Y = Application.GetRealHeight(130), |
| | | Width = Application.GetRealWidth(250), |
| | | Height = Application.GetRealWidth(177), |
| | | |
| | | }; |
| | | controlView.AddChidren(curtainSeekBar); |
| | | |
| | | |
| | | var btnMinusSignIcon = new Button() |
| | | { |
| | |
| | | }; |
| | | controlView.AddChidren(btnPlusSgnIcon); |
| | | |
| | | |
| | | var btnCurtainClose = new Button() |
| | | btnCurtainClose = new Button() |
| | | { |
| | | X = Application.GetRealWidth(84), |
| | | Y = Application.GetRealHeight(470), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | X = Application.GetRealWidth(64), |
| | | Y = Application.GetRealHeight(462), |
| | | Width = Application.GetMinRealAverage(40), |
| | | Height = Application.GetMinRealAverage(40), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png", |
| | | }; |
| | | controlView.AddChidren(btnCurtainClose); |
| | | btnCurtainClose.MouseDownEventHandler += (sender, e) => { |
| | | btnCurtainClose.IsSelected = true; |
| | | }; |
| | | btnCurtainClose.MouseUpEventHandler += (sender, e) => { |
| | | btnCurtainClose.IsSelected = false; |
| | | }; |
| | | |
| | | |
| | | var btnCurtainStop = new Button() |
| | | btnCurtainStop = new Button() |
| | | { |
| | | X = Application.GetRealWidth(148), |
| | | Y = Application.GetRealHeight(470), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | X = Application.GetRealWidth(144), |
| | | Y = Application.GetRealHeight(462), |
| | | Width = Application.GetMinRealAverage(40), |
| | | Height = Application.GetMinRealAverage(40), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainStopIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainStopOnIcon.png", |
| | | }; |
| | | controlView.AddChidren(btnCurtainStop); |
| | | btnCurtainStop.MouseDownEventHandler += (sender, e) => { |
| | | btnCurtainStop.IsSelected = true; |
| | | }; |
| | | btnCurtainStop.MouseUpEventHandler += (sender, e) => { |
| | | btnCurtainStop.IsSelected = false; |
| | | }; |
| | | |
| | | var btnCurtainOpen = new Button() |
| | | btnCurtainOpen = new Button() |
| | | { |
| | | X = Application.GetRealWidth(212), |
| | | Y = Application.GetRealHeight(470), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | X = Application.GetRealWidth(224), |
| | | Y = Application.GetRealHeight(462), |
| | | Width = Application.GetMinRealAverage(40), |
| | | Height = Application.GetMinRealAverage(40), |
| | | UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png", |
| | | }; |
| | | controlView.AddChidren(btnCurtainOpen); |
| | | btnCurtainOpen.MouseDownEventHandler += (sender, e) => { |
| | | btnCurtainOpen.IsSelected = true; |
| | | }; |
| | | btnCurtainOpen.MouseUpEventHandler += (sender, e) => { |
| | | btnCurtainOpen.IsSelected = false; |
| | | }; |
| | | |
| | | LoadEventList(); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.LocationManagement)).LoadTopView(function, actionRefresh); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |