void ReceiveLoungeDiscoveryMessage(Lounge lounge) { if (lounge != null && !FoundLounges.ContainsKey(lounge.Id)) { FoundLounges.Add(lounge.Id, lounge); } loungesView.ReloadData(); }
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); } }
public void SetTask(DiscoverViewController controller, Lounge lounge) { discoverViewController = controller; thisLounge = lounge; }
public void RemoveItem(Lounge lounge) { Lounges.Remove(lounge); TableView.ReloadData(); }
public void AddItem(Lounge lounge) { Lounges.Add(lounge); TableView.ReloadData(); }