//
//  ThingsAddWallpadViewController.m
//  kneet
//
//  Created by Jason Lee on 5/18/15.
//  Copyright (c) 2015 ntels. All rights reserved.
//

#import "ThingsAddWallpadViewController.h"
#import "JDObject.h"
#import "QRCodeViewController.h"
#import "CustomLabel.h"
#import "CustomButton.h"


@interface ThingsAddWallpadViewController () {

}
@end


#pragma mark - Class Definition

@implementation ThingsAddWallpadViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    [self initUI];
    [self prepareViewDidLoad];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    self.title = NSLocalizedString(@"새 장치 추가",nil);
}

- (void)initUI {
    
    

    //set tableview option
    self.tableView.delegate = self;
    self.tableView.dataSource = self;

    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.tableView.backgroundColor = [UIColor clearColor];

    self.tableView.tableFooterView = [[UIView alloc] init]; //this call table events;
    
    //Localization
    _lblTitle.text = NSLocalizedString(@"COMMAX 월패드를 현재 홈에 등록합니다", @"COMMAX 월패드를 현재 홈에 등록합니다");
    
    _lblStep1Title.text = NSLocalizedString(@"COMMAX 월패드에서 AoTHome 등록버튼을\n누르세요", @"COMMAX 월패드에서 AoTHome 등록버튼을\n누르세요");
    _lblStep2Title.text = NSLocalizedString(@"월패드에서 AoTHome 등록 과정을 진행하세요", @"월패드에서 AoTHome 등록 과정을 진행하세요");
    _lblStep3Title.text = NSLocalizedString(@"월패드에 나타난 QR 코드를 촬영하세요", @"월패드에 나타난 QR 코드를 촬영하세요");
    
    [_btnQRCode setTitle:NSLocalizedString(@"QR코드 촬영", @"QR코드 촬영") forState:UIControlStateNormal];
}

- (void)prepareViewDidLoad {

}

#pragma mark - Main Logic



#pragma mark - UI Events
- (IBAction)btnQRCodeTouched:(id)sender {
    QRCodeViewController *vc = (QRCodeViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"QRCodeViewController" storyboardName:@"Things"];
//    vc.qrcodeType = QRCodeTypeCommaxWallpad;
    [[JDFacade facade] presentViewControllerByPush:vc pvc:self];
}



#pragma mark - MemoryWarning
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
