//
//  MainMenuViewController.m
//  k-observer-iphone
//
//  Created by vvv ооо on 26.08.12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "MainMenuViewController.h"
#import "ProfileViewController.h"
#import "AlarmViewController.h"
#import "MapViewController.h"
#import "MessagesViewController.h"
#import "AppDelegate.h"

extern AppDelegate* appDelegate;

@interface MainMenuViewController ()

@end

@implementation MainMenuViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

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

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

-(void)viewDidAppear:(BOOL)animated
{
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (IBAction)OnMapButtonPressed
{
    //[self.view addSubview:appDelegate.mapViewController.view];
    [appDelegate.navController pushViewController:appDelegate.mapViewController animated:YES];
}

- (IBAction)OnProfileButtonPressed
{
    //[self.view addSubview:appDelegate.profileViewController.view];
    [appDelegate.navController pushViewController:appDelegate.profileViewController animated:YES];
}

- (IBAction)OnAlarmButtonPressed
{
    //[self.view addSubview:appDelegate.alarmViewController.view];
    [appDelegate.navController pushViewController:appDelegate.alarmViewController animated:YES];
}

- (IBAction)OnMessagesButtonPressed
{
    //[self.view addSubview:appDelegate.messagesViewController.view];
    [appDelegate.navController pushViewController:appDelegate.messagesViewController animated:YES];
}
@end
