public override void DidLoseInstance(HYP hype, HYPInstance instance, NSError error) { FoundInstances.Remove(instance.StringIdentifier); //Add the instance to the table view source. //((InstancesViewSource)view.loungesView.Source)?.RemoveItem(instance.StringIdentifier); Console.WriteLine(string.Format("Lost Instance : {0}. {1}", instance.StringIdentifier, error.DebugDescription)); //HandleNSError(error, alertView); }
public override void DidFindInstance(HYP hype, HYPInstance instance) { FoundInstances.Add(instance.StringIdentifier, instance); if (view.FoundLounges.Count > 0) { view.SendToInstance(view.FoundLounges.Values.ToList(), instance, LoungeMessageType.LoungeDiscovery); } //Add the instance to the table view source. //((InstancesViewSource)view.loungesView.Source)?.AddItem(instance); //var newData = NSData.FromString("You have a new message from : " + hype.DomesticInstance.StringIdentifier, NSStringEncoding.UTF8); //HYPMessage newMessage = hype.SendData(newData, instance); //Console.WriteLine(newMessage); Console.WriteLine("Found Instance : " + instance.StringIdentifier); alertView.Message = "Found Instance : " + instance.StringIdentifier; alertView.Show(); }