Ejemplo n.º 1
0
 void ReceiveLoungeDiscoveryMessage(Lounge lounge)
 {
     if (lounge != null && !FoundLounges.ContainsKey(lounge.Id))
     {
         FoundLounges.Add(lounge.Id, lounge);
     }
     loungesView.ReloadData();
 }
Ejemplo n.º 2
0
        public void CreateNewLounge(Lounge lounge)
        {
            //Add the instance to the table view source.
            //var loungesViewSource = ((LoungesTableViewSource)loungesView.Source);
            //loungesViewSource?.AddItem(lounge);
            if (FoundLounges.ContainsKey(lounge.Id) && FoundLounges[lounge.Id].Active)
            {
                var alertView = new UIAlertView("Alert", "Cannot create lounge. Another active lounge already created", null, "OK");
                this.Add(alertView);
                alertView.Show();
            }
            else
            {
                FoundLounges.Add(lounge.Id, lounge);
                loungesView.ReloadData();
                NavigationController.PopViewController(true);

                SendToInstances(lounge, FoundInstances.Values.ToList(), LoungeMessageType.LoungeDiscovery);
            }
        }
Ejemplo n.º 3
0
 public void SetTask(DiscoverViewController controller, Lounge lounge)
 {
     discoverViewController = controller;
     thisLounge             = lounge;
 }
Ejemplo n.º 4
0
 public void RemoveItem(Lounge lounge)
 {
     Lounges.Remove(lounge);
     TableView.ReloadData();
 }
Ejemplo n.º 5
0
 public void AddItem(Lounge lounge)
 {
     Lounges.Add(lounge);
     TableView.ReloadData();
 }