Exemple #1
0
        public override void WillShowViewController(UISplitViewController aSplitViewController, UIViewController aViewController, UIBarButtonItem aButton)
        {
            UINavigationController navController = aSplitViewController.ViewControllers[1] as UINavigationController;

            if (navController != null)
            {
                navController.NavigationBar.TopItem.SetLeftBarButtonItem(null, false);

                SourceTableViewController source = navController.TopViewController as SourceTableViewController;

                if (source != null)
                {
                    source.SetPopOverController(null);
                }
            }
        }
Exemple #2
0
        public override void WillHideViewController(UISplitViewController aSplitViewController, UIViewController aViewController, UIBarButtonItem aBarButtonItem, UIPopoverController aPopoverController)
        {
            UINavigationController navController = aSplitViewController.ViewControllers[1] as UINavigationController;

            if (navController != null)
            {
                aBarButtonItem.Title = "Rooms";
                navController.NavigationBar.TopItem.SetLeftBarButtonItem(aBarButtonItem, false);

                SourceTableViewController source = navController.TopViewController as SourceTableViewController;

                if (source != null)
                {
                    source.SetPopOverController(aPopoverController);
                }
            }
        }
        // This method is invoked when the application has loaded its UI and its ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            iHelper = new Helper(new string[] {});
            iHelper.ProcessOptionsFileAndCommandLine();
            iHelper.Stack.SetStack(this);
            iHelper.Stack.EventStatusChanged += StackStatusChanged;

            //Trace.Level = Trace.kUpnp | Trace.kTopology;

            iEventServer    = new EventServerUpnp();
            iListenerNotify = new SsdpListenerMulticast();
            iHouse          = new House(iListenerNotify, iEventServer, new ModelFactory());

            splitViewController.Delegate = new SplitViewControllerDelegate();

            UINavigationController navigation = splitViewController.ViewControllers[0] as UINavigationController;

            if (navigation != null)
            {
                RoomTableViewController room = navigation.TopViewController as RoomTableViewController;
                if (room != null)
                {
                    room.SetHouse(iHouse);

                    navigation = splitViewController.ViewControllers[1] as UINavigationController;
                    if (navigation != null)
                    {
                        SourceTableViewController source = navigation.TopViewController as SourceTableViewController;
                        if (source != null)
                        {
                            room.SetSourceTableViewController(source);
                        }
                    }
                }
            }

            window.AddSubview(splitViewController.View);

            window.MakeKeyAndVisible();

            iHelper.Stack.Start();

            return(true);
        }
 public DataSource(SourceTableViewController aController)
 {
     iController = aController;
     iSources    = new List <ISource>();
 }
Exemple #5
0
 public TableDelegate(SourceTableViewController aController, RoomTableViewController.DataSource aDataSource)
 {
     iController = aController;
     iDataSource = aDataSource;
 }
Exemple #6
0
 public void SetSourceTableViewController(SourceTableViewController aSourceController)
 {
     TableView.Delegate = new TableDelegate(aSourceController, iDataSource);
 }