diff --git a/.DS_Store b/.DS_Store index f708742..58f17ac 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index 2c04574..a0e998f 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -2716,10 +2716,38 @@ FA0892F2226CA3920084A609 /* NSString+Add.m in Sources */ = {isa = PBXBuildFile; fileRef = FA0892F0226CA3920084A609 /* NSString+Add.m */; }; FA0892F52270BED00084A609 /* XuanduoHuliModel.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0892F32270BED00084A609 /* XuanduoHuliModel.h */; }; FA0892F62270BED00084A609 /* XuanduoHuliModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FA0892F42270BED00084A609 /* XuanduoHuliModel.m */; }; + FA0892FD2275A1B30084A609 /* Xuanduo2SettingController.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0892FB2275A1B30084A609 /* Xuanduo2SettingController.h */; }; + FA0892FE2275A1B30084A609 /* Xuanduo2SettingController.m in Sources */ = {isa = PBXBuildFile; fileRef = FA0892FC2275A1B30084A609 /* Xuanduo2SettingController.m */; }; + FA0893012275D9AB0084A609 /* XuanduoSectionHeaderView.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0892FF2275D9AB0084A609 /* XuanduoSectionHeaderView.h */; }; + FA0893022275D9AC0084A609 /* XuanduoSectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = FA0893002275D9AB0084A609 /* XuanduoSectionHeaderView.m */; }; + FA0893042275D9C60084A609 /* XuanduoSectionHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA0893032275D9C60084A609 /* XuanduoSectionHeaderView.xib */; }; + FA0893072275DD4D0084A609 /* arrow_down@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA0893052275DD4C0084A609 /* arrow_down@2x.png */; }; + FA0893082275DD4D0084A609 /* arrow_up@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA0893062275DD4D0084A609 /* arrow_up@2x.png */; }; + FA08930A2275DD780084A609 /* shajun_big@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA0893092275DD770084A609 /* shajun_big@2x.png */; }; + FA08930E2275F03F0084A609 /* PlusTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = FA08930B2275F03F0084A609 /* PlusTableViewCell.h */; }; + FA08930F2275F03F0084A609 /* PlusTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FA08930C2275F03F0084A609 /* PlusTableViewCell.m */; }; + FA0893102275F03F0084A609 /* PlusTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA08930D2275F03F0084A609 /* PlusTableViewCell.xib */; }; + FA0893122275F0F90084A609 /* add@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA0893112275F0F90084A609 /* add@2x.png */; }; + FA0893152275F7CF0084A609 /* XuanduoSelectHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0893132275F7CF0084A609 /* XuanduoSelectHeader.h */; }; + FA0893162275F7CF0084A609 /* XuanduoSelectHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = FA0893142275F7CF0084A609 /* XuanduoSelectHeader.m */; }; + FA0893182275F7DF0084A609 /* XuanduoSelectHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA0893172275F7DF0084A609 /* XuanduoSelectHeader.xib */; }; + FA08931E2275FCF20084A609 /* gas_big@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA0893192275FCEC0084A609 /* gas_big@2x.png */; }; + FA0893202275FCF20084A609 /* wave_big@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA08931B2275FCEE0084A609 /* wave_big@2x.png */; }; + FA0893212275FCF20084A609 /* xunhuan_big@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA08931C2275FCEF0084A609 /* xunhuan_big@2x.png */; }; + FA0893222275FCF20084A609 /* light_big@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA08931D2275FCF10084A609 /* light_big@2x.png */; }; + FAA732D0227B2F7C0062C252 /* SetTimerModel.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA732CE227B2F7C0062C252 /* SetTimerModel.h */; }; + FAA732D1227B2F7C0062C252 /* SetTimerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FAA732CF227B2F7C0062C252 /* SetTimerModel.m */; }; + FAA732D4227BE2B80062C252 /* ReadTimerModel.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA732D2227BE2B80062C252 /* ReadTimerModel.h */; }; + FAA732D5227BE2B80062C252 /* ReadTimerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FAA732D3227BE2B80062C252 /* ReadTimerModel.m */; }; + FAA732D8227C1DA80062C252 /* Xuanduo2TimerModel.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA732D6227C1DA80062C252 /* Xuanduo2TimerModel.h */; }; + FAA732D9227C1DA80062C252 /* Xuanduo2TimerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FAA732D7227C1DA80062C252 /* Xuanduo2TimerModel.m */; }; FAB3721122619DB70051E107 /* Xuanduo2fController.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB3720E22619DB70051E107 /* Xuanduo2fController.h */; }; FAB3721222619DB70051E107 /* Xuanduo2fController.m in Sources */ = {isa = PBXBuildFile; fileRef = FAB3720F22619DB70051E107 /* Xuanduo2fController.m */; }; FAB3721322619DB70051E107 /* Xuanduo2fController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FAB3721022619DB70051E107 /* Xuanduo2fController.xib */; }; FAB372152261E7EF0051E107 /* ifishdropview_set_device@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FAB372142261E7EF0051E107 /* ifishdropview_set_device@2x.png */; }; + FAFC08232279CB5900B5A07B /* SetTimerCell.h in Headers */ = {isa = PBXBuildFile; fileRef = FAFC08202279CB5900B5A07B /* SetTimerCell.h */; }; + FAFC08242279CB5900B5A07B /* SetTimerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FAFC08212279CB5900B5A07B /* SetTimerCell.m */; }; + FAFC08252279CB5900B5A07B /* SetTimerCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FAFC08222279CB5900B5A07B /* SetTimerCell.xib */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -6656,10 +6684,38 @@ FA0892F0226CA3920084A609 /* NSString+Add.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Add.m"; sourceTree = ""; }; FA0892F32270BED00084A609 /* XuanduoHuliModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XuanduoHuliModel.h; sourceTree = ""; }; FA0892F42270BED00084A609 /* XuanduoHuliModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XuanduoHuliModel.m; sourceTree = ""; }; + FA0892FB2275A1B30084A609 /* Xuanduo2SettingController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Xuanduo2SettingController.h; sourceTree = ""; }; + FA0892FC2275A1B30084A609 /* Xuanduo2SettingController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Xuanduo2SettingController.m; sourceTree = ""; }; + FA0892FF2275D9AB0084A609 /* XuanduoSectionHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XuanduoSectionHeaderView.h; sourceTree = ""; }; + FA0893002275D9AB0084A609 /* XuanduoSectionHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XuanduoSectionHeaderView.m; sourceTree = ""; }; + FA0893032275D9C60084A609 /* XuanduoSectionHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanduoSectionHeaderView.xib; sourceTree = ""; }; + FA0893052275DD4C0084A609 /* arrow_down@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow_down@2x.png"; sourceTree = ""; }; + FA0893062275DD4D0084A609 /* arrow_up@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow_up@2x.png"; sourceTree = ""; }; + FA0893092275DD770084A609 /* shajun_big@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shajun_big@2x.png"; sourceTree = ""; }; + FA08930B2275F03F0084A609 /* PlusTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlusTableViewCell.h; sourceTree = ""; }; + FA08930C2275F03F0084A609 /* PlusTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlusTableViewCell.m; sourceTree = ""; }; + FA08930D2275F03F0084A609 /* PlusTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlusTableViewCell.xib; sourceTree = ""; }; + FA0893112275F0F90084A609 /* add@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "add@2x.png"; sourceTree = ""; }; + FA0893132275F7CF0084A609 /* XuanduoSelectHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XuanduoSelectHeader.h; sourceTree = ""; }; + FA0893142275F7CF0084A609 /* XuanduoSelectHeader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XuanduoSelectHeader.m; sourceTree = ""; }; + FA0893172275F7DF0084A609 /* XuanduoSelectHeader.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XuanduoSelectHeader.xib; sourceTree = ""; }; + FA0893192275FCEC0084A609 /* gas_big@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gas_big@2x.png"; sourceTree = ""; }; + FA08931B2275FCEE0084A609 /* wave_big@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wave_big@2x.png"; sourceTree = ""; }; + FA08931C2275FCEF0084A609 /* xunhuan_big@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "xunhuan_big@2x.png"; sourceTree = ""; }; + FA08931D2275FCF10084A609 /* light_big@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "light_big@2x.png"; sourceTree = ""; }; + FAA732CE227B2F7C0062C252 /* SetTimerModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SetTimerModel.h; sourceTree = ""; }; + FAA732CF227B2F7C0062C252 /* SetTimerModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SetTimerModel.m; sourceTree = ""; }; + FAA732D2227BE2B80062C252 /* ReadTimerModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReadTimerModel.h; sourceTree = ""; }; + FAA732D3227BE2B80062C252 /* ReadTimerModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReadTimerModel.m; sourceTree = ""; }; + FAA732D6227C1DA80062C252 /* Xuanduo2TimerModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Xuanduo2TimerModel.h; sourceTree = ""; }; + FAA732D7227C1DA80062C252 /* Xuanduo2TimerModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Xuanduo2TimerModel.m; sourceTree = ""; }; FAB3720E22619DB70051E107 /* Xuanduo2fController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Xuanduo2fController.h; sourceTree = ""; }; FAB3720F22619DB70051E107 /* Xuanduo2fController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Xuanduo2fController.m; sourceTree = ""; }; FAB3721022619DB70051E107 /* Xuanduo2fController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Xuanduo2fController.xib; sourceTree = ""; }; FAB372142261E7EF0051E107 /* ifishdropview_set_device@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ifishdropview_set_device@2x.png"; sourceTree = ""; }; + FAFC08202279CB5900B5A07B /* SetTimerCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SetTimerCell.h; sourceTree = ""; }; + FAFC08212279CB5900B5A07B /* SetTimerCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SetTimerCell.m; sourceTree = ""; }; + FAFC08222279CB5900B5A07B /* SetTimerCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SetTimerCell.xib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -9634,9 +9690,17 @@ 8829559E1DBDA3A100E9DDD7 /* basion_logo.png */, 8829559F1DBDA3A100E9DDD7 /* firstSetCell.png */, 882955A01DBDA3A100E9DDD7 /* ifishSetCell_back.png */, + FA08931D2275FCF10084A609 /* light_big@2x.png */, + FA0893092275DD770084A609 /* shajun_big@2x.png */, 882955A11DBDA3A100E9DDD7 /* secondSetCell.png */, 882955A21DBDA3A100E9DDD7 /* set_cellBack.png */, + FA0893052275DD4C0084A609 /* arrow_down@2x.png */, + FA0893192275FCEC0084A609 /* gas_big@2x.png */, + FA08931B2275FCEE0084A609 /* wave_big@2x.png */, + FA08931C2275FCEF0084A609 /* xunhuan_big@2x.png */, + FA0893062275DD4D0084A609 /* arrow_up@2x.png */, 882955A31DBDA3A100E9DDD7 /* set_cellBack_double.png */, + FA0893112275F0F90084A609 /* add@2x.png */, 882955A41DBDA3A100E9DDD7 /* set_co2_off.png */, 882955A51DBDA3A100E9DDD7 /* set_heatingrod_off.png */, 882955A61DBDA3A100E9DDD7 /* set_lightoff@1x.png */, @@ -10083,6 +10147,10 @@ 883E76121D4897570030E075 /* ServerBackDeviceLogInModel.m */, 883E76131D4897570030E075 /* SetSelectorTime.h */, 883E76141D4897570030E075 /* SetSelectorTime.m */, + FAA732CE227B2F7C0062C252 /* SetTimerModel.h */, + FAA732CF227B2F7C0062C252 /* SetTimerModel.m */, + FAA732D2227BE2B80062C252 /* ReadTimerModel.h */, + FAA732D3227BE2B80062C252 /* ReadTimerModel.m */, 883E76151D4897570030E075 /* setWaringTpModel.h */, 883E76161D4897570030E075 /* setWaringTpModel.m */, 883E76171D4897570030E075 /* ThreeControlBackbackmsgModel.h */, @@ -10323,6 +10391,8 @@ 883E76A31D48A5E50030E075 /* XutoBackMsgModel.m */, FA0892E7226B22C90084A609 /* Xuanduo2Model.h */, FA0892E8226B22C90084A609 /* Xuanduo2Model.m */, + FAA732D6227C1DA80062C252 /* Xuanduo2TimerModel.h */, + FAA732D7227C1DA80062C252 /* Xuanduo2TimerModel.m */, FA0892EB226C15000084A609 /* Xuanduo2DataUtility.h */, FA0892EC226C15000084A609 /* Xuanduo2DataUtility.m */, FAB3720E22619DB70051E107 /* Xuanduo2fController.h */, @@ -10336,6 +10406,8 @@ FA0892F42270BED00084A609 /* XuanduoHuliModel.m */, 883E76A81D48A5E50030E075 /* XuToSetViewController.h */, 883E76A91D48A5E50030E075 /* XuToSetViewController.m */, + FA0892FB2275A1B30084A609 /* Xuanduo2SettingController.h */, + FA0892FC2275A1B30084A609 /* Xuanduo2SettingController.m */, 883E76AA1D48A5E50030E075 /* XuToSoketBackMsgDataUnity.h */, 883E76AB1D48A5E50030E075 /* XuToSoketBackMsgDataUnity.m */, 883E76AC1D48A5E50030E075 /* XuToWenDuPicview.h */, @@ -10344,6 +10416,18 @@ 886185CC1EF255F900459AD1 /* XuToControlNameViewController.m */, 886185CE1EF2561700459AD1 /* XuToControlName.h */, 886185CF1EF2561700459AD1 /* XuToControlName.m */, + FA0892FF2275D9AB0084A609 /* XuanduoSectionHeaderView.h */, + FA0893002275D9AB0084A609 /* XuanduoSectionHeaderView.m */, + FA0893032275D9C60084A609 /* XuanduoSectionHeaderView.xib */, + FA0893132275F7CF0084A609 /* XuanduoSelectHeader.h */, + FA0893142275F7CF0084A609 /* XuanduoSelectHeader.m */, + FA0893172275F7DF0084A609 /* XuanduoSelectHeader.xib */, + FA08930B2275F03F0084A609 /* PlusTableViewCell.h */, + FA08930C2275F03F0084A609 /* PlusTableViewCell.m */, + FA08930D2275F03F0084A609 /* PlusTableViewCell.xib */, + FAFC08202279CB5900B5A07B /* SetTimerCell.h */, + FAFC08212279CB5900B5A07B /* SetTimerCell.m */, + FAFC08222279CB5900B5A07B /* SetTimerCell.xib */, ); path = XuTo; sourceTree = ""; @@ -14460,12 +14544,15 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + FAA732D0227B2F7C0062C252 /* SetTimerModel.h in Headers */, 3D1C50F8221A9EE00096AE43 /* des2.h in Headers */, + FAFC08232279CB5900B5A07B /* SetTimerCell.h in Headers */, 3D1C5058221A9EDF0096AE43 /* log.h in Headers */, 3D1C5037221A9EDE0096AE43 /* elian.h in Headers */, 3D1C508C221A9EDF0096AE43 /* Utils.h in Headers */, 3D1C510C221A9EE00096AE43 /* CameraNoParyBackVideoView.h in Headers */, 3D1C50BE221A9EE00096AE43 /* Constants.h in Headers */, + FA0893012275D9AB0084A609 /* XuanduoSectionHeaderView.h in Headers */, 3D1C5046221A9EDE0096AE43 /* avconfig.h in Headers */, 3D1C50C5221A9EE00096AE43 /* UDManager.h in Headers */, 3D1C510F221A9EE00096AE43 /* IfishP2PPlayBackListViewController.h in Headers */, @@ -14479,8 +14566,10 @@ 3D1C5079221A9EDF0096AE43 /* RtspInterface.h in Headers */, 3D1C5085221A9EDF0096AE43 /* KTPhotoBrowserGlobal.h in Headers */, 3D1C50B6221A9EDF0096AE43 /* YSlider.h in Headers */, + FA08930E2275F03F0084A609 /* PlusTableViewCell.h in Headers */, 3D1C50CC221A9EE00096AE43 /* MPNotificationView.h in Headers */, 3D1C50FF221A9EE00096AE43 /* YooseeCenterViewCell.h in Headers */, + FAA732D8227C1DA80062C252 /* Xuanduo2TimerModel.h in Headers */, 3D1C5041221A9EDE0096AE43 /* samplefmt.h in Headers */, 3D1C50DC221A9EE00096AE43 /* PAIOUnit.h in Headers */, 3D1C5050221A9EDF0096AE43 /* adler32.h in Headers */, @@ -14540,6 +14629,7 @@ 402591952238D91400CE4900 /* UINavigationController+Config.h in Headers */, 3D1C5124221A9EE00096AE43 /* IfishCameraRecordThirdCell.h in Headers */, 3D1C5045221A9EDE0096AE43 /* sha.h in Headers */, + FA0893152275F7CF0084A609 /* XuanduoSelectHeader.h in Headers */, 3D1C5057221A9EDF0096AE43 /* opt.h in Headers */, 3D1C50D1221A9EE00096AE43 /* SVPullToRefresh.h in Headers */, 3D1C5071221A9EDF0096AE43 /* vaapi.h in Headers */, @@ -14617,6 +14707,7 @@ 3D1C5132221A9EE10096AE43 /* CameraRecordViewController.h in Headers */, 3D1C50A9221A9EDF0096AE43 /* MXSCycleScrollView.h in Headers */, 3D1C50FB221A9EE00096AE43 /* ProgressImageView.h in Headers */, + FAA732D4227BE2B80062C252 /* ReadTimerModel.h in Headers */, 3D1C5054221A9EDF0096AE43 /* eval.h in Headers */, 3D1C508B221A9EDF0096AE43 /* KTPhotoScrollViewController.h in Headers */, 3D1C5059221A9EDF0096AE43 /* aes.h in Headers */, @@ -14629,6 +14720,7 @@ 3D1C5043221A9EDE0096AE43 /* base64.h in Headers */, 3D1C504B221A9EDF0096AE43 /* crc.h in Headers */, 404D7CEB2238CF77005655F5 /* UIViewController+Swizzling.h in Headers */, + FA0892FD2275A1B30084A609 /* Xuanduo2SettingController.h in Headers */, 3D1C5065221A9EDF0096AE43 /* avassert.h in Headers */, FAB3721122619DB70051E107 /* Xuanduo2fController.h in Headers */, ); @@ -14788,12 +14880,14 @@ 883E79C31D48B0280030E075 /* InfoCell.xib in Resources */, 882957441DBDA3A300E9DDD7 /* swimmingfish0051.png in Resources */, 887491F41E7921E400CDA284 /* IfishInformationListViewCell.xib in Resources */, + FA0893212275FCF20084A609 /* xunhuan_big@2x.png in Resources */, 8829572F1DBDA3A300E9DDD7 /* swimmingfish0030.png in Resources */, 882955DF1DBDA3A100E9DDD7 /* connectDevice.png in Resources */, 8869B3B21E696A280010F099 /* levelUp_fish@2x.png in Resources */, 882957361DBDA3A300E9DDD7 /* swimmingfish0037.png in Resources */, 882956B21DBDA3A200E9DDD7 /* refer_book@3x.png in Resources */, 8871FB001EBC63D30038E99A /* attestation_back.png in Resources */, + FA0893182275F7DF0084A609 /* XuanduoSelectHeader.xib in Resources */, 882957821DBDA3A400E9DDD7 /* set_o2_off.png in Resources */, 881A1D501DD41AB000BA1AF4 /* MineKanEditSec1ThredCell.xib in Resources */, 887C36271EE63F6000964ACD /* sortedEnames.plist in Resources */, @@ -14842,6 +14936,7 @@ 8868FE701E66D5C9002F7F33 /* JingYanValueBootomViewCell.xib in Resources */, 8829578F1DBDA3A400E9DDD7 /* xutobtn1_on@2x.png in Resources */, 885FBE2E1E4DAB4500E0D7D1 /* merchant_iocn_shop.png in Resources */, + FA0893202275FCF20084A609 /* wave_big@2x.png in Resources */, 881672131EA5DE2B00BEBF23 /* UMCommunityStrings.strings in Resources */, 882956D51DBDA3A300E9DDD7 /* ifishdropview_delect_device@2x.png in Resources */, 882A760D1EBB27BE00AD1D15 /* ShopCerPart1InfoViewCell.xib in Resources */, @@ -14930,6 +15025,7 @@ 883E78F91D48A5E50030E075 /* ForgetViewController.xib in Resources */, 885FBE141E4D66C000E0D7D1 /* merchant_iocn_a_attestation@2x.png in Resources */, 882956F31DBDA3A300E9DDD7 /* ChongLang_off.png in Resources */, + FA0893102275F03F0084A609 /* PlusTableViewCell.xib in Resources */, 8871C4A31E6D507B000AA49F /* signin_condition_gift_conduct@2x.png in Resources */, 886EAC591E2DC5BE00A4DF27 /* IFishShopsViewCell.xib in Resources */, 881A1D311DD2C31500BA1AF4 /* kankanlook_icon_editor@3x.png in Resources */, @@ -15400,9 +15496,11 @@ 882956B01DBDA3A200E9DDD7 /* refer_book.png in Resources */, 882956E61DBDA3A300E9DDD7 /* device_03.png in Resources */, 882957A71DBDA3A400E9DDD7 /* xutobtn5_on@2x.png in Resources */, + FA0893082275DD4D0084A609 /* arrow_up@2x.png in Resources */, 883517FC1E6664D200FCBE56 /* fishrank_smallShrimp@2x.png in Resources */, 886F4DEC1D751B22001EDA34 /* LookReportViewCell.xib in Resources */, 885FBDC41E4C0CB400E0D7D1 /* explore_iocn_authentication.png in Resources */, + FA0893042275D9C60084A609 /* XuanduoSectionHeaderView.xib in Resources */, 882957C11DBDF3C700E9DDD7 /* registered_icon_tick_selected.png in Resources */, 882956A91DBDA3A200E9DDD7 /* fish_left@2x.png in Resources */, 882956611DBDA3A200E9DDD7 /* lookafter_title.png in Resources */, @@ -15446,6 +15544,7 @@ 883283A21EAF4C7300A47157 /* record_label_default@3x.png in Resources */, 882956401DBDA3A200E9DDD7 /* device_upbanner@1x.png in Resources */, 88696FE41E9C8E5E005D4AFB /* MemberEditeCommitBtnViewCell.xib in Resources */, + FA08931E2275FCF20084A609 /* gas_big@2x.png in Resources */, 8829572E1DBDA3A300E9DDD7 /* swimmingfish0029.png in Resources */, 8869B39E1E6967DF0010F099 /* levelUp_dragon@3x.png in Resources */, 882956D31DBDA3A300E9DDD7 /* Ifish_share_device@2x.png in Resources */, @@ -15542,6 +15641,7 @@ 882956A41DBDA3A200E9DDD7 /* brandLogo_hold@3x.png in Resources */, 8829560E1DBDA3A100E9DDD7 /* neves0017.png in Resources */, 887492361E7A90D000CDA284 /* fishdoctor_iocn_default_gold@2x.png in Resources */, + FA0893222275FCF20084A609 /* light_big@2x.png in Resources */, 883E78861D48A5E50030E075 /* ChangeSecretCodeController.xib in Resources */, 8869B39B1E6967DF0010F099 /* levelUp_crab@3x.png in Resources */, 881672331EA5DE2B00BEBF23 /* UMComLargeImageTableViewCell.xib in Resources */, @@ -15769,6 +15869,7 @@ 8829565E1DBDA3A200E9DDD7 /* kanHu_telgray.png in Resources */, 88C1B1C21DC988FF00C2C99A /* home_message@3x.png in Resources */, 88696FF71E9CBC2E005D4AFB /* home_iocn_hotsell@2x.png in Resources */, + FA08930A2275DD780084A609 /* shajun_big@2x.png in Resources */, 882957021DBDA3A300E9DDD7 /* PFkilLlight_off.png in Resources */, 881A1D0A1DD2BDE400BA1AF4 /* WoDeKanKanViewCell.xib in Resources */, 886512061E97966400BABDF1 /* task_shareIfishApp@3x.png in Resources */, @@ -15808,6 +15909,7 @@ 8829576D1DBDA3A400E9DDD7 /* connect_cancle.png in Resources */, 882957C91DBE048100E9DDD7 /* registered_icon_validation_ws.png in Resources */, 882956F81DBDA3A300E9DDD7 /* DanBai_on.png in Resources */, + FA0893122275F0F90084A609 /* add@2x.png in Resources */, 8891332D1ECE99B900F52EBC /* recording_iocn_over@3x.png in Resources */, 8871C4A41E6D507B000AA49F /* signin_condition_gift_conduct@3x.png in Resources */, 881672121EA5DE2B00BEBF23 /* FZLanTingHei-L-GBK-M.TTF in Resources */, @@ -15926,6 +16028,7 @@ E521222C21075C0D00BA24C5 /* tip.png in Resources */, 88C1B21B1DCC5A1400C2C99A /* personal_iocn_replace@2x.png in Resources */, 88602F541E12002600F3DB5D /* NTESContactViewController.xib in Resources */, + FA0893072275DD4D0084A609 /* arrow_down@2x.png in Resources */, 881478381E712E3A00BFB79C /* TaskKindViewCell.xib in Resources */, 3D1C5148221A9EE10096AE43 /* IFISHYooseeImg.bundle in Resources */, 8871FB201EBC822B0038E99A /* select_camera@3x.png in Resources */, @@ -16007,6 +16110,7 @@ 885FBE301E4DAB4500E0D7D1 /* merchant_iocn_shop@3x.png in Resources */, 88F23F2C1EA9D18700E4D298 /* live_botton_uncheck_like@3x.png in Resources */, 8853D99B1E24EED700776BF4 /* ShuoMingShuCell.xib in Resources */, + FAFC08252279CB5900B5A07B /* SetTimerCell.xib in Resources */, 882956031DBDA3A100E9DDD7 /* neves0006.png in Resources */, 88C1B2111DCC5A1400C2C99A /* personal_iocn_about.png in Resources */, 883283A11EAF4C7300A47157 /* record_label_default@2x.png in Resources */, @@ -16261,6 +16365,7 @@ 88602A401E10BC3500F3DB5D /* NIMSessionConfigurator.m in Sources */, 8816720B1EA5DE2B00BEBF23 /* UIView+UMComAddition.m in Sources */, 885EC4C91DB4C73D008134DA /* LXADViewTool.m in Sources */, + FAA732D1227B2F7C0062C252 /* SetTimerModel.m in Sources */, 88602F611E12002600F3DB5D /* NTESCustomAttachmentDecoder.m in Sources */, 88602F801E12002600F3DB5D /* NTESDevice.m in Sources */, FA0892EA226B22C90084A609 /* Xuanduo2Model.m in Sources */, @@ -16787,6 +16892,7 @@ 88602DB11E10D97E00F3DB5D /* NSData+ImageContentType.m in Sources */, 8871FABE1EBC544A0038E99A /* ShopCerPart3DoneViewCell.m in Sources */, 88591EE81D655B9E00A1316E /* ProvinceModel.m in Sources */, + FA0893022275D9AC0084A609 /* XuanduoSectionHeaderView.m in Sources */, 8864841A1EE166820046C3BD /* RuSunChangeNameTitleViewCell.m in Sources */, 88883B1C1EF0DAA500CAC0AE /* SongNuo86Name.m in Sources */, 88602F9E1E12002600F3DB5D /* NTESVideoViewController.m in Sources */, @@ -16846,6 +16952,7 @@ 883E787B1D48A5E50030E075 /* IfishMianTabViewController.m in Sources */, 885FBE241E4D8C7F00E0D7D1 /* WhiteNavBaseViewController.m in Sources */, 88597AB91E56BAF1003D0E5C /* UIButton+BBTButton.m in Sources */, + FA0893162275F7CF0084A609 /* XuanduoSelectHeader.m in Sources */, 881671D11EA5DE2B00BEBF23 /* UMComHorizontalTableView.m in Sources */, 8864841F1EE166A40046C3BD /* RuSunChangeNameTextViewCell.m in Sources */, 88602F2E1E12002500F3DB5D /* NSString+NTES.m in Sources */, @@ -17056,6 +17163,7 @@ 883E79AC1D48B0280030E075 /* PlayNDropViewController.m in Sources */, 881671E91EA5DE2B00BEBF23 /* UMComBarButtonItem.m in Sources */, 8861CAF41D59CD520092E5A5 /* IfishNomassageView.m in Sources */, + FAA732D5227BE2B80062C252 /* ReadTimerModel.m in Sources */, 88602F271E12002500F3DB5D /* NTESSearchTeamViewController.m in Sources */, 8843E2161EEFEC3D00176C65 /* RunSunControlName.m in Sources */, 881671F11EA5DE2B00BEBF23 /* UMImageProgressView.m in Sources */, @@ -17104,6 +17212,7 @@ 888EEB311DC2F37C003C5C5B /* YYWeakProxy.m in Sources */, 3D1C50FC221A9EE00096AE43 /* TouchButton.m in Sources */, 883283921EAF478F00A47157 /* GoldConvertRecordViewCell.m in Sources */, + FAA732D9227C1DA80062C252 /* Xuanduo2TimerModel.m in Sources */, 886028841E10BB1100F3DB5D /* CTAssetsGridViewLayout.m in Sources */, 881869301D6EECDA00CE9DFF /* shopNoCumtomerViewCell.m in Sources */, 88779EA81E28994F00209ABA /* JuNengMianViewController.m in Sources */, @@ -17198,6 +17307,7 @@ 88602F7E1E12002600F3DB5D /* NTESDataManager.m in Sources */, 8860287A1E10BB1100F3DB5D /* CTAssetItemViewController.m in Sources */, 883E762E1D4897570030E075 /* ShopNameCellModel.m in Sources */, + FA08930F2275F03F0084A609 /* PlusTableViewCell.m in Sources */, 881671C01EA5DE2B00BEBF23 /* UIViewController+UMComAddition.m in Sources */, 3D1C512C221A9EE10096AE43 /* IfishRecVideoViewCell.m in Sources */, 881671FD1EA5DE2B00BEBF23 /* UMAssetsCollectionController.m in Sources */, @@ -17217,6 +17327,7 @@ 881F0F4F1D73DF4E0091507E /* BaoGaoViewFirstCell.m in Sources */, E51D7D5B208CF4E7001FF053 /* RuiMeiInputViewController.m in Sources */, 881672241EA5DE2B00BEBF23 /* UMComSelectTopicCell.m in Sources */, + FAFC08242279CB5900B5A07B /* SetTimerCell.m in Sources */, 88602A1B1E10BC3400F3DB5D /* NIMContactDataCell.m in Sources */, 3D1C5097221A9EDF0096AE43 /* TabView.m in Sources */, 88696FBD1E9C7215005D4AFB /* MemberDetailViewController.m in Sources */, @@ -17230,6 +17341,7 @@ 8818692C1D6EE4FB00CE9DFF /* KanHuListModel.m in Sources */, 3D1C5099221A9EDF0096AE43 /* GetAlarmRecordResult.m in Sources */, 881671F71EA5DE2B00BEBF23 /* UMComMutiStyleTextView.m in Sources */, + FA0892FE2275A1B30084A609 /* Xuanduo2SettingController.m in Sources */, 88602DB31E10D97E00F3DB5D /* SDWebImageCompat.m in Sources */, 88602A2B1E10BC3500F3DB5D /* NIMInputToolBar.m in Sources */, 88C1B2C51DD19CE000C2C99A /* KankanListCollectionViewCell.m in Sources */, diff --git a/Ifish/Assets.xcassets/deletebtn_bg.imageset/Contents.json b/Ifish/Assets.xcassets/deletebtn_bg.imageset/Contents.json new file mode 100644 index 0000000..837abc7 --- /dev/null +++ b/Ifish/Assets.xcassets/deletebtn_bg.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "deletebtn_bg@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/deletebtn_bg.imageset/deletebtn_bg@2x.png b/Ifish/Assets.xcassets/deletebtn_bg.imageset/deletebtn_bg@2x.png new file mode 100644 index 0000000..1d9d6d6 Binary files /dev/null and b/Ifish/Assets.xcassets/deletebtn_bg.imageset/deletebtn_bg@2x.png differ diff --git a/Ifish/Assets.xcassets/surebtn_bg@2x.imageset/Contents.json b/Ifish/Assets.xcassets/surebtn_bg@2x.imageset/Contents.json new file mode 100644 index 0000000..6d9b558 --- /dev/null +++ b/Ifish/Assets.xcassets/surebtn_bg@2x.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "surebtn_bg.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/surebtn_bg@2x.imageset/surebtn_bg.png b/Ifish/Assets.xcassets/surebtn_bg@2x.imageset/surebtn_bg.png new file mode 100644 index 0000000..1b97434 Binary files /dev/null and b/Ifish/Assets.xcassets/surebtn_bg@2x.imageset/surebtn_bg.png differ diff --git a/Ifish/Assets.xcassets/绚多设备/xuanduo_bg.imageset/xuanduo_bg@2x.png b/Ifish/Assets.xcassets/绚多设备/xuanduo_bg.imageset/xuanduo_bg@2x.png index fa75ac9..8d2666d 100644 Binary files a/Ifish/Assets.xcassets/绚多设备/xuanduo_bg.imageset/xuanduo_bg@2x.png and b/Ifish/Assets.xcassets/绚多设备/xuanduo_bg.imageset/xuanduo_bg@2x.png differ diff --git a/Ifish/Assets.xcassets/zaolang_selectd.imageset/Contents.json b/Ifish/Assets.xcassets/绚多设备/zaolang_selectd.imageset/Contents.json similarity index 100% rename from Ifish/Assets.xcassets/zaolang_selectd.imageset/Contents.json rename to Ifish/Assets.xcassets/绚多设备/zaolang_selectd.imageset/Contents.json diff --git a/Ifish/Assets.xcassets/zaolang_selectd.imageset/zaolang_selectd@2x.png b/Ifish/Assets.xcassets/绚多设备/zaolang_selectd.imageset/zaolang_selectd@2x.png similarity index 100% rename from Ifish/Assets.xcassets/zaolang_selectd.imageset/zaolang_selectd@2x.png rename to Ifish/Assets.xcassets/绚多设备/zaolang_selectd.imageset/zaolang_selectd@2x.png diff --git a/Ifish/Info.plist b/Ifish/Info.plist index 566d548..174bf04 100644 --- a/Ifish/Info.plist +++ b/Ifish/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.9.3 + 4.9.7 CFBundleSignature ???? CFBundleURLTypes @@ -70,7 +70,7 @@ CFBundleVersion - 1.0 + 9.7 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/Ifish/Utinitys/dataUnity/dataContorl.h b/Ifish/Utinitys/dataUnity/dataContorl.h index 6908633..b818674 100644 --- a/Ifish/Utinitys/dataUnity/dataContorl.h +++ b/Ifish/Utinitys/dataUnity/dataContorl.h @@ -14,7 +14,8 @@ +(NSString *)hexStringFromString:(NSString *)string; +(NSString *)ToHex:(long long int)tmpid; +(UInt64)hexToTen:(NSString*)str; -+ (NSString *)stringFromHexString:(NSString *)hexString; ++(NSString *)groupNumberTohex:(NSInteger)number; ++(NSString *)stringFromHexString:(NSString *)hexString; +(NSString*)dateStringToHexString:(NSString *)dateString; +(NSString*)tpIntStringToFourHex:(int)intString; +(NSString*)hexStringToDateString:(NSString*)hexString; diff --git a/Ifish/Utinitys/dataUnity/dataContorl.m b/Ifish/Utinitys/dataUnity/dataContorl.m index b5a0c48..49f3f7b 100644 --- a/Ifish/Utinitys/dataUnity/dataContorl.m +++ b/Ifish/Utinitys/dataUnity/dataContorl.m @@ -109,6 +109,50 @@ } return str; } + +/// 1 - 10组 ++(NSString *)groupNumberTohex:(NSInteger)number{ + NSString *str = @""; + switch (number) { + case 0: + str = @"00"; + break; + case 1: + str = @"01"; + break; + case 2: + str = @"02"; + break; + case 3: + str = @"03"; + break; + case 4: + str = @"04"; + break; + case 5: + str = @"05"; + break; + case 6: + str = @"06"; + break; + case 7: + str = @"07"; + break; + case 8: + str = @"08"; + break; + case 9: + str = @"09"; + break; + case 10: + str = @"0a"; + break; + default: + break; + } + return str; +} + // 十六转十 +(UInt64)hexToTen:(NSString*)str{ // unsigned long long result = 0; @@ -214,6 +258,27 @@ UInt64 shi =strtoul([[hexString substringWithRange:NSMakeRange(0, 2)] UTF8String], 0, 16); shiString=[NSString stringWithFormat:@"%llu",shi]; + if ([shiString isEqualToString:@"0"]) { + shiString = @"00"; + }else if ([shiString isEqualToString:@"1"]){ + shiString = @"01"; + }else if ([shiString isEqualToString:@"2"]){ + shiString = @"02"; + }else if ([shiString isEqualToString:@"3"]){ + shiString = @"03"; + }else if ([shiString isEqualToString:@"4"]){ + shiString = @"04"; + }else if ([shiString isEqualToString:@"5"]){ + shiString = @"05"; + }else if ([shiString isEqualToString:@"6"]){ + shiString = @"06"; + }else if ([shiString isEqualToString:@"7"]){ + shiString = @"07"; + }else if ([shiString isEqualToString:@"8"]){ + shiString = @"08"; + }else if ([shiString isEqualToString:@"9"]){ + shiString = @"09"; + } // NSLog(@"str2 %@",shiString); diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/RuSunTemp/RuSunIndependence/HaveHotCoolWenDuPicview.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/RuSunTemp/RuSunIndependence/HaveHotCoolWenDuPicview.m index 0882e68..c1cdebc 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/RuSunTemp/RuSunIndependence/HaveHotCoolWenDuPicview.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/RuSunTemp/RuSunIndependence/HaveHotCoolWenDuPicview.m @@ -28,7 +28,7 @@ CGFloat imgWid= kScreenSize.width - 40*2; - CGFloat imHeight= imgWid*1.6; + CGFloat imHeight= imgWid; self.backgroundColor=[UIColor colorWithWhite:0 alpha:0.5]; _picBackImg =[[UIImageView alloc]initWithFrame:CGRectMake(40,kScreenSize.height/2-imHeight/2, imgWid, imHeight)]; @@ -56,7 +56,7 @@ _pic=[[UIPickerView alloc]initWithFrame:CGRectMake(10,CGRectGetMaxY(title.frame) + 2,imgWid - 20,imHeight -30 - 40- 20)]; _pic.dataSource=self; _pic.delegate=self; - //_pic.backgroundColor = [UIColor blueColor]; +// _pic.backgroundColor = [UIColor blueColor]; [_picBackImg addSubview:_pic]; _sureBtn @@ -128,7 +128,7 @@ -(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{ - return pickerView.frame.size.height/5;; + return pickerView.frame.size.height/5; } -(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{ diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.h new file mode 100644 index 0000000..8ba404a --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.h @@ -0,0 +1,18 @@ +// +// PlusTableViewCell.h +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PlusTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UIButton *addTimerBtn; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.m new file mode 100644 index 0000000..5af04fb --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.m @@ -0,0 +1,24 @@ +// +// PlusTableViewCell.m +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "PlusTableViewCell.h" + +@implementation PlusTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.xib b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.xib new file mode 100644 index 0000000..17e44f0 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/PlusTableViewCell.xib @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.h new file mode 100644 index 0000000..a875b40 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.h @@ -0,0 +1,21 @@ +// +// SetTimerCell.h +// Ifish +// +// Created by Alex on 2019/5/1. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SetTimerCell : UITableViewCell + +@property (weak, nonatomic) IBOutlet UIButton *switchBtn; + +- (void)configTitleLabel:(NSString *)title timer:(NSString *)timeStr switchStatus:(BOOL)status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.m new file mode 100644 index 0000000..3233567 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.m @@ -0,0 +1,36 @@ +// +// SetTimerCell.m +// Ifish +// +// Created by Alex on 2019/5/1. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "SetTimerCell.h" + +@interface SetTimerCell () +@property (weak, nonatomic) IBOutlet UILabel *titleLabel; +@property (weak, nonatomic) IBOutlet UILabel *timerLabel; + +@end + +@implementation SetTimerCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)configTitleLabel:(NSString *)title timer:(NSString *)timeStr switchStatus:(BOOL)status { + _titleLabel.text = title; + _timerLabel.text = timeStr; + _switchBtn.selected = status; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.xib b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.xib new file mode 100644 index 0000000..45cfad0 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/SetTimerCell.xib @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToControlNameViewController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToControlNameViewController.m index 71b0824..8e249d6 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToControlNameViewController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToControlNameViewController.m @@ -18,7 +18,7 @@ #define XUTOCHCELL_JIARE 50005 @interface XuToControlNameViewController () - +@property (nonatomic,assign) BOOL isModify; @end @implementation XuToControlNameViewController @@ -88,37 +88,57 @@ } if (indexPath.section==1&&indexPath.row==0) { if (_isNewdevice) { - cell.chName.text = name.shajunLight; + NSLog(@"wde name = %@",cell.chName.text); + if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.shajunLight]) { + }else { + cell.chName.text = name.shajunLight; + } }else { cell.chName.text = name.airPump; } }else if (indexPath.section==1&&indexPath.row==1){ if (_isNewdevice) { - cell.chName.text = name.zengyangPump; + if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.zengyangPump]) { + }else { + cell.chName.text = name.zengyangPump; + } }else{ cell.chName.text = name.light1; } }else if (indexPath.section==1&&indexPath.row==2){ if (_isNewdevice) { - cell.chName.text = name.light1; + if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.light1]) { + }else { + cell.chName.text = name.light1; + + } }else{ cell.chName.text = name.light2; } }else if (indexPath.section==1&&indexPath.row==3){ if (_isNewdevice) { - cell.chName.text = name.light2; + if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.light2]) { + }else{ + cell.chName.text = name.light2; + } }else{ cell.chName.text = name.huLiDeng; } }else if (indexPath.section==1&&indexPath.row==4){ if (_isNewdevice) { - cell.chName.text = name.zaolangPump; + if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.zaolangPump]) { + }else{ + cell.chName.text = name.zaolangPump; + } }else{ cell.chName.text = name.waterPump; } }else if (indexPath.section==1&&indexPath.row==5){ if (_isNewdevice) { - cell.chName.text = name.huLiDeng; + if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.huLiDeng]) { + }else{ + cell.chName.text = name.huLiDeng; + } }else{ cell.chName.text = name.jiaRe; } @@ -135,7 +155,6 @@ -(void)sureAction { - //RunSunCHNameCustom 本地处理 保存按钮名称 不与服务器交互 XuToControlName *name = [[XuToControlName alloc] init]; RuSunChangeNameTextViewCell*cell1 = [self.view viewWithTag:XUTOCHCELL_AIR]; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.h index 0ee3fe8..65f125f 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.h +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.h @@ -20,9 +20,6 @@ @property(nonatomic,strong)NSArray*titleArr; @property(nonatomic)BOOL isAuto;// 自动模式 @property(nonatomic)UIActivityIndicatorView*indicatorView; -/// 是否是新绚多设备 -@property(nonatomic,assign)BOOL isNewDevice; - -(void)addAlertView; @property(nonatomic)int percent; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.m index 2073a6c..097edf2 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuToSetViewController.m @@ -68,9 +68,6 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. - if (_isNewDevice) { - [self.navigationController.navigationBar resetBackgroundImage]; - } _waterInfmodel=[[setRemindWaterModel alloc]init]; [super viewDidLoad]; _mainQueue = dispatch_get_main_queue(); @@ -198,7 +195,6 @@ } - - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { XutoBackMsgModel *backmodel=[[DataCenter defaultDtacenter]valueForKey:@"xutoBackInfo"]; @@ -358,7 +354,7 @@ } - SetTimeModel*model=[[SetTimeModel alloc]init]; + SetTimeModel*model=[[SetTimeModel alloc]init]; model.title=self.titleArr[indexPath.section][indexPath.row]; cell.titleLabel.text=model.title; model.timestring=self.timeArr[indexPath.section][indexPath.row]; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.h index 041410d..ca8776c 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.h +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.h @@ -8,6 +8,7 @@ #import #import "Xuanduo2Model.h" +#import "Xuanduo2TimerModel.h" NS_ASSUME_NONNULL_BEGIN @@ -15,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN +(void)readSocketDataWithBackMsgModel:(Xuanduo2Model*)xuanduoModel addWithBackData:(NSData*)data; ++(void)readTimerSocketDataWithBackMsgModel:(Xuanduo2TimerModel*)xuanduoTimerModel addWithBackStr:(NSString*)dataStr; + +(void)resetNewXuanduoButtonState:(UIButton*)uvLightBtn gasPumpLight:(UIButton*)gasLightBtn light1:(UIButton*)light1Btn light2:(UIButton*)light2Btn waveLight:(UIButton*)waveLightBtn huliLight:(UIButton*)huliLightBtn waterLight:(UIButton*)waterLightBtn heatLight:(UIButton*)heatLightBtn withModel:(Xuanduo2Model*)backModel; @end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m index db615fa..7da8df2 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m @@ -86,4 +86,26 @@ } } ++(void)readTimerSocketDataWithBackMsgModel:(Xuanduo2TimerModel*)xuanduoTimerModel addWithBackStr:(NSString*)dataStr { + xuanduoTimerModel.lightNumber = [dataStr substringWithRange:NSMakeRange(30, 2)]; + xuanduoTimerModel.groupSum = [dataStr substringWithRange:NSMakeRange(32, 2)]; + UInt64 sum = [dataContorl hexToTen:xuanduoTimerModel.groupSum]; + for (int i = 0; i < sum; i ++) { + NSString *groupStr = [dataStr substringWithRange:NSMakeRange(34+i*12, 12)]; + XuanduoTimerGroup *group = [[XuanduoTimerGroup alloc] init]; + group.groupNumber = [NSString stringWithFormat:@"%llu",[dataContorl hexToTen:[groupStr substringWithRange:NSMakeRange(0, 2)]]]; + NSString *str1 = [groupStr substringWithRange:NSMakeRange(0, 2)]; + NSLog(@"====== str1 ==== %@",str1); + group.status = [groupStr substringWithRange:NSMakeRange(2, 2)]; + NSString *startStr = [dataContorl hexStringToDateString:[groupStr substringWithRange:NSMakeRange(4, 4)]]; + NSString *endStr = [dataContorl hexStringToDateString:[groupStr substringWithRange:NSMakeRange(8, 4)]]; + if ([startStr compare:endStr] == NSOrderedDescending) { + group.isCrossDay = YES; + } + group.startTime = startStr; + group.endTime = endStr; + group.time = [NSString stringWithFormat:@"%@ - %@",startStr,endStr]; + [xuanduoTimerModel.groupModelArr addObject:group]; + } +} @end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.h new file mode 100644 index 0000000..8b9d68a --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.h @@ -0,0 +1,25 @@ +// +// Xuanduo2SettingController.h +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "FatherController.h" + +NS_ASSUME_NONNULL_BEGIN + +@class Xuanduo2Model; + +@interface Xuanduo2SettingController : FatherController + +@property (nonatomic,strong) UIActivityIndicatorView*indicatorView; +@property (nonatomic ,strong) Xuanduo2Model *dataModel; +@property(nonatomic,strong) DeviceModel* currentdevice; + +- (void)refreshWithData:(Xuanduo2Model *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m new file mode 100644 index 0000000..e0c1ea6 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m @@ -0,0 +1,1202 @@ +// +// Xuanduo2SettingController.m +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "Xuanduo2SettingController.h" +#import "UINavigationBar+Background.h" +#import "TemperatureSetCell.h" +#import "ChangeWaterCell.h" +#import "Xuanduo2Model.h" +#import "TemperatureSetModel.h" +#import "setWaringTpModel.h" +#import "remindCyclePic.h" +#import "MyPickerView.h" +#import "PlusTableViewCell.h" +#import "SetTimerCell.h" +#import "XuanduoSectionHeaderView.h" +#import "XuanduoSelectHeader.h" +#import "MydatePickerView.h" +#import "SetTimerModel.h" +#import "ReadTimerModel.h" +#import "Xuanduo2DataUtility.h" +#import "Xuanduo2TimerModel.h" + +#define kBtnTag 500 +#define kSwitchBtnTag 600 +static NSString *temperatureCellid = @"TemperatureSetCell"; +static NSString *changeWaterCellid = @"ChangeWaterCell"; +static NSString *addCellid = @"PlusTableViewCell"; +static NSString *plusflag = @"plusCell"; +static NSString *setTimerflag = @"SetTimerCell"; + + +@interface Xuanduo2SettingController () +@property(nonatomic,strong) setRemindWaterModel *waterInfmodel; +@property(nonatomic,strong) Xuanduo2TimerModel *timerModel; +@property (nonatomic,strong) NSMutableDictionary *timeDic; +@property(nonatomic,copy) NSString *nextChangeDateLabel; +@property(nonatomic,strong) MyHud *XuTohud; + +@end + +@implementation Xuanduo2SettingController +{ + NSString *_wenduString; + NSIndexPath *_indexPath; + MyPickerView *_mypicView; + NSArray *_titieArr; + NSArray *_imgArr; + remindCyclePic*_remindPic; + BOOL _huanShuiSwitchIsOn; + NSInteger _selectSection; + MydatePickerView*_mydatepicView; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + if (_currentdevice) { + [IFISHHTTPTOOL getRemindWaterInfWith:_currentdevice.deviceId huishuiInfo:^(setRemindWaterModel *remindModel) { + + self.waterInfmodel=remindModel; + + NSUserDefaults*defuat=[NSUserDefaults standardUserDefaults]; + + [defuat setInteger:self.waterInfmodel.remindcycle forKey:@"xuto2picResult"]; + [defuat synchronize]; + self.nextChangeDateLabel=self.waterInfmodel.remindDate; + + [self.tableView reloadData]; + }]; + } +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self setup]; + [self connect]; +} + +- (void)viewWillDisappear:(BOOL)animated{ + [_indicatorView stopAnimating]; +} + +- (void)setup { + [self.navigationController.navigationBar resetBackgroundImage]; + [self addTitleViewWithTitle:@"水族箱设置"]; + [self refreshWithData:self.dataModel]; + [self setupTable]; + [self creatIndicatorView]; + [Socketsingleton sharedInstance].communiteDelegate = self; +} + +- (void)refreshWithData:(Xuanduo2Model *)model { + NSString*low = model.miniTemp; + NSString*heigh = model.maxTemp; + UInt64 lowten = [dataContorl hexToTen:low]; + UInt64 heighten = [dataContorl hexToTen:heigh]; + float formatlow = lowten/10; + float formatheigh = heighten/10; + _wenduString = [NSString stringWithFormat:@"%.0f~%.0f°C",formatlow,formatheigh]; +} + +- (void)setupTable { + _titieArr = @[@"循环泵",@"增氧泵",@"灯光1",@"灯光2",@"造浪泵",@"杀菌灯"]; + _imgArr = @[@"xunhuan_big",@"gas_big",@"light_big",@"light_big",@"wave_big",@"shajun_big"]; + _selectSection = -1; + for (int i = 0; i<_titieArr.count; i++) { + NSMutableArray *dataArr = [NSMutableArray arrayWithCapacity:0]; + [dataArr addObject:plusflag]; + [self.timeDic setObject:dataArr forKey:_titieArr[i]]; + } + self.tableView.backgroundColor=COLOR_MIAN; + self.tableView.separatorStyle=UITableViewCellSeparatorStyleNone; + [self.tableView registerNib:[UINib nibWithNibName:temperatureCellid bundle:nil] forCellReuseIdentifier:temperatureCellid]; + [self.tableView registerNib:[UINib nibWithNibName:changeWaterCellid bundle:nil] forCellReuseIdentifier:changeWaterCellid]; + [self.tableView registerNib:[UINib nibWithNibName:addCellid bundle:nil] forCellReuseIdentifier:addCellid]; + [self.tableView registerNib:[UINib nibWithNibName:setTimerflag bundle:nil] forCellReuseIdentifier:setTimerflag]; +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 2 + self.timeDic.allKeys.count; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + if (section == 0) { + return 1; + }else if (section == 1){ + return 2; + } + if (section - 2 < _titieArr.count) { + NSArray *dataArr = [self.timeDic objectForKey:_titieArr[section-2]]; + return dataArr.count; + } + return 0; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0){ + TemperatureSetCell *cell = [tableView dequeueReusableCellWithIdentifier:temperatureCellid]; + TemperatureSetModel *model=[[TemperatureSetModel alloc]init]; + model.title = @"预警设置"; + cell.titleLabel.text = model.title; + NSLog(@"wendu str = %@",_wenduString); + model.temperatureLabel = _wenduString; + cell.temperaturelabel.text = model.temperatureLabel; + [cell.temPSwitch addTarget:self action:@selector(xuTotempSwitchAction:) forControlEvents:UIControlEventTouchUpInside]; + if (self.dataModel) { + if ([self.dataModel.alarmSwitch isEqualToString:@"01"]) { + + [cell.temPSwitch setBackgroundImage:[UIImage imageNamed:@"greenbtn_big"] forState:UIControlStateNormal]; + cell.temPSwitch.selected = NO; + + }else{ + + [cell.temPSwitch setBackgroundImage:[UIImage imageNamed:@"graybtn_big"] forState:UIControlStateNormal]; + + cell.temPSwitch.selected = YES; + } + + } + + return cell; + }else if(indexPath.section == 1 && indexPath.row == 0){ + if (![self.currentdevice.waterRemind isEqual:[NSNull null]]) { + ChangeWaterCell *cell = [tableView dequeueReusableCellWithIdentifier:changeWaterCellid]; + [cell.ChangeWaterSwitch addTarget:self action:@selector(xuTochangeWaterSwitch:) forControlEvents:UIControlEventTouchUpInside]; + + if ([self.waterInfmodel.waterremind isEqualToString:@"1"]) { + [cell.ChangeWaterSwitch setBackgroundImage:[UIImage imageNamed:@"greenbtn_big"] forState:UIControlStateNormal]; + cell.ChangeWaterSwitch.selected = NO; + cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"firstSetCell"]]; + _huanShuiSwitchIsOn=YES; + }else{ + [cell.ChangeWaterSwitch setBackgroundImage:[UIImage imageNamed:@"graybtn_big"] forState:UIControlStateNormal]; + cell.ChangeWaterSwitch.selected = YES; + _huanShuiSwitchIsOn=NO; + cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"set_cellBack"]]; + } + + if (self.waterInfmodel.remindcycle == 0) { + //在未获取换水信息时暂时显示 + cell.huanshuiDaylabel.text=@"换水时间"; + }else{ + + cell.huanshuiDaylabel.text=[NSString stringWithFormat:@"%ld天",(long)self.waterInfmodel.remindcycle]; + NSLog(@"ce;;%@",cell.huanshuiDaylabel.text); + + NSLog(@"222"); + } + + + return cell; + + } + }else if (indexPath.section==1 && indexPath.row == 1){ + + static NSString*nextHuanShuiLablecellId=@"labelcell"; + UITableViewCell*cell=[tableView dequeueReusableCellWithIdentifier:nextHuanShuiLablecellId]; + if (cell==nil) { + cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:nextHuanShuiLablecellId]; + } + if (_huanShuiSwitchIsOn) { + + cell.textLabel.text=[NSString stringWithFormat:@"下次换水时间:%@",self.waterInfmodel.remindDate]; + if (!self.waterInfmodel.remindDate) { + cell.textLabel.text=[NSString stringWithFormat:@"下次换水时间:%@",self.nextChangeDateLabel]; + } + cell.textLabel.font=[UIFont systemFontOfSize:15]; + [cell.textLabel sizeToFit]; + + cell.textLabel.textColor =[UIColor colorWithRed:146.0/256.0 green:146.0/256.0 blue:146.0/256.0 alpha:1]; + cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"secondSetCell"]]; + + }else{ + cell.textLabel.text=@""; + } + cell.userInteractionEnabled = NO; + return cell; + + }else { + if (indexPath.section - 2 < _titieArr.count && _selectSection == indexPath.section) { + NSArray *dataArr = [self.timeDic objectForKey:_titieArr[indexPath.section-2]]; + BOOL havePlus = [dataArr containsObject:plusflag]; + if (havePlus && (indexPath.row == dataArr.count-1)) { + PlusTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:addCellid forIndexPath:indexPath]; + cell.addTimerBtn.tag = kBtnTag + indexPath.section; + [cell.addTimerBtn addTarget:self action:@selector(addTimer:) forControlEvents:UIControlEventTouchUpInside]; + return cell; + }else { + SetTimerCell *cell = [tableView dequeueReusableCellWithIdentifier:setTimerflag forIndexPath:indexPath]; + cell.switchBtn.tag = kSwitchBtnTag + indexPath.row; + [cell.switchBtn addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventTouchUpInside]; + XuanduoTimerGroup *group = [dataArr objectAtIndex:havePlus?indexPath.row+1:indexPath.row]; + BOOL isOn = NO; + if ([group.status isEqualToString:@"01"]) { + isOn = YES; + } + [cell configTitleLabel:[NSString stringWithFormat:@"时段%@",group.groupNumber] timer:group.time switchStatus:isOn]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; + } + } + } + return [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@""]; +} + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + if (indexPath.section == 0) { + return 50; + }else if (indexPath.section == 1 && indexPath.row == 0){ + return 50; + }else if (indexPath.section == 1 && indexPath.row == 1){ + if (!_huanShuiSwitchIsOn) { + }else { + return 50; + } + }else if (indexPath.section - 2 <_titieArr.count) { + NSArray *dataArr = [self.timeDic objectForKey:_titieArr[indexPath.section-2]]; + BOOL havePlus = [dataArr containsObject:plusflag]; + if (_selectSection == indexPath.section) { + if (havePlus && indexPath.row == dataArr.count - 1) { + return 80; + }else{ + return 50; + } + }else { + return 0; + } + } + + return 0; +} + +#pragma mark tableView 头视图和脚视图 +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ + if (section == 0) { + return 5; + }else if (section == 2){ + return 80; + }else if (section == 3){ + return 40; + }else if (section == 4){ + return 40; + }else if (section == 5){ + return 40; + }else if (section == 6){ + return 40; + }else if (section == 7){ + return 40; + }else { + return CGFLOAT_MIN; + } + +} + +- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + if (section == 0) { + UIView *oneHeader = [[UIView alloc] init]; + oneHeader.backgroundColor = COLOR_MIAN; + return oneHeader; + }else if(section == 2){ + XuanduoSectionHeaderView *section1HeaderView = [XuanduoSectionHeaderView shareHeaderView]; + section1HeaderView.arrowBtn.tag = kBtnTag + section; + if (_selectSection == section) { + section1HeaderView.arrowBtn.selected = YES; + } + section1HeaderView.titleLabel.text = _titieArr[section-2]; + [section1HeaderView.arrowBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; + return section1HeaderView; + }else if(section == 3){ + XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; + headerView.controlBtn.tag = kBtnTag + section; + if (_selectSection == section) { + headerView.controlBtn.selected = YES; + } + [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; + [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; + return headerView; + }else if(section == 4){ + XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; + headerView.controlBtn.tag = kBtnTag + section; + if (_selectSection == section) { + headerView.controlBtn.selected = YES; + } + [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; + [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; + return headerView; + }else if(section == 5){ + XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; + headerView.controlBtn.tag = kBtnTag + section; + if (_selectSection == section) { + headerView.controlBtn.selected = YES; + } + [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; + [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; + return headerView; + }else if(section == 6){ + XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; + headerView.controlBtn.tag = kBtnTag + section; + if (_selectSection == section) { + headerView.controlBtn.selected = YES; + } + [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; + [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; + return headerView; + }else if(section == 7){ + XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; + headerView.controlBtn.tag = kBtnTag + section; + if (_selectSection == section) { + headerView.controlBtn.selected = YES; + } + [headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; + [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; + return headerView; + } + + return nil; +} + +#pragma mark tableView 点击事件 + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + _indexPath = indexPath; + if (indexPath.section==0) { + _mypicView=[[MyPickerView alloc]init]; + + _mypicView.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height); + [self.view.window addSubview:_mypicView]; + [_mypicView.sureButton addTarget:self action:@selector(mypicViewRemoveByDone) forControlEvents:UIControlEventTouchUpInside]; + [self temperatureMainQueue]; + + }else if (indexPath.section==1){ + //换水提醒日期选择 + _remindPic=[[remindCyclePic alloc]init]; + + _remindPic.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height); + [self.view.window addSubview:_remindPic]; + [_remindPic.sureBtn addTarget:self action:@selector(xuToremindCyclePicDone) forControlEvents:UIControlEventTouchUpInside]; + [self huanShuiMainQueue]; + }else { + UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:_indexPath]; + if ([cell isKindOfClass:[PlusTableViewCell class]]) { + return; + } + [self addTimer:nil]; + } +} + +-(void)temperatureMainQueue{ + NSArray*lowArr=[_mypicView.picArr objectAtIndex:0]; + NSArray*heighArr=[_mypicView.picArr objectAtIndex:2]; + for (NSInteger i=0; i=0 && [readTimer isEqualToString:@"0116"]) { + if (!_timerModel) { + _timerModel = [[Xuanduo2TimerModel alloc] init]; + _timerModel.groupModelArr = [NSMutableArray array]; + }else { + [_timerModel.groupModelArr removeAllObjects]; + } + [Xuanduo2DataUtility readTimerSocketDataWithBackMsgModel:_timerModel addWithBackStr:string1]; + NSMutableArray *dataArr = [self.timeDic objectForKey:_titieArr[_selectSection-2]]; + [dataArr removeAllObjects]; + [dataArr addObject:plusflag]; + [dataArr addObjectsFromArray:_timerModel.groupModelArr]; + BOOL havePlus = [dataArr containsObject:plusflag]; + if (havePlus && dataArr.count > 10) { + [dataArr removeObjectAtIndex:0]; + }else if (!havePlus && dataArr.count < 10){ + [dataArr insertObject:plusflag atIndex:0]; + } + NSLog(@"dataarr.count = %ld",dataArr.count); + + [self.XuTohud hidmyHud]; + [self.indicatorView stopAnimating]; + [self.tableView reloadData]; + } + if ([readTimer isEqualToString:@"0108"] || [readTimer isEqualToString:@"0105"]) { + [Xuanduo2DataUtility readSocketDataWithBackMsgModel:self.dataModel addWithBackData:data]; + [self refreshWithData:self.dataModel]; + [self.XuTohud hidmyHud]; + [self.indicatorView stopAnimating]; + [self.tableView reloadData]; + } +} + +-(void)ifishDeviceLogInFail{ + +} + +-(void)ifishDeviceLogInSuccees{ + +} + +-(void)ifishSocket:(AsyncSocket *)sock didAcceptNewSocket:(AsyncSocket *)newSocket{ + +} + + + +@end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2TimerModel.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2TimerModel.h new file mode 100644 index 0000000..4f5e915 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2TimerModel.h @@ -0,0 +1,48 @@ +// +// Xuanduo2TimerModel.h +// Ifish +// +// Created by Alex on 2019/5/3. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +#if 0 +01 16 807d3a42a200 807d3a42a200 25 +05 +03 +01 00 0501 0403 +02 00 060f 0e11 +03 00 0f15 1410 +17cc +#endif + +@interface XuanduoTimerGroup : NSObject +/// 时间段 +@property (nonatomic, strong) NSString *time; +/// 灯状态 +@property (nonatomic, strong) NSString *status; +/// 第几组 +@property (nonatomic, strong) NSString *groupNumber; +@property (nonatomic, strong) NSString *startTime; +@property (nonatomic, strong) NSString *endTime; +/// 是否跨天 +@property (nonatomic, assign) BOOL isCrossDay; + + +@end + +@interface Xuanduo2TimerModel : NSObject + +/// 灯的序号 +@property (nonatomic, strong) NSString *lightNumber; +@property (nonatomic, strong) NSString *groupSum; +@property (nonatomic, strong) NSMutableArray *groupModelArr; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2TimerModel.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2TimerModel.m new file mode 100644 index 0000000..b48f801 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2TimerModel.m @@ -0,0 +1,17 @@ +// +// Xuanduo2TimerModel.m +// Ifish +// +// Created by Alex on 2019/5/3. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "Xuanduo2TimerModel.h" + +@implementation XuanduoTimerGroup + +@end + +@implementation Xuanduo2TimerModel + +@end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m index 76e4345..c095370 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m @@ -12,7 +12,6 @@ #import "DeviceCameraModel.h" #import "XuToControlNameViewController.h" #import "IfishDataUnity.h" -#import "XuToSetViewController.h" #import "CreatErWeiMaController.h" #import "SongBaoViewController.h" #import "XuToControlName.h" @@ -21,10 +20,16 @@ #import "NSString+Add.h" #import "XuanduoHuliModel.h" #import "Xuanduo2DataUtility.h" +#import "HaveHotCoolWenDuPicview.h" +#import "Xuanduo2SettingController.h" +#import "RuSunLightOrder.h" +#import "JHRefreshAmazingAniView.h" +#import "JHRefresh.h" +#import "searchDeviceModel.h" #define kBtnTag 100 -@interface Xuanduo2fController () +@interface Xuanduo2fController () @property(nonatomic,strong) DXPopover *popover; @property (weak, nonatomic) IBOutlet UIView *positionView; @property (weak, nonatomic) IBOutlet UILabel *shajunLight; @@ -50,7 +55,15 @@ @property (weak, nonatomic) IBOutlet UIButton *waterLight; @property (weak, nonatomic) IBOutlet UIButton *heatLight; @property(nonatomic,copy) UIActivityIndicatorView *indicatorView; +@property(nonatomic,strong) HaveHotCoolWenDuPicview *wenduPicview; @property(nonatomic,strong) MyHud *XuTohud; +@property (weak, nonatomic) IBOutlet UILabel *offLineLabel; + +@property (weak, nonatomic) IBOutlet UIScrollView *scrollview; +@property(nonatomic)BOOL isRefeshing; +@property(nonatomic) BOOL isconnect;// socket 是否连接 +@property (weak, nonatomic) IBOutlet UIView *contentView; +@property (weak, nonatomic) IBOutlet UIImageView *imageView; @end @@ -58,6 +71,7 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + [Socketsingleton sharedInstance].communiteDelegate = self; self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName :[UIColor blackColor]}; } @@ -86,6 +100,7 @@ [Socketsingleton sharedInstance].communiteDelegate = self; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tempSwitch)]; [self.tempLabel addGestureRecognizer:tap]; + [self creatRefreshView]; } - (void)connect { @@ -94,6 +109,48 @@ } } +#pragma mark - 刷新 +-(void)creatRefreshView{ + self.scrollview.delegate = self; + __weak typeof (self)weakSelf=self; + [weakSelf.scrollview addRefreshHeaderViewWithAniViewClass:[JHRefreshAmazingAniView class] beginRefresh:^{ + if (weakSelf.isRefeshing) { + return ; + } + + weakSelf.isRefeshing=YES; + if (weakSelf.isconnect) { + searchDeviceModel*xinxiModel=[[searchDeviceModel alloc]init]; + xinxiModel.resavemacId = self.currentDevice.macAddress; + xinxiModel.sendmacId = self.currentDevice.macAddress; + + NSString*requestStr=xinxiModel.description; + NSLog(@"REQUEST = %@",requestStr); + NSData*data1=[dataContorl stringToHexData:requestStr]; + [[Socketsingleton sharedInstance].clientSocket writeData:data1 withTimeout:-1 tag:0]; + [[Socketsingleton sharedInstance].clientSocket readDataWithTimeout:-1 tag:0]; + + }else{// socket中断 + [weakSelf InitSocket]; + + } + }]; +} + +-(void)endRefreshing{ + if (self.isRefeshing) { + self.isRefeshing=NO; + [self.scrollview headerEndRefreshingWithResult:JHRefreshResultSuccess]; + } +} + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView{ + CGFloat offset = scrollView.contentOffset.y; + if (offset >0) { + [self.scrollview setContentOffset:CGPointMake(0, 0)]; + } +} + #pragma mark - 连接socket -(void)InitSocket{ NSLog(@"******%d",[Socketsingleton sharedInstance].clientSocket.isConnected); @@ -112,14 +169,14 @@ //断线重连功能需要在这里进行 -(void)ifishSocketDidDisconnect:(AsyncSocket *)sock{ - - + _isconnect=NO; + [self endRefreshing]; } -(void)ifishSocket:(AsyncSocket *)sock willDisconnectWithError:(NSError *)err{ // NSLog(@"soket错误断开"); // NSLog(@"存留数据%@",[sock unreadData]); - + _offLineLabel.hidden = NO; } -(BOOL)ifishSocketWillConnect:(AsyncSocket *)sock{ @@ -134,13 +191,13 @@ -(void)ifishSocket:(AsyncSocket *)sock ifishSocketdidConnectToHost:(NSString *)host port:(UInt16)port{ //已建立连接 登陆指令同意在soket单例中 - + _isconnect=YES; } //发送完成处理 -(void)ifishSocket:(AsyncSocket *)sock didWriteDataWithTag:(long)tag{ - + [self endRefreshing]; } #pragma mark 登陆成功后收到服务端的回执之后,调用的代理方法 @@ -152,13 +209,20 @@ -(void)socketDidGetBackmsgData:(NSData *)data onsoket:(AsyncSocket *)sock{ //[_HUD hide:YES]; [self.XuTohud hidmyHud]; + [self endRefreshing]; + NSLog(@"123124124"); [Xuanduo2DataUtility readSocketDataWithBackMsgModel:self.dataModel addWithBackData:data]; if ([self.tipLabel.text isEqualToString:@"鱼缸温度"]) { [self setTemperature]; } + if (self.dataModel.gasPump) { + _offLineLabel.hidden = YES; + }else { + _offLineLabel.hidden = NO; + } [Xuanduo2DataUtility resetNewXuanduoButtonState:self.uvLight gasPumpLight:self.gasPumpLight light1:self.light1 light2:self.light2 waveLight:self.waveLight huliLight:self.huliLight waterLight:self.waterLight heatLight:self.heatLight withModel:self.dataModel]; - } + -(void)ifishDeviceLogInFail{ } @@ -174,7 +238,7 @@ #pragma mark -- actions -- - (IBAction)btnActions:(UIButton *)btn { - if (self.dataModel) { + if (self.dataModel.gasPump) { }else{ [self showLableAction:@"设备已离线"]; @@ -190,9 +254,20 @@ } lightModel.crc16Str=@"0000";// CRC16验证码 switch (btn.tag) { - case kBtnTag: //杀菌灯 + case kBtnTag: // 循环泵 { - [self changLightStatus:lightModel withLightNumber:@"05" dataStr:switchString1]; + if (btn.selected) { + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"确认关闭循环泵?" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:nil]; + UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + [self changLightStatus:lightModel withLightNumber:@"04" dataStr:switchString1]; + }]; + [alertController addAction:cancelAction]; + [alertController addAction:sureAction]; + [self.navigationController presentViewController:alertController animated:YES completion:nil]; + }else { + [self changLightStatus:lightModel withLightNumber:@"04" dataStr:switchString1]; + } } break; case kBtnTag + 1: //增氧 @@ -215,7 +290,12 @@ [self changLightStatus:lightModel withLightNumber:@"06" dataStr:switchString1]; } break; - case kBtnTag + 5: //护理灯 单独处理 + case kBtnTag + 5: //杀菌灯 + { + [self changLightStatus:lightModel withLightNumber:@"05" dataStr:switchString1]; + } + break; + case kBtnTag + 6: //护理灯 单独处理 { XuanduoHuliModel *huliModel = [[XuanduoHuliModel alloc] init]; huliModel.sendmacId = self.currentDevice.macAddress; @@ -237,14 +317,28 @@ } } break; - case kBtnTag + 6: //循环泵 - { - [self changLightStatus:lightModel withLightNumber:@"04" dataStr:switchString1]; - } - break; case kBtnTag + 7: //加热棒 { - [self changLightStatus:lightModel withLightNumber:@"" dataStr:switchString1]; + if (self.dataModel.gasPump) { + _wenduPicview=[[HaveHotCoolWenDuPicview alloc] init]; + _wenduPicview.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height); + [_wenduPicview.sureBtn addTarget:self action:@selector(sureBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + + [self.view.window addSubview:_wenduPicview]; + _wenduPicview.wenDuPicviewDelegate = self; + NSString *stateStr =nil; + if ([self.dataModel.status isKindOfClass:[NSNull class]]||!self.dataModel.status ) { + self.dataModel.status = @"0000"; + } + stateStr = [self.dataModel.status substringWithRange:NSMakeRange(2, 2)]; + [_wenduPicview initCateBtnSate:stateStr]; + + [self heatAction]; + + }else{ + + [self showLableAction:@"设备已离线"]; + } } break; default: @@ -252,6 +346,80 @@ } } +#pragma mark - 加热棒处理 - +- (void)sureBtnClick:(UIButton *)btn { + NSLog(@"%@******** _wenduPicview.picViewResultString",_wenduPicview.picViewResultString); + if (_wenduPicview.picViewResultString ==nil) { + + [_wenduPicview removeFromSuperview]; + + }else{ + + JiaReWenDuModel *model=[[JiaReWenDuModel alloc] init]; + model.resavemacId = self.currentDevice.macAddress; + model.sendmacId = self.currentDevice.macAddress; + int intlowString = [_wenduPicview.picViewResultString intValue]; + int newIntlowString=intlowString*10; + + NSLog(@"%d******** newIntlowString",newIntlowString); + // 转四位16进制 + model.JiaReWenDu=[dataContorl tpIntStringToFourHex:newIntlowString]; + model.crc16Code =@"0000"; + + NSString * hexstring=[NSString stringWithFormat:@"%@%@%@",model.description,model.JiaReWenDu,model.crc16Code]; + NSData*data=[dataContorl stringToHexData:hexstring]; + + [ [Socketsingleton sharedInstance] soketWriteData:data]; + } + + [_wenduPicview removeFromSuperview]; + +} + +- (void)heatAction +{ + UInt64 mac=[dataContorl hexToTen:self.dataModel.heatingTemperature]; + NSLog(@"%llu",mac); + float TPlabel=mac/10; + int temp= (int)(TPlabel+0.5); + NSString *stringFloat = [NSString stringWithFormat:@"%d",temp]; + NSLog(@"%@",stringFloat); + NSArray*wenDuArr=[_wenduPicview.picArr objectAtIndex:0]; + + for (NSInteger i=0; i - + @@ -14,64 +14,68 @@ + - - + + + + - + + - + - + - + - + - + - + - - + + - + - - - + - + - + @@ -265,15 +284,15 @@ - + - + - + @@ -281,16 +300,17 @@ - + - - + + + @@ -298,10 +318,11 @@ - + - + + @@ -336,7 +357,7 @@ - + diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoHuliModel.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoHuliModel.m index 222a6d5..9fe0ce8 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoHuliModel.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoHuliModel.m @@ -14,7 +14,7 @@ { self.messagetype=@"00"; self.massagelegth=@"12"; - self.functionCode=@"13"; + self.functionCode=@"0d"; return [NSString stringWithFormat:@"%@%@%@%@%@", self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth]; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.h new file mode 100644 index 0000000..d6e7aaa --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.h @@ -0,0 +1,20 @@ +// +// XuanduoSectionHeaderView.h +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XuanduoSectionHeaderView : UIView ++ (instancetype)shareHeaderView; +@property (weak, nonatomic) IBOutlet UIButton *arrowBtn; +@property (weak, nonatomic) IBOutlet UILabel *titleLabel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.m new file mode 100644 index 0000000..96d1166 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.m @@ -0,0 +1,17 @@ +// +// XuanduoSectionHeaderView.m +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "XuanduoSectionHeaderView.h" + +@implementation XuanduoSectionHeaderView + ++ (instancetype)shareHeaderView { + return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([XuanduoSectionHeaderView class]) owner:nil options:nil].lastObject; + +} +@end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.xib b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.xib new file mode 100644 index 0000000..0b90c97 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSectionHeaderView.xib @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.h b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.h new file mode 100644 index 0000000..c1d9f9a --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.h @@ -0,0 +1,21 @@ +// +// XuanduoSelectHeader.h +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XuanduoSelectHeader : UIView + ++ (instancetype)shareHeaderView; +@property (weak, nonatomic) IBOutlet UIButton *controlBtn; +- (void)configWithImageName:(NSString *)name labelName:(NSString *)labelName; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.m new file mode 100644 index 0000000..d1fde0c --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.m @@ -0,0 +1,29 @@ +// +// XuanduoSelectHeader.m +// Ifish +// +// Created by Alex on 2019/4/28. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "XuanduoSelectHeader.h" + +@interface XuanduoSelectHeader () +@property (weak, nonatomic) IBOutlet UIImageView *imageView; +@property (weak, nonatomic) IBOutlet UILabel *label; + +@end + +@implementation XuanduoSelectHeader + ++ (instancetype)shareHeaderView { + return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([XuanduoSelectHeader class]) owner:nil options:nil].lastObject; + +} + +- (void)configWithImageName:(NSString *)name labelName:(NSString *)labelName { + self.imageView.image = [UIImage imageNamed:name]; + self.label.text = labelName; +} + +@end diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.xib b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.xib new file mode 100644 index 0000000..7be2d10 --- /dev/null +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoSelectHeader.xib @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m index 79d0e32..fa61f4b 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m @@ -67,6 +67,7 @@ #import "HaveHotCoolWenDuPicview.h" #import "RuSunLightOrder.h" #import "RuiMeiSetViewController.h" +#import "Xuanduo2SettingController.h" //上部分视频封装 下部分分段控制器 封装 (下一步代码优化) @interface IfishP2PMonitorController () @@ -87,7 +88,7 @@ BOOL _isStop;//是否暂停 用于区分是 暂停按钮 还是 连接失败按钮 dispatch_queue_t _xutoMainQueue; BOOL _isPushNextView; //是否push下级界面 - + BOOL _isNewXuanduo; //是新绚多设备 } @property(nonatomic,strong) SetTimeController*SetTimeVC; @@ -113,6 +114,8 @@ @property (nonatomic,strong) UILabel *nameTitle; @property (strong, nonatomic) UIView *shutterView; +@property(nonatomic,strong) HaveHotCoolWenDuPicview *xuanduoPicView; + @end extern BOOL formLogIn;//连接页面是否来自登录界面 @@ -4316,6 +4319,16 @@ [self.navigationController pushViewController:connectVC animated:YES]; } + +-(void)didselectXuanduo2SetttngWithData:(DeviceModel *)dmodel + andBackModel:(Xuanduo2Model *)backmodel { + Xuanduo2SettingController *setVC = [[Xuanduo2SettingController alloc] init]; + setVC.currentdevice = dmodel; + setVC.dataModel = backmodel; + usleep(50*1000); + [self.navigationController pushViewController:setVC animated:YES]; +} + //炫多 -(void)selectXuToAtIndex:(NSIndexPath*)index withbackModel:(XutoBackMsgModel *)backmodel{ @@ -4625,6 +4638,108 @@ } +-(void)selectXuanduo2Index:(NSIndexPath *)index withBackModel:(Xuanduo2Model *)backModel{ + if (backModel) { + if (index.row == 3) { + //循环泵 + manulswitchMSModel*manulModel=[[manulswitchMSModel alloc]init]; + [[Socketsingleton sharedInstance] setSoketLightDataWith:manulModel]; + NSString*switchString=manulModel.description; + manulModel.lightNumber = @"04"; + if([[backModel.waterPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + }else{ + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"确认关闭循环泵?" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:nil]; + UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + manulModel.switchBtn = @"00"; + manulModel.crc16Str = @"0000"; + NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString,manulModel.lightNumber,manulModel.switchBtn,manulModel.crc16Str]; + NSData*manulData=[dataContorl stringToHexData:switchString2]; + [[Socketsingleton sharedInstance] soketWriteData:manulData]; + }]; + [alertController addAction:cancelAction]; + [alertController addAction:sureAction]; + [self.navigationController presentViewController:alertController animated:YES completion:nil]; + return; + } + + manulModel.crc16Str = @"0000"; + NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString,manulModel.lightNumber,manulModel.switchBtn,manulModel.crc16Str]; + NSData*manulData=[dataContorl stringToHexData:switchString2]; + [[Socketsingleton sharedInstance] soketWriteData:manulData]; + }else { + _xuanduoPicView=[[HaveHotCoolWenDuPicview alloc] init]; + _xuanduoPicView.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height); + [_xuanduoPicView.sureBtn addTarget:self action:@selector(xuanduoSureBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + _isNewXuanduo = YES; + [self.view.window addSubview:_xuanduoPicView]; + _xuanduoPicView.wenDuPicviewDelegate = self; + NSString *stateStr =nil; + if ([backModel.status isKindOfClass:[NSNull class]]||!backModel.status ) { + backModel.status = @"0000"; + } + stateStr = [backModel.status substringWithRange:NSMakeRange(2, 2)]; + [_xuanduoPicView initCateBtnSate:stateStr]; + + [self heatAction:backModel]; + } + + } +} + +- (void)heatAction:(Xuanduo2Model*)model +{ + UInt64 mac=[dataContorl hexToTen:model.heatingTemperature]; + NSLog(@"%llu",mac); + float TPlabel=mac/10; + int temp= (int)(TPlabel+0.5); + NSString *stringFloat = [NSString stringWithFormat:@"%d",temp]; + NSLog(@"%@",stringFloat); + NSArray*wenDuArr=[_xuanduoPicView.picArr objectAtIndex:0]; + + for (NSInteger i=0; i + +@property (nonatomic,strong) Xuanduo2Model *dataModel; -@interface BootomViewSoketBackMasgConreol : NSObject //获取温度 +(NSString*)getTempWithSoketData:(NSData *)data; +(NSString *)getTempNewWayWithSoketData:(NSData *)data adddeviceType:(NSString *)type; @@ -42,6 +46,11 @@ indexPath; +(void)XuToControlCommandSelectorWithBackModel73:(XutoBackMsgModel *)model atindexPath:(NSIndexPath *) indexPath; +// 新绚多 ++(void)XuTo2ControlCommandSelectorWithBackModel73:(Xuanduo2Model *)model atindexPath:(NSIndexPath *) +indexPath; + + +(void)FourControlCommandSelectorWithBackModel85:(FourControlbackMassge *)model atindexPath:(NSIndexPath *)indexPath; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/BootomViewSoketBackMasgConreol.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/BootomViewSoketBackMasgConreol.m index b6f6eb2..cdf2df2 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/BootomViewSoketBackMasgConreol.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/BootomViewSoketBackMasgConreol.m @@ -9,6 +9,7 @@ #import "BootomViewSoketBackMasgConreol.h" #import "IfishDeviceInfo.h" #import "RuSunGuiDeng.h" +#import "XuanduoHuliModel.h" @implementation BootomViewSoketBackMasgConreol @@ -88,6 +89,8 @@ //瑞美 str=[str substringWithRange:NSMakeRange(148,IFISH_TEMPERATURE_BYTE2)]; + }else if ([type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + str=[str substringWithRange:NSMakeRange(60,IFISH_TEMPERATURE_BYTE2)]; } UInt64 mac=[dataContorl hexToTen:str]; @@ -913,6 +916,110 @@ indexPath{ } +// 新绚多 ++(void)XuTo2ControlCommandSelectorWithBackModel73:(Xuanduo2Model *)model atindexPath:(NSIndexPath *) +indexPath { + NSInteger index= indexPath.row - 3; + manulswitchMSModel*manulModel=[[manulswitchMSModel alloc]init]; + [[Socketsingleton sharedInstance] setSoketLightDataWith:manulModel]; + NSString*switchString=manulModel.description; + + if (index == 0) { //循环 + manulModel.lightNumber = @"04"; + + if([[model.waterPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + + }else{ + + manulModel.switchBtn = @"00"; + } + + }else if (index == 1){ //增氧 + + manulModel.lightNumber = @"01"; + + if([[model.gasPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + + }else{ + + manulModel.switchBtn = @"00"; + } + + }else if (index == 2){ //灯1 + + manulModel.lightNumber = @"02"; + + if([[model.light1 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + + }else{ + + manulModel.switchBtn = @"00"; + } + + + }else if (index == 3){ //灯2 + + manulModel.lightNumber = @"03"; + + if([[model.light2 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + + }else{ + + manulModel.switchBtn = @"00"; + } + + }else if (index == 4){ //造浪 + manulModel.lightNumber = @"06"; + + if([[model.waveMakingPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + }else{ + manulModel.switchBtn = @"00"; + } + + }else if (index == 5){ //杀菌 + manulModel.lightNumber = @"05"; + if([[model.uvLamp substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + manulModel.switchBtn = @"01"; + + }else{ + manulModel.switchBtn = @"00"; + } + }else if (index == 6) { //护理灯 + XuanduoHuliModel *huliModel = [[XuanduoHuliModel alloc] init]; + huliModel.sendmacId = [Socketsingleton sharedInstance].macAddress; + huliModel.resavemacId = [Socketsingleton sharedInstance].macAddress; + NSString *switchString = huliModel.description; + if([[model.huliLight substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) + { + huliModel.switchBtn = @"01"; + }else{ + + huliModel.switchBtn = @"00"; + } + huliModel.crc16Str=@"0000";// CRC16验证码 + NSString *switchString2 = [NSString stringWithFormat:@"%@%@%@",switchString,huliModel.switchBtn,huliModel.crc16Str]; + NSData *manulData=[dataContorl stringToHexData:switchString2]; + [[Socketsingleton sharedInstance] soketWriteData:manulData]; + return; + } + + manulModel.crc16Str = @"0000"; + NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString,manulModel.lightNumber,manulModel.switchBtn,manulModel.crc16Str]; + NSData*manulData=[dataContorl stringToHexData:switchString2]; + [[Socketsingleton sharedInstance] soketWriteData:manulData]; +} + @end diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.h b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.h index aff274a..4fe9f9f 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.h +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.h @@ -9,6 +9,7 @@ #import //竖屏水族箱 底部view #import "DeviceModel.h" +#import "Xuanduo2Model.h" #import "Socketsingleton.h" #import "BootomViewSoketBackMasgConreol.h" #import "DeviceCommunicateDataUnity.h" @@ -47,6 +48,9 @@ withData:(DeviceModel *)dmodel addMassglength:(NSUInteger) bufferlenth; +// 新绚多设置页面 +-(void)didselectXuanduo2SetttngWithData:(DeviceModel *)dmodel + andBackModel:(Xuanduo2Model *)backmodel; -(void)cameraBindDeviceSuccess; @@ -58,6 +62,8 @@ -(void)selectXuToAtIndex:(NSIndexPath*)index withbackModel:(XutoBackMsgModel *)backmodel ; +-(void)selectXuanduo2Index:(NSIndexPath *)index withBackModel:(Xuanduo2Model *)backModel; + //对应松诺加热棒 -(void)slectSongNuoInde:(NSIndexPath*)index withBackModel:(SongNuoBackMassage *)backModel; @@ -148,6 +154,8 @@ @property(nonatomic,strong) RunSun84Protocol *ruSun84Back; @property (nonatomic, strong) RuiMeiProtocolModel *ruiMeiBack; @property(nonatomic,strong) SongNuoBDProtocol *songNuoBDBack; +@property(nonatomic,strong) Xuanduo2Model *xuanduoBack; + -(void)setTabViewWithFrame:(CGRect)frame; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m index 082494b..6e1a69f 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m @@ -29,8 +29,14 @@ #import "XuToControlName.h" #import "RuiMeiCHNameCustom.h" #import "RuiMeiCHControl.h" +#import "Xuanduo2DataUtility.h" +#import "NSString+Add.h" +#define ktempTag 600 @implementation MonitorBootmView +{ + NSTimer *_switchTimer; +} -(id)initWithFrame:(CGRect)frame { @@ -610,7 +616,9 @@ } else if ([self.device.type isEqualToString:DECICE_TYPE_RUIMEI]) { return 3 + 5; - } else { + } else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + return 3 + self.device.controlAmount.integerValue + 1; + }else { if (self.device.controlAmount.integerValue ==5) { @@ -690,7 +698,30 @@ withData:self.device addMassglength:self.dataLength]; - }else{ + }else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + if (!_xuanduoBack) { + [self makeToast:@"暂未连接"]; + return; + } + if (indexPath.row == 1) { + FishControlSecondCell *cell = [self.collectionView viewWithTag:ktempTag]; + if (!cell || [cell.templabel.text containsString:@"kwh"]) { + return; + } + UInt64 mac = [dataContorl hexToTen:_xuanduoBack.electricity]; + NSString *stringTemp = [NSString stringWithFormat:@"%llukwh",mac]; + cell.templabel.font = [UIFont systemFontOfSize:37]; + cell.templabel.textColor = RGB(253, 188, 63); + [cell.templabel setAttributedText:[NSString ls_changeFontAndColor:[UIFont systemFontOfSize:17] Color:nil TotalString:stringTemp SubStringArray:@[@"kwh"]]]; + if (!_switchTimer) { + _switchTimer = [NSTimer timerWithTimeInterval:3.0 target:self selector:@selector(changeTemp) userInfo:nil repeats:YES]; + [[NSRunLoop currentRunLoop] addTimer:_switchTimer forMode:NSRunLoopCommonModes]; + } + }else if(indexPath.row == 2) { + [self.MonitorBottomDelegate didselectXuanduo2SetttngWithData:self.device andBackModel:_xuanduoBack]; + } + } + else{ int controlAmount=[self.device.controlAmount intValue]; switch (controlAmount) { @@ -894,6 +925,20 @@ } [self makeToastActivity]; + }else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + // 新绚多 + if (!_xuanduoBack) { + [self makeToast:@"暂未连接"]; + return; + } + if (indexPath.row == 10 || indexPath.row == 3) { + //点击加热棒 + [self.MonitorBottomDelegate selectXuanduo2Index:indexPath withBackModel:_xuanduoBack]; + }else{ + [BootomViewSoketBackMasgConreol XuTo2ControlCommandSelectorWithBackModel73:_xuanduoBack atindexPath:indexPath]; + } + [self makeToastActivity]; + }else{ int controlAmount=[self.device.controlAmount intValue]; @@ -1062,6 +1107,25 @@ } +- (void)changeTemp { + [self setTemperature]; + [_switchTimer invalidate]; + _switchTimer = nil; +} + +- (void)setTemperature { + FishControlSecondCell *cell = [self.collectionView viewWithTag:ktempTag]; + if (!cell) { + return; + } + UInt64 mac = [dataContorl hexToTen:_xuanduoBack.waterTemperature]; + NSLog(@"%llu",mac); + //float TPlabel=mac/10+(mac%10)*0.1; + float temp = mac/10.0; + NSString *stringTemp = [NSString stringWithFormat:@"%.1f",temp]; + [cell setTemWith:stringTemp]; +} + #pragma mark 加载脚步视图 //- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{ @@ -1116,7 +1180,7 @@ //温度 FishControlSecondCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"FishControlSecondCell" forIndexPath:indexPath]; - + cell.tag = ktempTag; cell.backgroundColor = [UIColor whiteColor]; [cell setTemWith:self.temperature]; @@ -1179,6 +1243,14 @@ [cell setSongNuoBDControBtnImg:self.btnImgArr addArr:self.btnOnImgArr atIndex:indexPath addBackModel:_songNuoBDBack]; + }else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + if (!_xuanduoBack) { + cell.controBtnImg.image = self.btnImgArr[indexPath.row - 3]; + [self makeToast:@"连接设备中..."]; + }else { + [cell setXuanduo2ControBtnImg:self.btnImgArr addArr:self.btnOnImgArr atIndex:indexPath addBackModel:_xuanduoBack]; + } + }else{ int controlAmount=[self.device.controlAmount intValue]; @@ -1395,7 +1467,27 @@ LXImageWithImageName(@"bootview_co2_on"), LXImageWithImageName(@"bootview_heat_on")]; - } else{ + }else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + self.btnNameArr = @[@"循环泵",@"增氧泵",@"灯光1",@"灯光2",@"造浪泵",@"杀菌灯",@"护理灯",@"加热棒"]; + + self.btnImgArr = @[[UIImage imageNamed:@"xunhuan_noraml"], + [UIImage imageNamed:@"zengyang_noraml"], + [UIImage imageNamed:@"dengguang_normal"], + [UIImage imageNamed:@"dengguang_normal"], + [UIImage imageNamed:@"zaolang_normal"], + [UIImage imageNamed:@"shajun_normal"], + [UIImage imageNamed:@"huli_noraml"], + [UIImage imageNamed:@"jiare_normal"]]; + + self.btnOnImgArr = @[[UIImage imageNamed:@"xunhuan_selected"], + [UIImage imageNamed:@"zengyang_selected"], + [UIImage imageNamed:@"dengguang_selected"], + [UIImage imageNamed:@"dengguang_selected"], + [UIImage imageNamed:@"zaolang_selectd"], + [UIImage imageNamed:@"shajun_selected"], + [UIImage imageNamed:@"huli_selected"], + [UIImage imageNamed:@"jiare_selected"]]; + }else{ int controlAmount=[self.device.controlAmount intValue]; @@ -1702,6 +1794,14 @@ addMassglength:string1.length]; + }else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){ + // 新绚多 + if (!_xuanduoBack) { + _xuanduoBack = [[Xuanduo2Model alloc] init]; + } + [Xuanduo2DataUtility readSocketDataWithBackMsgModel:_xuanduoBack addWithBackData:data]; + self.temperature = [BootomViewSoketBackMasgConreol getTempNewWayWithSoketData:data adddeviceType:DECICE_TYPE_XUANDUO2F]; + [self.collectionView reloadData]; }else{ int controlAmount=[devicemoel.controlAmount intValue]; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.h b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.h index d09e213..225f2aa 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.h +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.h @@ -17,6 +17,7 @@ #import "SongNuoBDProtocol.h" #import "RunSun84Protocol.h" #import "RuiMeiProtocolModel.h" +#import "Xuanduo2Model.h" @interface FishControlFourthCell : UICollectionViewCell @@ -59,6 +60,12 @@ atIndex:(NSIndexPath *)indexPath addBackModel:(XutoBackMsgModel *)model; +//新绚多 +-(void)setXuanduo2ControBtnImg:(NSArray *)imgOffArr + addArr:(NSArray *)imgOnArr + atIndex:(NSIndexPath *)indexPath + addBackModel:(Xuanduo2Model*)model; + //松诺 -(void)setSongNuoControlBtnImg:(NSArray *)imgOffArr @@ -88,4 +95,6 @@ atIndex:(NSIndexPath *)indexPath addBackModel:(RuiMeiProtocolModel*)model; + + @end diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.m index b3a54b4..5e072ef 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlFourthCell.m @@ -251,6 +251,63 @@ } +} + +-(void)setXuanduo2ControBtnImg:(NSArray *)imgOffArr + addArr:(NSArray *)imgOnArr + atIndex:(NSIndexPath *)indexPath + addBackModel:(Xuanduo2Model*)model { + + NSInteger index = indexPath.row - 3; + if (index == 0) { + + NSString*stateString=[model.waterPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + }else if (index == 1){ + + NSString*stateString=[model.gasPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + }else if (index == 2){ + + NSString*stateString=[model.light1 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + }else if (index == 3){ + + NSString*stateString=[model.light2 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + }else if (index == 4){ + + NSString*stateString=[model.waveMakingPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + }else if (index == 5){ + + NSString*stateString=[model.uvLamp substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + }else if (index == 6){ + + NSString*stateString=[model.huliLight substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + }else if (index == 7){ + + NSString*stateString=[model.heatStatus substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)]; + [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr + addOffArr:imgOffArr]; + + } + } diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlSecondCell.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlSecondCell.m index 27a36fc..19415dd 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlSecondCell.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/YseeCollectionCell/FishControlSecondCell.m @@ -38,7 +38,7 @@ formattemp = @"暂无数据"; } - + self.templabel.font = [UIFont systemFontOfSize:17]; NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:formattemp ]; [attributedString addAttribute:NSForegroundColorAttributeName value:RGB(253, 188, 63) range:NSMakeRange(0,[formattemp length])]; diff --git a/Ifish/ifishImgSouce/XuToImg/add@2x.png b/Ifish/ifishImgSouce/XuToImg/add@2x.png new file mode 100644 index 0000000..ae4af78 Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/add@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/arrow_down@2x.png b/Ifish/ifishImgSouce/XuToImg/arrow_down@2x.png new file mode 100644 index 0000000..d479eb4 Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/arrow_down@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/arrow_up@2x.png b/Ifish/ifishImgSouce/XuToImg/arrow_up@2x.png new file mode 100644 index 0000000..f4b87e8 Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/arrow_up@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/gas_big@2x.png b/Ifish/ifishImgSouce/XuToImg/gas_big@2x.png new file mode 100644 index 0000000..ee3af7c Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/gas_big@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/light_big@2x.png b/Ifish/ifishImgSouce/XuToImg/light_big@2x.png new file mode 100644 index 0000000..c5a7429 Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/light_big@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/shajun_big@2x.png b/Ifish/ifishImgSouce/XuToImg/shajun_big@2x.png new file mode 100644 index 0000000..27e8cf2 Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/shajun_big@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/wave_big@2x.png b/Ifish/ifishImgSouce/XuToImg/wave_big@2x.png new file mode 100644 index 0000000..bc04c5b Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/wave_big@2x.png differ diff --git a/Ifish/ifishImgSouce/XuToImg/xunhuan_big@2x.png b/Ifish/ifishImgSouce/XuToImg/xunhuan_big@2x.png new file mode 100644 index 0000000..cd862de Binary files /dev/null and b/Ifish/ifishImgSouce/XuToImg/xunhuan_big@2x.png differ diff --git a/Ifish/models/wifiModel/sendmaseegemodel/ReadTimerModel.h b/Ifish/models/wifiModel/sendmaseegemodel/ReadTimerModel.h new file mode 100644 index 0000000..c1404a3 --- /dev/null +++ b/Ifish/models/wifiModel/sendmaseegemodel/ReadTimerModel.h @@ -0,0 +1,21 @@ +// +// ReadTimerModel.h +// Ifish +// +// Created by Alex on 2019/5/3. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "baseModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface ReadTimerModel : baseModel + +/// 灯编号 +@property(nonatomic,copy)NSString*selectorNumber; +@property(nonatomic,copy)NSString*crc16str; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/models/wifiModel/sendmaseegemodel/ReadTimerModel.m b/Ifish/models/wifiModel/sendmaseegemodel/ReadTimerModel.m new file mode 100644 index 0000000..9eee4b3 --- /dev/null +++ b/Ifish/models/wifiModel/sendmaseegemodel/ReadTimerModel.m @@ -0,0 +1,21 @@ +// +// ReadTimerModel.m +// Ifish +// +// Created by Alex on 2019/5/3. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "ReadTimerModel.h" + +@implementation ReadTimerModel +- (NSString *)description +{ + self.messagetype=@"00"; + self.massagelegth=@"12"; + self.functionCode=@"16"; + return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth]; + +} + +@end diff --git a/Ifish/models/wifiModel/sendmaseegemodel/SetTimerModel.h b/Ifish/models/wifiModel/sendmaseegemodel/SetTimerModel.h new file mode 100644 index 0000000..98e9e26 --- /dev/null +++ b/Ifish/models/wifiModel/sendmaseegemodel/SetTimerModel.h @@ -0,0 +1,22 @@ +// +// SetTimerModel.h +// Ifish +// +// Created by Alex on 2019/5/2. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "baseModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface SetTimerModel : baseModel +@property(nonatomic,copy)NSString*selectorNumber; +@property(nonatomic,copy)NSString*selectorTime; +/// 控制组编号 +@property(nonatomic,copy)NSString*groupNumber; +@property(nonatomic,copy)NSString*isOn;//时间定时器开关状态 +@property(nonatomic,copy)NSString*crc16str; +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/models/wifiModel/sendmaseegemodel/SetTimerModel.m b/Ifish/models/wifiModel/sendmaseegemodel/SetTimerModel.m new file mode 100644 index 0000000..16ce6d8 --- /dev/null +++ b/Ifish/models/wifiModel/sendmaseegemodel/SetTimerModel.m @@ -0,0 +1,20 @@ +// +// SetTimerModel.m +// Ifish +// +// Created by Alex on 2019/5/2. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "SetTimerModel.h" + +@implementation SetTimerModel +- (NSString *)description +{ + self.messagetype=@"00"; + self.massagelegth=@"18"; + self.functionCode=@"15"; + return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth]; + +} +@end diff --git a/Ifish/views/mypicView/MydatePickerView.h b/Ifish/views/mypicView/MydatePickerView.h index f85044f..5b6bbdb 100644 --- a/Ifish/views/mypicView/MydatePickerView.h +++ b/Ifish/views/mypicView/MydatePickerView.h @@ -25,6 +25,8 @@ @property(nonatomic)NSInteger compennent; @property(nonatomic,copy)NSString *startString; @property(nonatomic,copy)NSString *endString; +@property(nonatomic,copy)NSString *startString1; +@property(nonatomic,copy)NSString *endString1; @property(nonatomic,copy)NSString *resultString; @property(nonatomic,strong)UIImageView *backgroundImage; @@ -34,4 +36,9 @@ @property(nonatomic,strong)UILabel *endLabel; +@property(nonatomic,assign)BOOL isNewXuanduo; +@property(nonatomic,assign)BOOL haveDelected; + + + @end diff --git a/Ifish/views/mypicView/MydatePickerView.m b/Ifish/views/mypicView/MydatePickerView.m index 00891fe..4130916 100644 --- a/Ifish/views/mypicView/MydatePickerView.m +++ b/Ifish/views/mypicView/MydatePickerView.m @@ -9,6 +9,7 @@ #import "MydatePickerView.h" #define kScreenSize [UIScreen mainScreen].bounds.size #include "AppDelegate.h" + @implementation MydatePickerView -(instancetype)initWithFrame:(CGRect)frame{ self=[super initWithFrame:frame]; @@ -22,7 +23,8 @@ _backgroundImage.image=[UIImage imageNamed:@"Box"]; _backgroundImage.userInteractionEnabled=YES; [self addSubview:_backgroundImage]; - + _backgroundImage.layer.masksToBounds=YES; + _backgroundImage.layer.cornerRadius=10; UILabel*title=[[UILabel alloc]initWithFrame:CGRectMake(10,10, _backgroundImage.frame.size.width-10*2, 20)]; title.text=@"时间设置"; @@ -52,15 +54,6 @@ _cancleButton=[UIButton buttonWithType:UIButtonTypeCustom]; _cancleButton.backgroundColor=[UIColor lightGrayColor]; CGFloat wdspace=40; - _cancleButton.frame=CGRectMake(40,_picView.frame.origin.y + _picView.frame.size.height - 10, (_backgroundImage.frame.size.width-3*wdspace)/2, 30); - - - [_cancleButton setTitle:@" 取消" forState:UIControlStateNormal]; - _cancleButton.layer.masksToBounds=YES; - _cancleButton.layer.cornerRadius=5; - _cancleButton.userInteractionEnabled=YES; - - //[_backgroundImage addSubview:_cancleButton]; _sureButton =[UIButton buttonWithType:UIButtonTypeCustom]; @@ -81,6 +74,16 @@ [_backgroundImage addSubview:_sureButton]; + _cancleButton.frame=CGRectMake(0,0,0,0); + + [_cancleButton setTitle:@"删除" forState:UIControlStateNormal]; +// _cancleButton.layer.masksToBounds=YES; +// _cancleButton.layer.cornerRadius=5; +// _cancleButton.userInteractionEnabled=YES; +// _cancleButton.backgroundColor = [UIColor purpleColor]; + _cancleButton.hidden = YES; + [_backgroundImage addSubview:_cancleButton]; + [self initData]; UITapGestureRecognizer *sigleTap=[[UITapGestureRecognizer alloc] init ]; @@ -101,6 +104,46 @@ return self; } +- (void)setIsNewXuanduo:(BOOL)isNewXuanduo { + _isNewXuanduo = isNewXuanduo; + UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(12,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)]; + label1.text=@"小时"; + label1.font=[UIFont systemFontOfSize:15]; + label1.textAlignment=NSTextAlignmentCenter; + [_backgroundImage addSubview:label1]; + UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(12+label1.frame.size.width+2,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)]; + label2.text=@"分钟"; + label2.font=[UIFont systemFontOfSize:15]; + label2.textAlignment=NSTextAlignmentCenter; + [_backgroundImage addSubview:label2]; + UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(label2.frame.origin.x+label2.frame.size.width+ 4,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)]; + label3.text=@"小时"; + label3.font=[UIFont systemFontOfSize:15]; + label3.textAlignment=NSTextAlignmentCenter; + [_backgroundImage addSubview:label3]; + UILabel *label4 = [[UILabel alloc] initWithFrame:CGRectMake(label3.frame.origin.x+label3.frame.size.width+2,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)]; + label4.text=@"分钟"; + label4.font=[UIFont systemFontOfSize:15]; + label4.textAlignment=NSTextAlignmentCenter; + [_backgroundImage addSubview:label4]; + [self initData]; +} + +- (void)setHaveDelected:(BOOL)haveDelected { + _haveDelected = haveDelected; + _cancleButton.hidden = NO; + [_sureButton setBackgroundImage:[UIImage imageNamed:@"surebtn_bg"] forState:UIControlStateNormal]; + [_cancleButton setBackgroundImage:[UIImage imageNamed:@"deletebtn_bg"] forState:UIControlStateNormal]; + CGRect pickerframe = _picView.frame; + pickerframe.origin.y = pickerframe.origin.y + 8; + _picView.frame = pickerframe; + CGRect frame = _sureButton.frame; + frame.size.width = frame.size.width/2.0; + _sureButton.frame = frame; + _sureButton.layer.cornerRadius=0; + _cancleButton.frame = CGRectMake(CGRectGetMaxX(frame), frame.origin.y, frame.size.width, frame.size.height); +} + -(void)dissmissView{ [self removeFromSuperview]; @@ -108,17 +151,23 @@ } -(void)initData{ - _dataArr=@[@[@"0:00",@"0:30",@"1:00",@"1:30",@"2:00",@"2:30",@"3:00",@"3:30",@"4:00",@"4:30",@"5:00",@"5:30",@"6:00",@"6:30",@"7:00",@"7:30",@"8:00",@"8:30",@"9:00",@"9:30",@"10:00",@"10:30",@"11:00",@"11:30",@"12:00",@"12:30",@"13:00",@"13:30",@"14:00",@"14:30",@"15:00",@"15:30",@"16:00",@"16:30",@"17:00",@"17:30",@"18:00",@"18:30",@"19:00",@"19:30",@"20:00",@"20:30",@"21:00",@"21:30",@"22:00",@"22:30",@"23:00",@"23:30"],@[@"0:29",@"0:59",@"1:29",@"1:59",@"2:29",@"2:59",@"3:29",@"3:59",@"4:29",@"4:59",@"5:29",@"5:59",@"6:29",@"6:59",@"7:29",@"7:59",@"8:29",@"8:59",@"9:29",@"9:59",@"10:29",@"10:59",@"11:29",@"11:59",@"12:29",@"12:59",@"13:29",@"13:59",@"14:29",@"14:59",@"15:29",@"15:59",@"16:29",@"16:59",@"17:29",@"17:59",@"18:29",@"18:59",@"19:29",@"19:59",@"20:29",@"20:59",@"21:29",@"21:59",@"22:29",@"22:59",@"23:29",@"23:59",]]; - - + if (_isNewXuanduo) { + _startString = _startString1 = _endString = _endString1 = @"00"; + _dataArr = @[@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14" + ,@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23"],@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31",@"32",@"33",@"34",@"35",@"36",@"37",@"38",@"39",@"40",@"41",@"42",@"43",@"44",@"45",@"46",@"47",@"48",@"49",@"50",@"51",@"52",@"53",@"54",@"55",@"56",@"57",@"58",@"59"],@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23"],@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31",@"32",@"33",@"34",@"35",@"36",@"37",@"38",@"39",@"40",@"41",@"42",@"43",@"44",@"45",@"46",@"47",@"48",@"49",@"50",@"51",@"52",@"53",@"54",@"55",@"56",@"57",@"58",@"59"]]; + + }else { + _dataArr=@[@[@"0:00",@"0:30",@"1:00",@"1:30",@"2:00",@"2:30",@"3:00",@"3:30",@"4:00",@"4:30",@"5:00",@"5:30",@"6:00",@"6:30",@"7:00",@"7:30",@"8:00",@"8:30",@"9:00",@"9:30",@"10:00",@"10:30",@"11:00",@"11:30",@"12:00",@"12:30",@"13:00",@"13:30",@"14:00",@"14:30",@"15:00",@"15:30",@"16:00",@"16:30",@"17:00",@"17:30",@"18:00",@"18:30",@"19:00",@"19:30",@"20:00",@"20:30",@"21:00",@"21:30",@"22:00",@"22:30",@"23:00",@"23:30"],@[@"0:29",@"0:59",@"1:29",@"1:59",@"2:29",@"2:59",@"3:29",@"3:59",@"4:29",@"4:59",@"5:29",@"5:59",@"6:29",@"6:59",@"7:29",@"7:59",@"8:29",@"8:59",@"9:29",@"9:59",@"10:29",@"10:59",@"11:29",@"11:59",@"12:29",@"12:59",@"13:29",@"13:59",@"14:29",@"14:59",@"15:29",@"15:59",@"16:29",@"16:59",@"17:29",@"17:59",@"18:29",@"18:59",@"19:29",@"19:59",@"20:29",@"20:59",@"21:29",@"21:59",@"22:29",@"22:59",@"23:29",@"23:59",]]; + } } + -(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ NSArray *rowArray=[[NSArray alloc] init]; rowArray=_dataArr[component]; return rowArray.count; } -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 2; + return _isNewXuanduo?4:2; } -(NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ @@ -137,6 +186,10 @@ _endString=_dataArr[1][_row]; + }else if (component==2){ + _startString1=_dataArr[2][_row]; + }else if (component==3){ + _endString1=_dataArr[3][_row]; } // [_picView selectRow:row inComponent:component animated:YES]; @@ -151,7 +204,7 @@ } -(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{ - return pickerView.frame.size.width/2; + return pickerView.frame.size.width/(_isNewXuanduo?4:2); }