Skip to content

Commit

Permalink
V0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu Huang authored and Yu Huang committed Apr 23, 2018
1 parent c3352a6 commit 8d33a98
Show file tree
Hide file tree
Showing 46 changed files with 106 additions and 725 deletions.
4 changes: 2 additions & 2 deletions box-Authorizer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@
"$(PROJECT_DIR)/box-Authorizer/TheThird/OpenSSL/lib",
"$(PROJECT_DIR)/box-Authorizer/globel/OpenSSL/include",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.2se.box-Authorizerr";
PRODUCT_BUNDLE_IDENTIFIER = "com.2se.box-Authorizer";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down Expand Up @@ -1515,7 +1515,7 @@
"$(PROJECT_DIR)/box-Authorizer/TheThird/OpenSSL/lib",
"$(PROJECT_DIR)/box-Authorizer/globel/OpenSSL/include",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.2se.box-Authorizerr";
PRODUCT_BUNDLE_IDENTIFIER = "com.2se.box-Authorizer";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion box-Authorizer/Application/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#import "AwaitBackupViewController.h"
#import "ServiceStartViewController.h"
#import "BlueToothListViewController.h"

#import "HomepageViewController.h"
#import "LeftMenuViewController.h"

Expand Down
1 change: 0 additions & 1 deletion box-Authorizer/BaseClass/Models/BoxDataManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ -(void)saveDataWithCoding:(NSString *)coding codeValue:(NSString *)codeValue
}else if ([coding isEqualToString:@"codePassWord"]){
self.codePassWord = codeValue;
}

[defaults setObject:codeValue forKey: coding];
[defaults synchronize];
}
Expand Down
1 change: 0 additions & 1 deletion box-Authorizer/BaseClass/Models/MenberInfoManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ - (instancetype)init{
return self;
}


- (NSMutableArray *)loadMenberInfo:(NSString *)menberId
{
_menberInfoArray = [[NSMutableArray alloc] init];
Expand Down
3 changes: 0 additions & 3 deletions box-Authorizer/BaseClass/Models/NewsInfoModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ @interface NewsInfoModel()

@end



@implementation NewsInfoModel

+(instancetype)sharedManager{
Expand All @@ -33,7 +31,6 @@ - (instancetype)init{
return self;
}


- (NSMutableArray *)loadNewsInfo
{
_newsInfoArray = [[NSMutableArray alloc] init];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#import "AboutBoxViewController.h"
#import "LanguageSwitchViewController.h"
#import "ModifyServerAddressViewController.h"



#define CellReuseIdentifier @"LeftMenu"
#define TableViewCellHeight 55
Expand All @@ -37,13 +35,10 @@ - (void)viewDidLoad {
_sourceArray = [[NSMutableArray alloc] init];
NSDictionary *dict = @{
@"data":@[
@{@"titleName":@"语言切换"},
@{@"titleName":@"服务器地址"},
@{@"titleName":@"关于BOX"}
]
};


for (NSDictionary *dataDic in dict[@"data"]) {
LeftMenuModel *model = [[LeftMenuModel alloc] initWithDict:dataDic];
[_sourceArray addObject:model];
Expand Down Expand Up @@ -93,12 +88,8 @@ -(void)createView
}];
[_tableView registerClass:[LeftMenuTableViewCell class] forCellReuseIdentifier:CellReuseIdentifier];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;



}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.sourceArray.count;
}
Expand All @@ -107,30 +98,23 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
return TableViewCellHeight;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

LeftMenuTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellReuseIdentifier forIndexPath:indexPath];
LeftMenuModel *model = self.sourceArray[indexPath.row];
cell.model = model;
[cell setDataWithModel:model];
return cell;

}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row == 0){
LanguageSwitchViewController *languageSwitchVC = [[LanguageSwitchViewController alloc] init];
[self.navigationController pushViewController:languageSwitchVC animated:YES];
[self addNSNotificationCenter:languageSwitchVC];
}
else if(indexPath.row == 1) {
if(indexPath.row == 0) {
ModifyServerAddressViewController *modifyServerAdressVC = [[ModifyServerAddressViewController alloc] init];
[self.navigationController pushViewController:modifyServerAdressVC animated:YES];
[self.sidePanelController toggleRightPanel:nil];
[self addNSNotificationCenter:modifyServerAdressVC];
}else if(indexPath.row == 2){
}else if(indexPath.row == 1){
AboutBoxViewController *aboutBoxVC = [[AboutBoxViewController alloc] init];
[self.navigationController pushViewController:aboutBoxVC animated:YES];
[self addNSNotificationCenter:aboutBoxVC];
Expand Down
10 changes: 1 addition & 9 deletions box-Authorizer/CodeClass/HomePage/Views/LeftMenuTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr
return self;
}



- (void)createView{

_titleLab = [[UILabel alloc]init];
Expand All @@ -47,24 +45,18 @@ - (void)createView{
_lineView.backgroundColor = [UIColor colorWithHexString:@"#222239"];
[self.contentView addSubview:_lineView];
[_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.contentView.mas_bottom).offset(-1);
make.bottom.equalTo(self.contentView.mas_bottom).offset(0);
make.left.offset(0);
make.right.offset(0);
make.height.offset(1);
}];



}

- (void)setDataWithModel:(LeftMenuModel *)model
{
_titleLab.text = model.titleName;


}


- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
Expand Down
4 changes: 0 additions & 4 deletions box-Authorizer/CodeClass/HomePage/Views/NewsTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ - (void)createView{
make.left.offset(15);
make.left.equalTo(_leftLab.mas_right).offset(9);
make.right.offset(-115);

}];

_rightLab = [[UILabel alloc]init];
Expand All @@ -49,7 +48,6 @@ - (void)createView{
make.bottom.offset(0);
make.width.offset(100);
make.right.offset(-15);

}];

}
Expand All @@ -58,10 +56,8 @@ - (void)setDataWithModel:(NewsModel *)model
{
_leftLab.text = model.content;
_rightLab.text = [TimeManeger getElapseTimeToStringHelp:[model.newsId integerValue] ];

}


- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,13 @@ -(void)createView

-(void)backupAction:(UIButton *)btn
{
// if (_backupArray.count < 3) {
// [WSProgressHUD showErrorWithStatus:BackupVCWSProgressTwo];
// return;
// }
if (_backupArray.count < 3) {
[WSProgressHUD showErrorWithStatus:BackupVCWSProgressTwo];
return;
}
_backupView = [[BackupView alloc] initWithFrame:[UIScreen mainScreen].bounds];
_backupView.delegate = self;
[[UIApplication sharedApplication].keyWindow addSubview:_backupView];

}

#pragma mark ----- BackupViewDelegate 备份密码确认 -----
Expand Down Expand Up @@ -161,7 +160,6 @@ - (void)backupViewDelegate:(NSString *)passwordStr
}];
}


- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ - (void)viewDidLoad {
[SVProgressHUD showInfoWithStatus:info ];
[SVProgressHUD dismissWithDelay:1.2];
};

for (NSDictionary *dic in self.deviArray) {
[self.deviceArray addObject:dic];
}

manager.discoverPeripheralBlcok = ^(CBCentralManager *central, CBPeripheral *peripheral, NSDictionary *advertisementData, NSNumber *RSSI) {
if (peripheral.name.length <= 0) {
return ;
Expand Down Expand Up @@ -130,14 +128,11 @@ - (void)createBarItem{

//返回按钮
- (void)backButtonAction:(UIBarButtonItem *)buttonItem{

//[self dismissViewControllerAnimated:YES completion:nil];
[self.navigationController popViewControllerAnimated:YES];
self.arrayListBlock(self.deviceArray);
}



#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ @interface GenerateContractViewController ()<UIScrollViewDelegate, UITextFieldDe
@property(nonatomic, strong)PrivatePasswordView *privatePasswordView;
/** 启动服务 */
@property(nonatomic, strong)UIButton *serviceStartBtn;

@property(nonatomic, strong)MBProgressHUD *progressHUD;
@property(nonatomic, strong)DDRSAWrapper *aWrapper;

Expand All @@ -59,7 +58,6 @@ @implementation GenerateContractViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.

self.navigationController.navigationBar.shadowImage = [UIImage new];
self.view.backgroundColor = [UIColor colorWithHexString:@"#292e40"];
self.title = GenerateContractVCTitle;
Expand Down Expand Up @@ -241,7 +239,6 @@ -(void)createView
}];

_contractQRCodeImg = [[UIImageView alloc] init];
//_contractQRCodeImg.image = [CIQRCodeManager createImageWithString:@"hahahah"];
_contractQRCodeImg.image = [UIImage imageNamed:@"icon_ercode"];
[twoView addSubview:_contractQRCodeImg];
[_contractQRCodeImg mas_makeConstraints:^(MASConstraintMaker *make) {
Expand All @@ -254,7 +251,6 @@ -(void)createView
_contractCopyBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_contractCopyBtn setTitle:GenerateContractVCAccountCopyBtn forState:UIControlStateNormal];
[_contractCopyBtn setTitleColor:[UIColor colorWithHexString:@"#4c7afd"] forState:UIControlStateNormal];
//_contractCopyBtn.backgroundColor = RGB(76, 122, 253);
_contractCopyBtn.titleLabel.font = Font(13);
[_contractCopyBtn addTarget:self action:@selector(contractCopyAction:) forControlEvents:UIControlEventTouchUpInside];
[twoView addSubview:_contractCopyBtn];
Expand Down Expand Up @@ -324,10 +320,8 @@ -(void)createView
make.height.offset(50);
}];
_serviceStartBtn.hidden = YES;

}


-(void)showProgressHUD
{
self.progressHUD.mode = MBProgressHUDModeText;
Expand All @@ -339,16 +333,12 @@ -(void)showProgressHUD
[self.progressHUD hideAnimated:YES afterDelay:0.5];
}




#pragma mark ----- 复制地址/账户二维码 -----
-(void)accountCopyAction:(UIButton *)btn
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = _accountQRLab.text;
[self showProgressHUD];

}

#pragma mark ----- 保存二维码/账户二维码 -----
Expand All @@ -366,7 +356,6 @@ -(void)saveImageView:(UIImageView *)img
UIImage * newImage = UIGraphicsGetImageFromCurrentImageContext();
//保存到本地相机
UIImageWriteToSavedPhotosAlbum(newImage,self,@selector(image:didFinishSavingWithError:contextInfo:),nil);

}

//保存相片的回调方法
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@

#import "InitAccountViewController.h"
#import "ScanCodeViewController.h"
#import "UIARSAHandler.h"
//text
#import "PerfectInformationViewController.h"
#import "HomepageViewController.h"
#import "LeftMenuViewController.h"

#define InitAccountVCTitle @"扫一扫"
#define PerfectInformationVCLaber @"扫一扫完成初始化"
Expand All @@ -22,8 +17,6 @@ @interface InitAccountViewController ()
/** 开始扫描 */
@property(nonatomic, strong)UIButton *scanButton;

@property(nonatomic, strong)UIARSAHandler *aRSAHandler;

@end

@implementation InitAccountViewController
Expand All @@ -34,7 +27,6 @@ - (void)viewDidLoad {
self.title = InitAccountVCTitle;
self.navigationController.navigationBar.shadowImage = [UIImage new];
[self createView];
_aRSAHandler = [[UIARSAHandler alloc] init];
}

- (void)viewWillAppear:(BOOL)animated {
Expand Down Expand Up @@ -82,7 +74,6 @@ -(void)createView
}];

_scanButton = [UIButton buttonWithType:UIButtonTypeCustom];
//[_scanButton setTitle:@"开始扫描" forState:UIControlStateNormal];
[_scanButton setImage:[UIImage imageNamed:@"startScanImg"] forState:UIControlStateNormal];
_scanButton.titleLabel.font = Font(17);
[_scanButton setTitleColor:kBlueColor forState:UIControlStateNormal];
Expand All @@ -102,7 +93,6 @@ -(void)scanAction
{
ScanCodeViewController *scanVC = [[ScanCodeViewController alloc]init];
[self.navigationController pushViewController:scanVC animated:YES];
//NSString *str = [JsonObject getRandomStringWithNum:8];
}

- (void)didReceiveMemoryWarning {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = PerfectInformationVCTitle;
//self.view.backgroundColor = [UIColor colorWithHexString:@"#f7f8f9"];
self.view.backgroundColor = [UIColor whiteColor];
[self createView];
_aWrapper = [[DDRSAWrapper alloc] init];
Expand Down Expand Up @@ -263,7 +262,6 @@ -(void)cormfirmAction:(UIButton *)btn
} fail:^(NSError *error) {
NSLog(@"%@", error.description);
}];

}


Expand Down
Loading

0 comments on commit 8d33a98

Please sign in to comment.