Hi!
When users press the Button1 of Screen2, depending on the value of the variable (Giro1, Bit, D200.0), need the code jumps to the Screen5 (popup) if Giro1 = 0 and jump to the screen4 if Giro1 = 1, but always jumps to the Screen5 regardless of the value of the variable.
What am I doing wrong ?.
PLC = Omron CP1E.
HMI = iXPanel T4A. Windows Embedded CE 6.0.
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
using Neo.ApplicationFramework.Controls.Script;
public partial class Screen2
{
void Button1_Click(System.Object sender, System.EventArgs e)
{
if (Globals.Tags.Giro1.Value == 0){
Globals.Screen5.Show();
}else {
Globals.Screen4.Show();
}
}
}
}
Thank you very much.
Jump between screens depending on a variable.
-
- Posts: 18
- Joined: Sun May 31, 2015 2:38 am
Re: Jump between screens depending on a variable.
Try
Code: Select all
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
using Neo.ApplicationFramework.Controls.Script;
public partial class Screen2
{
void Button1_Click(System.Object sender, System.EventArgs e)
{
if (!(bool)Globals.Tags.Giro1.Value){
Globals.Screen5.Show();
}else {
Globals.Screen4.Show();
}
}
}
}