Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Jump between screens depending on a variable.
PostPosted: Thu Jun 25, 2015 1:24 pm 

Joined: Thu Jun 25, 2015 11:44 am
Posts: 2

Offline
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.


 Profile  
 
 Post subject: Re: Jump between screens depending on a variable.
PostPosted: Tue Jan 26, 2016 8:53 am 

Joined: Sun May 31, 2015 2:38 am
Posts: 14

Offline
Try

Code:
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();
}
}   

}
}



 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: