| | |
| | | <Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.M7BBB18B19152766" /> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" /> |
| | | <MonoDevelop.Ide.ItemProperties.GateWay.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.8c0bdb303f25d82c2a42fb8bfca449bfaca00260" /> |
| | | <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/AC/ACControl.cs"> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Room/RoomManagement.cs"> |
| | | <Files> |
| | | <File FileName="Shared/R.cs" Line="1364" Column="1" /> |
| | | <File FileName="GateWay.Droid/Assets/Language.ini" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/SceneCategoryView.cs" /> |
| | | <File FileName="Shared/Phone/Device/CommonForm/SceneMainView.cs" /> |
| | | <File FileName="Shared/Phone/Device/AC/ACControl.cs" Line="127" Column="9" /> |
| | | <File FileName="Shared/Phone/ZigBee/Device/AC.cs" Line="98" Column="22" /> |
| | | <File FileName="Shared/Phone/Device/Category/SelectFloor.cs" /> |
| | | <File FileName="Shared/Phone/Device/Category/SelectHouse.cs" /> |
| | | <File FileName="Shared/Phone/Device/Room/UnallocatedRoom.cs" /> |
| | | <File FileName="Shared/Phone/Device/Room/RoomManagement.cs" Line="155" Column="19" /> |
| | | <File FileName="Shared/Common/Room.cs" Line="1" Column="1" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="GateWay" expanded="True"> |
| | | <Node name="GateWay.Droid" expanded="True" /> |
| | | <Node name="GateWay.Droid" expanded="True"> |
| | | <Node name="Assets" expanded="True"> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="Floor" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | <Node name="Shared" expanded="True"> |
| | | <Node name="Common" expanded="True" /> |
| | | <Node name="Phone" expanded="True"> |
| | | <Node name="Device" expanded="True"> |
| | | <Node name="AC" expanded="True"> |
| | | <Node name="ACControl.cs" selected="True" /> |
| | | </Node> |
| | | <Node name="AC" expanded="True" /> |
| | | <Node name="Category" expanded="True" /> |
| | | <Node name="Curtain" expanded="True" /> |
| | | <Node name="CommonForm" expanded="True" /> |
| | | <Node name="Room" expanded="True"> |
| | | <Node name="RoomManagement.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | <Node name="UserView" expanded="True" /> |
| | | <Node name="ZigBee" expanded="True"> |
| | | <Node name="Device" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | |
| | | <AndroidAsset Include="Assets\Phone\Item\ProgressBubbles.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Room\IconBackground.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Room\IconSelectedBackground.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Left_1.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Left_2.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Left_3.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Left_4.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Left_5.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Right_1.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Right_2.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Right_3.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Right_4.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Floor\SelectFloor_Right_5.png" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <AndroidAsset Include="Assets\Phone\Item\InputAccountIcon.png" />
|
| | |
| | | Width = Application.GetRealWidth(600), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold=true |
| | |
| | | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = light.OnOffStatus == 1; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.IsSelected = airSwitch.OnOffStatus == 1; |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = dimmableLight.OnOffStatus == 1; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = ac.currentSystemMode != 1; |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | |
| | | var deviceRow = new CategoryFunctionForWinRow(0, 35); |
| | | deviceRow.Init(deviceUI); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage != 0; |
| | | deviceRow.SetRollerShadeIcon(rollerShade.WcdType); |
| | |
| | | { |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.HideSwitchBtn(true); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | { |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = (deviceUI.CommonDevice as IASZone).iASInfo?.Alarm1 == 1; |
| | | deviceRow.HideSwitchBtn(true); |
| | |
| | | |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.IsSelected = false; |
| | | deviceRow.HideSwitchBtn(true); |
| | |
| | | { |
| | | var deviceRow = new CategoryFunctionRow(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceRow.SetStatuText(deviceUI.GetDeviceStatu()); |
| | | deviceRow.HideSwitchBtn(true); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | |
| | | if (Common.Room.CurrentRoom.IsLove) |
| | | { |
| | | deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(deviceUI.FileName) == false) |
| | | { |
| | | devListScrolView.RemoveViewByTag(deviceUI); |
| | |
| | | else |
| | | { |
| | | deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (Common.Room.CurrentRoom.IsLove) |
| | | { |
| | | deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | if (Common.Room.CurrentRoom.IsCollectInRoom(deviceUI.FileName) == false) |
| | | { |
| | | devListScrolView.RemoveViewByTag(deviceUI); |
| | |
| | | else |
| | | { |
| | | deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (targetDevice.DeviceUI == null || targetDevice.DeviceUI.CommonDevice == null) continue; |
| | | devImgPath = targetDevice.DeviceUI.IconPath; |
| | | devNameText = targetDevice.DeviceUI.CommonDevice.DeviceEpointName; |
| | | devNameText = Common.LocalDevice.Current.GetDeviceEpointName(targetDevice.DeviceUI.CommonDevice); |
| | | |
| | | var targetRow = new SceneTargetFunctionRow(13); |
| | | targetRow.Init(); |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | |
| | | var deviceRow = new FunctionRow(0, 35); |
| | | deviceRow.Init(device.IconPath, device.OnlineIconPath, true); |
| | | deviceRow.SetTitle(device.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | deviceRow.IsSelected = true; |
| | | deviceRow.HideSwitchBtn(false); |
| | | deviceRow.NameBtn.BackgroundColor = ZigbeeColor.Current.GXCRedColor; |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = device.CommonDevice.DeviceEpointName |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice) |
| | | }; |
| | | titleFL.AddChidren(deviceName); |
| | | |
| | |
| | | /// <summary> |
| | | /// Init |
| | | /// </summary> |
| | | public void Init(int x,int y,CommonForm.Direction direction=CommonForm.Direction.Left) |
| | | public void Init(int x, int y, CommonForm.Direction direction = CommonForm.Direction.Left) |
| | | { |
| | | dialogBackground = new Dialog |
| | | { |
| | |
| | | X = Application.GetRealWidth(x), |
| | | Y = Application.GetRealHeight(y), |
| | | Width = Application.GetMinRealAverage(449), |
| | | Height = Application.GetMinRealAverage(783), |
| | | UnSelectedImagePath="Item/SelectFloor_Left.png" |
| | | Height = Application.GetMinRealAverage(773), |
| | | UnSelectedImagePath = "Floor/SelectFloor_Left_4.png" |
| | | }; |
| | | dialog.AddChidren(bg); |
| | | if (direction == CommonForm.Direction.Right) |
| | | { |
| | | bg.UnSelectedImagePath = "Item/SelectFloor_Right.png"; |
| | | } |
| | | |
| | | var backgroundFL = new FrameLayout |
| | | { |
| | | X = Application.GetRealWidth(x+10), |
| | | Y = Application.GetRealHeight(y+23), |
| | | Width = Application.GetMinRealAverage(449-20), |
| | | Height = Application.GetMinRealAverage(783-23-10), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | X = Application.GetRealWidth(x), |
| | | Y = Application.GetRealHeight(y + 23), |
| | | Width = Application.GetMinRealAverage(449), |
| | | Height = Application.GetMinRealAverage(773 - 23) |
| | | }; |
| | | dialog.AddChidren(backgroundFL); |
| | | |
| | | var tip = new Button |
| | | { |
| | | X = Application.GetRealWidth(80), |
| | | Width = Application.GetRealWidth(350), |
| | | Height = Application.GetRealHeight(150), |
| | | Width = Application.GetMinRealAverage(350), |
| | | Height = Application.GetMinRealAverage(150), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextID = R.MyInternationalizationString.SelectFloor, |
| | | TextSize=16, |
| | | IsBold=true |
| | | TextSize = 14, |
| | | IsBold = true |
| | | }; |
| | | backgroundFL.AddChidren(tip); |
| | | |
| | |
| | | { |
| | | Y = tip.Bottom, |
| | | Width = Application.GetMinRealAverage(449), |
| | | Height = Application.GetMinRealAverage(600) |
| | | Height = Application.GetMinRealAverage(600), |
| | | VerticalScrollBarEnabled = false |
| | | }; |
| | | backgroundFL.AddChidren(floorLayout); |
| | | |
| | | if (Config.Instance.Home.FloorDics.Count > 0) |
| | | var floorCount = Config.Instance.Home.FloorDics.Count; |
| | | |
| | | if (floorCount > 0) |
| | | { |
| | | string directStr = string.Empty; |
| | | if (direction == CommonForm.Direction.Right) |
| | | { |
| | | directStr = "Right"; |
| | | } |
| | | else |
| | | { |
| | | directStr = "Left"; |
| | | } |
| | | |
| | | if (floorCount > 5) |
| | | { |
| | | bg.UnSelectedImagePath = $"Floor/SelectFloor_{directStr}_5.png"; |
| | | bg.Height = Application.GetMinRealAverage(150*6+23); |
| | | backgroundFL.Height = Application.GetMinRealAverage(150 * 6); |
| | | floorLayout.Height = Application.GetMinRealAverage(150 * 5); |
| | | } |
| | | else |
| | | { |
| | | bg.UnSelectedImagePath = $"Floor/SelectFloor_{directStr}_{floorCount}.png"; |
| | | bg.Height = Application.GetMinRealAverage(150 * (floorCount + 1)+23); |
| | | backgroundFL.Height = Application.GetMinRealAverage(150 * (floorCount + 1)); |
| | | floorLayout.Height = Application.GetMinRealAverage(150 * floorCount); |
| | | } |
| | | |
| | | foreach (var floor in Config.Instance.Home.FloorDics) |
| | | { |
| | | AddFloor(floorLayout, floor); |
| | |
| | | /// AddFloor |
| | | /// </summary> |
| | | /// <param name="verticalScrolView"></param> |
| | | private void AddFloor(VerticalScrolViewLayout verticalScrolView, KeyValuePair<string, string> floor) |
| | | private void AddFloor(VerticalScrolViewLayout verticalScrolView, KeyValuePair<string, string> floor,bool isLast=false) |
| | | { |
| | | var frow = new CommonForm.LeftIconButtonRow(449, 150); |
| | | frow.Width = Application.GetMinRealAverage(449); |
| | | frow.Height = Application.GetMinRealAverage(150); |
| | | frow.Tag = floor.Key; |
| | | frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floor.Value); |
| | | verticalScrolView.AddChidren(frow); |
| | | |
| | | if(string.IsNullOrEmpty(CurFloorId)) |
| | | if (string.IsNullOrEmpty(CurFloorId)) |
| | | { |
| | | if (Config.Instance.Home.CurrentFloorId == floor.Key) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void SelectFloor_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs) |
| | | private void SelectFloor_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | (sender as CommonForm.LeftIconButtonRow).IsSelected = true; |
| | | if(changeFloor) |
| | | if (changeFloor) |
| | | { |
| | | Config.Instance.Home.CurrentFloorId = (sender as CommonForm.LeftIconButtonRow).Tag.ToString(); |
| | | Config.Instance.Home.Save(false); |
| | |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(256), |
| | | Width = Application.GetMinRealAverage(449), |
| | | Height = Application.GetMinRealAverage(475), |
| | | UnSelectedImagePath = "Item/SelectHouse.png" |
| | | Height = Application.GetMinRealAverage(773), |
| | | UnSelectedImagePath = "Floor/SelectFloor_Left_4.png" |
| | | }; |
| | | dialog.AddChidren(bg); |
| | | |
| | | var changeHomeFL = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(256), |
| | | Height = Application.GetMinRealAverage(449), |
| | | Width = Application.GetMinRealAverage(475), |
| | | Radius = CommonPage.BigFormRadius, |
| | | //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | Y = Application.GetRealHeight(256+23), |
| | | Width = Application.GetMinRealAverage(449), |
| | | Height = Application.GetMinRealAverage(773 - 23) |
| | | }; |
| | | dialog.AddChidren(changeHomeFL); |
| | | |
| | | var changeHomeBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(80), |
| | | Y=Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(350), |
| | | Width = Application.GetMinRealAverage(350), |
| | | Height = Application.GetMinRealAverage(150), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextID = R.MyInternationalizationString.ChangeHome, |
| | |
| | | var scrolView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = changeHomeBtn.Bottom, |
| | | Height = Application.GetMinRealAverage(300), |
| | | Width = Application.GetMinRealAverage(449), |
| | | Height = Application.GetMinRealAverage(600), |
| | | VerticalScrollBarEnabled = false |
| | | }; |
| | | changeHomeFL.AddChidren(scrolView); |
| | | |
| | | var houseCount = Config.Instance.HomeFilePathList.Count; |
| | | if (Config.Instance.HomeFilePathList.Count > 0) |
| | | { |
| | | if (houseCount > 5) |
| | | { |
| | | bg.UnSelectedImagePath = $"Floor/SelectFloor_Left_5.png"; |
| | | bg.Height = Application.GetMinRealAverage(150 * 6 + 23); |
| | | changeHomeFL.Height = Application.GetMinRealAverage(150 * 6); |
| | | scrolView.Height = Application.GetMinRealAverage(150 * 5); |
| | | } |
| | | else |
| | | { |
| | | bg.UnSelectedImagePath = $"Floor/SelectFloor_Left_{houseCount}.png"; |
| | | bg.Height = Application.GetMinRealAverage(150 * (houseCount + 1) + 23); |
| | | changeHomeFL.Height = Application.GetMinRealAverage(150 * (houseCount + 1)); |
| | | scrolView.Height = Application.GetMinRealAverage(150 * houseCount); |
| | | } |
| | | |
| | | foreach (var housePath in Config.Instance.HomeFilePathList) |
| | | { |
| | | var home = House.GetHouseByFilePath(housePath); |
| | |
| | | private void AddFloor(VerticalScrolViewLayout verticalScrolView, House house) |
| | | { |
| | | var frow = new CommonForm.LeftIconButtonRow(449, 150); |
| | | frow.Width = Application.GetMinRealAverage(449); |
| | | frow.Height = Application.GetMinRealAverage(150); |
| | | frow.Tag = house.FileName; |
| | | frow.Init("Item/House.png", "Item/HouseSelected.png", house.Name); |
| | | verticalScrolView.AddChidren(frow); |
| | |
| | | var nameRow = new DeviceInfoEditRow(12); |
| | | nameRow.Init(); |
| | | nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.FunctionName)} : "); |
| | | nameRow.SetTitle(string.IsNullOrEmpty(device.CommonDevice.DeviceEpointName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : device.CommonDevice.DeviceEpointName); |
| | | nameRow.SetTitle(string.IsNullOrEmpty(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | nameFL.AddChidren(nameRow); |
| | | |
| | | |
| | |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold=true |
| | |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold = true |
| | |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold=true |
| | |
| | | Width=Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize=15, |
| | | IsBold=true |
| | |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold=true |
| | |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold=true |
| | |
| | | }; |
| | | AddChidren(bodyFrameLayout); |
| | | |
| | | var roomScrolView = new VerticalScrolViewLayout { }; |
| | | bodyFrameLayout.AddChidren(roomScrolView); |
| | | try |
| | | { |
| | | var roomList = Common.Room.CurrentRoom.GetRoomsByFloorId(floorId); |
| | | if (roomList == null || roomList.Count == 0) |
| | | if (Common.Room.Lists.Count == 1) |
| | | { |
| | | return; |
| | | } |
| | | for (int i = 0; i < roomList.Count + 1; i++) |
| | | var roomScrolView = new VerticalScrolViewLayout { }; |
| | | bodyFrameLayout.AddChidren(roomScrolView); |
| | | var roomList = Common.Room.CurrentRoom.GetRoomsByFloorId(floorId); |
| | | if (roomList == null || roomList.Count == 0) |
| | | { |
| | | int xx = 43 + i % 2 * (20 + 487); |
| | | int yy = 0; |
| | | if (i == 0 || i == 1) |
| | | itemView = new FrameLayout() |
| | | { |
| | | if (i % 2 == 0) |
| | | Height = Application.GetRealHeight(354 + 58) |
| | | }; |
| | | roomScrolView.AddChidren(itemView); |
| | | |
| | | var roomView = new RoomNoNameMainView(34, 58); |
| | | itemView.AddChidren(roomView); |
| | | roomView.Init(); |
| | | |
| | | roomView.Icon.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.RoomNameButton.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.iconFL.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < roomList.Count + 1; i++) |
| | | { |
| | | int xx = 43 + i % 2 * (20 + 487); |
| | | int yy = 0; |
| | | if (i == 0 || i == 1) |
| | | { |
| | | if (i % 2 == 0) |
| | | { |
| | | itemView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(354 + 58) |
| | | }; |
| | | roomScrolView.AddChidren(itemView); |
| | | } |
| | | yy = 58; |
| | | } |
| | | else if (i % 2 == 0) |
| | | { |
| | | itemView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(354 + 58) |
| | | Height = Application.GetRealHeight(354) |
| | | }; |
| | | roomScrolView.AddChidren(itemView); |
| | | } |
| | | yy = 58; |
| | | } |
| | | else if (i % 2 == 0) |
| | | { |
| | | itemView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(354) |
| | | }; |
| | | roomScrolView.AddChidren(itemView); |
| | | } |
| | | |
| | | if (i < roomList.Count) |
| | | { |
| | | var room = roomList[i]; |
| | | var roomView = new RoomMainView(xx, yy); |
| | | itemView.AddChidren(roomView); |
| | | roomView.Init(this, room); |
| | | roomView.SetRoomName(room.Name); |
| | | roomView.SetRoomIcon(room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)); |
| | | roomView.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | if (i < roomList.Count) |
| | | { |
| | | if (CanClick == false) |
| | | var room = roomList[i]; |
| | | var roomView = new RoomMainView(xx, yy); |
| | | itemView.AddChidren(roomView); |
| | | roomView.Init(this, room); |
| | | roomView.SetRoomName(room.Name); |
| | | roomView.SetRoomIcon(room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)); |
| | | roomView.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | return; |
| | | } |
| | | CommonPage.Instance.CloseLeftMenu(); |
| | | Common.Room.CurrentRoom = room; |
| | | Config.Instance.Home.CurrentFloorId = room.FloorId; |
| | | UserPage.Instance.Fresh(); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | var roomView = new RoomNoNameMainView(xx, yy); |
| | | itemView.AddChidren(roomView); |
| | | roomView.Init(); |
| | | if (CanClick == false) |
| | | { |
| | | return; |
| | | } |
| | | CommonPage.Instance.CloseLeftMenu(); |
| | | Common.Room.CurrentRoom = room; |
| | | Config.Instance.Home.CurrentFloorId = room.FloorId; |
| | | UserPage.Instance.Fresh(); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | var roomView = new RoomNoNameMainView(xx, yy); |
| | | itemView.AddChidren(roomView); |
| | | roomView.Init(); |
| | | |
| | | roomView.Icon.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.RoomNameButton.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.iconFL.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.Icon.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.RoomNameButton.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | roomView.iconFL.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | var deviceRow = new SelectFunctionView(0, 35); |
| | | deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath); |
| | | deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName); |
| | | deviceRow.SetTitle(Common.LocalDevice.Current.GetDeviceEpointName(deviceUI.CommonDevice)); |
| | | deviceTypeRowLayout.AddChidren(deviceRow); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | |
| | | functionView.Init(); |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(rollerShade.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(rollerShade)); |
| | | functionView.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage == 100; |
| | | functionView.SetCollect(true); |
| | | |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.IsSelected = light.OnOffStatus == 1; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(airSwitch.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(airSwitch)); |
| | | functionView.IsSelected = airSwitch.OnOffStatus == 1; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom( device.FileName)); |
| | | |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.IsSelected = ac.currentSystemMode != 0; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | |
| | | functionView.Tag = device; |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetStatuText(device.GetDeviceStatu()); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.IsSelected = dimmableLight.OnOffStatus == 1; |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.IsSelected = ias.iASInfo?.Alarm1 == 1; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | lightView.CanControl(false); |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.IsSelected = false; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | lightView.CanControl(false); |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.IsSelected = false; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | lightView.CanControl(false); |
| | |
| | | lightView.Tag = device; |
| | | lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | lightView.SetStatuText(device.GetDeviceStatu()); |
| | | lightView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | lightView.CanControl(false); |
| | | //lightView.IsSelected = device.CommonDevice.IsOnline == 1; |
| | | lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | |
| | | if (Common.Room.CurrentRoom.IsLove) |
| | | { |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | if (Room.CurrentRoom.IsCollectInRoom(device.FileName) == false) |
| | | { |
| | | ShowFunction(); |
| | |
| | | else |
| | | { |
| | | functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath); |
| | | functionView.SetDeviceName(device.CommonDevice.DeviceEpointName); |
| | | functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice)); |
| | | functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName)); |
| | | } |
| | | } |