mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-09 01:13:50 +00:00
Move Dialog classes under UI namespace
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using Acr.UserDialogs;
|
||||
using qController.Communication;
|
||||
|
||||
namespace qController.UI.Dialogs
|
||||
{
|
||||
public class AddInstancePrompt : PromptConfig
|
||||
{
|
||||
public AddInstancePrompt()
|
||||
{
|
||||
|
||||
Title = "Enter IP of QLab Computer";
|
||||
Message = "Enter an IP Address to save";
|
||||
OkText = "Next";
|
||||
OnTextChanged = args =>
|
||||
{
|
||||
//IPAddress ugh
|
||||
args.IsValid = IPHelper.IsValidAddress(args.Value);
|
||||
};
|
||||
OnAction = (qAddress) =>
|
||||
{
|
||||
if (!qAddress.Ok)
|
||||
return;
|
||||
|
||||
UserDialogs.Instance.Prompt(new PromptConfig
|
||||
{
|
||||
Title = "Enter Name",
|
||||
Message = "Enter a Name for " + qAddress.Text,
|
||||
OkText = "Save",
|
||||
OnAction = (qName) => {
|
||||
if (!qName.Ok)
|
||||
return;
|
||||
QStorage.AddInstance(qName.Text, qAddress.Text);
|
||||
App.showToast("Manual Workspace Added!");
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user