//
//  AboutViewController.m
//  RedAnt ERP Mobile
//
//  Created by Ray on 10/21/15.
//  Copyright © 2015 United Software Applications, Inc. All rights reserved.
//

#import "AboutViewController.h"
#import "config.h"


@interface AboutViewController ()

@end

@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
      self.edgesForExtendedLayout = UIRectEdgeNone;
    
    // Do any additional setup after loading the view.
    
    UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"close"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]
                                                                    style:UIBarButtonItemStylePlain
                                                                   target:self
                                                                   action:@selector( onCloseClick:)];
    self.navigationItem.rightBarButtonItem = closeButton;
    
    
    NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
    NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
    NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
#ifdef BUILD_NPD
    NSString* versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
#endif

#ifdef BUILD_HMLG
    NSString* versionNum = [NSString stringWithFormat:@"Version: HOMELEGANCE %@ Build %@",version,build];
#endif
    
    
    self.labelVer.text = versionNum;
    self.label_appname.text=APP_NAME;
    self.label_company.text=COMPANY_NAME;
    self.tvcompany.text=COMPANY_INFO;
    
}

- (void)onCloseClick:(UIButton *)sender {
    
    
        [self dismissViewControllerAnimated:true completion:nil];
}

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

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
