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

#import "NavigationControllerDelegate.h"

#import "AppDelegate.h"

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

extern AppDelegate* appDelegate;

@implementation NavigationControllerDelegate

- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if (viewController == appDelegate.connectViewController)
    {
        [appDelegate.observerClient Close];
    }
    
    if (viewController == appDelegate.mainMenuViewController)
    {
        
    }
    
    if (viewController == appDelegate.profileViewController)
    {
        
    }
    
    if (viewController == appDelegate.alarmViewController)
    {
        
    }
    
    if (viewController == appDelegate.mapViewController)
    {
       
    }
    
    if (viewController == appDelegate.messagesViewController)
    {
    }

}


@end
