Hi, I've created a popup screen to show an alert to the user.
Now I want to show this popup every time that a tag changes from 0 to 1, independently on which screen is activated.
I know this is possible because I've seen it on an application.
My question is how to make this?
Global Pop-up Screen
Re: Global Pop-up Screen
Add an event handler to the tag and use scripting in the event handler to show the pop-up screen:
IScreen screen = getScreen("requiredPageName");
if(screen != null)
{
screen.Show();
}
public static IScreen getScreen(string pageName)
{
try
{
Type type = System.Type.GetType("Neo.ApplicationFramework.Generated." + pageName);
if (type != null)
{
return Globals.GetObject<IScreen>(type, pageName);
}
}
catch { }
return null;
}
I think this should work.
IScreen screen = getScreen("requiredPageName");
if(screen != null)
{
screen.Show();
}
public static IScreen getScreen(string pageName)
{
try
{
Type type = System.Type.GetType("Neo.ApplicationFramework.Generated." + pageName);
if (type != null)
{
return Globals.GetObject<IScreen>(type, pageName);
}
}
catch { }
return null;
}
I think this should work.