空置页面和设置页面调试通过

This commit is contained in:
xuemh
2018-04-23 00:41:11 +08:00
parent 4dd95da147
commit df311d475c
23 changed files with 2472 additions and 10 deletions
@@ -15,7 +15,13 @@
#import "ThreeControlName.h"
#import "FourControlName.h"
#import "XuToControlName.h"
#import "RuiMeiCHControl.h"
@interface UserExtendataArchaver : NSObject
//自定义水族箱名字数据
+(void)archiverRuiMeiDeviceCHInfo:(RuiMeiCHControl*)ch;
+(RuiMeiCHControl*)unArchiverRuiMeiDeviceCHInfo:(NSString *)mac;
//自定义水族箱名字数据
+(void)archiverDeviceCHInfo:(RunSunCHControl*)ch;
+(RunSunCHControl*)unArchiverDeviceCHInfo:(NSString *)mac;
@@ -9,6 +9,20 @@
#import "UserExtendataArchaver.h"
@implementation UserExtendataArchaver
+(void)archiverRuiMeiDeviceCHInfo:(RuiMeiCHControl*)ch {
NSString *key = [NSString stringWithFormat:@"Ruimei%@",ch.macAd];
NSString *file = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:key];
[NSKeyedArchiver archiveRootObject:ch toFile:file];
}
+(RuiMeiCHControl*)unArchiverRuiMeiDeviceCHInfo:(NSString *)mac {
NSString *key = [NSString stringWithFormat:@"Ruimei%@",mac];
NSString *file = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:key];
RuiMeiCHControl *ch = [NSKeyedUnarchiver unarchiveObjectWithFile:file];
return ch;
}
+(void)archiverDeviceCHInfo:(RunSunCHControl*)ch
{
NSString *key = [NSString stringWithFormat:@"Rusun%@",ch.macAd];
@@ -19,6 +19,8 @@
#import "RuSunHaveHeateViewController.h"
#import "SongNuoDBCenterViewController.h"
#import "RunSun84biteCenterViewController.h"
#import "RuiMeiViewController.h"
//默认选中 下表类型
//typedef NS_ENUM (NSInteger,saveIndexType){
//
@@ -140,6 +140,15 @@
[nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"blackbar.png"] forBarMetrics:UIBarMetricsDefault];
app1.window.rootViewController=nav;
} else if ([devicemodel.type isEqualToString:DECICE_TYPE_RUIMEI]) {
RuiMeiViewController *ruimeiCenter=[[RuiMeiViewController alloc] init];
ruimeiCenter.currentDevice = devicemodel;
UIApplication*app=[UIApplication sharedApplication];
AppDelegate*app1=(AppDelegate*)app.delegate;
UINavigationController*nav=[[UINavigationController alloc]initWithRootViewController:ruimeiCenter];
[nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"blackbar.png"] forBarMetrics:UIBarMetricsDefault];
app1.window.rootViewController=nav;
}else{
int controlAmount=[devicemodel.controlAmount intValue];
@@ -46,5 +46,7 @@
//睿芯 独立 84 字节
#define DECICE_TYPE_RUSUN2A @"2a" //0x2a
//瑞美4控
#define DECICE_TYPE_RUIMEI @"2b"
#endif /* IfishDeviceInfo_h */