示例#1
0
            public DataSource(RoomTableViewController aController, House aHouse)
            {
                iRooms = new SortedList <string, IRoom>();

                iController = aController;
                iHouse      = aHouse;

                iHouse.EventRoomAdded   += RoomAdded;
                iHouse.EventRoomRemoved += RoomRemoved;
            }
示例#2
0
        // 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);
        }