<commit_before>//
//  MenuAccountSettingsViewController.swift
//  Nutshell
//
//  Created by <NAME> on 9/14/15.
//  Copyright © 2015 Tidepool. All rights reserved.
//

import UIKit

class MenuAccountSettingsViewController: UIViewController {

    @IBOutlet weak var loginAccount: UILabel!
    @IBOutlet weak var versionString: NutshellUILabel!
    
    @IBOutlet weak var sidebarView: UIView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        versionString.text = UIApplication.appVersion() + " on " + APIConnector.currentService!
        loginAccount.text = NutDataController.controller().currentUserName
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    @IBAction func logOutTapped(sender: AnyObject) {
        let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
        appDelegate.logout()
    }

    @IBAction func termsOfUseTapped(sender: AnyObject) {
        let storyboard = UIStoryboard(name: "EventView", bundle: nil)
        let menuController = storyboard.instantiateViewControllerWithIdentifier("menuTermsVC") as! MenuTermsViewController
        sideMenuController()?.setContentViewController(menuController)
    }
    
    /*
    // MARK: - Navigation

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

    @IBAction func done(segue: UIStoryboardSegue) {
        print("unwind segue to menuaccount done!")<commit_msg>Change formatting of application version string to match spec.<commit_after>//
//  MenuAccountSettingsViewController.swift
//  Nutshell
//
//  Created by <NAME> on 9/14/15.
//  Copyright © 2015 Tidepool. All rights reserved.
//

import UIKit

class MenuAccountSettingsViewController: UIViewController {

    @IBOutlet weak var loginAccount: UILabel!
    @IBOutlet weak var versionString: NutshellUILabel!
    
    @IBOutlet weak var sidebarView: UIView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        let curService = APIConnector.currentService!
        if curService == "Production" {
            versionString.text = "V" + UIApplication.appVersion()
        } else{
            versionString.text = "V" + UIApplication.appVersion() + " on " + curService
            
        }
        loginAccount.text = NutDataController.controller().currentUserName
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    @IBAction func logOutTapped(sender: AnyObject) {
        let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
        appDelegate.logout()
    }

    @IBAction func termsOfUseTapped(sender: AnyObject) {
        let storyboard = UIStoryboard(name: "EventView", bundle: nil)
        let menuController = storyboard.instantiateViewControllerWithIdentifier("menuTermsVC") as! MenuTermsViewController
        sideMenuController()?.setContentViewController(menuController)
    }
    
    /*
    // MARK: - Navigation

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

    @IBAction func done(segue: UIStoryboardSegue) {
        print("unwind segue to menuaccount done!")
{'fraction_non_alphanumeric': 0.08389963408259278, 'fraction_numerical': 0.004704652378463147, 'mean_word_length': 3.079957356076759, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1217835', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1000, 'n_words': 280}