* QStorage.cs: Fix AddInstance to actually check Contains

* MenuPage.xaml.cs:
* ControlPage.xaml.cs:
* qConnectionPage.xaml.cs: Add ability to change cue name in menu
This commit is contained in:
2019-07-10 22:17:29 -05:00
parent eb772ea614
commit cebf5425f8
4 changed files with 37 additions and 15 deletions
@@ -112,7 +112,7 @@ namespace qController
async void Scan(){
bool workspacesFound = false;
App.showToast("Scanning for Workspaces...");
App.showToast("Scanning for Instances...");
Console.WriteLine("Begin Scanning");
IReadOnlyList<IZeroconfHost> results = await ZeroconfResolver.ResolveAsync("_qlab._udp.local.",TimeSpan.FromSeconds(3));
@@ -122,17 +122,18 @@ namespace qController
if (result != null)
{
QInstance instance = new QInstance(result.DisplayName, result.IPAddress);
QStorage.AddInstance(instance);
Console.WriteLine(result.DisplayName + " @ " + result.IPAddress + " added");
workspacesFound = true;
if(QStorage.AddInstance(instance)){
Console.WriteLine(result.DisplayName + " @ " + result.IPAddress + " added");
workspacesFound = true;
}
}
}
}
if(workspacesFound){
App.showToast("Workspace Found and Added!");
App.showToast("Instance Found and Added!");
}else{
App.showToast("No Workspaces Found!");
App.showToast("No New Instances Found!");
}
}