I'm new to iX Developer so sorry if this is a stupid question. I wrote a C# app in Visual Studio 2010 to run on Windows CE which works fine. I've copied my code over to the iX Developer environment and now it won't build. In VS code is
Namespace ReaderConnect
{
public partial class Screen1 : Form, FeIscListener
{
but iX doesn't like this. I get an error "Partial declarations of 'Neo.ApplicationFramework.Generated.Screen1' must not specify different base classes
Any ides?
Changing it to
Namespace ReaderConnect
{
public partial class Screen1
{
fixes the initial error but causes more errors with my event listeners.
Visual Studio program won't work
-
- Posts: 137
- Joined: Mon Jun 11, 2012 2:10 pm
Re: Visual Studio program won't work
This is a limitation of C#, nothing to do with iX Developer. Classes can only include one base class (such as Form) but can include multiple interfaces (such as IDisposable). I don't know what your FeIscListener is, but from what I can tell you want to create an object of type FeIscListener in your Screen1 class and reference this.
public partial class Screen1 : Form
{
FeIscListener listener = new FeIscListener();
public partial class Screen1 : Form
{
FeIscListener listener = new FeIscListener();
Adam M.
Controls Engineer
FlexEnergy
Controls Engineer
FlexEnergy
Re: Visual Studio program won't work
Adam,
FeIscListener is an interface and the C# code works fine in Visual studio. Here's some more of the code to hopefully offer more clarity. Without the FeIscListener listed after Form the AddEventListner causes an error. Any other ideas?
namespace ReaderConnect
{
public partial class frmMain : Form , FeIscListener
{
public frmMain()
{
//Registry from Events send and receive
fedm.AddEventListener(this, FeIscListenerConst.SEND_STRING_EVENT);
fedm.AddEventListener(this, FeIscListenerConst.RECEIVE_STRING_EVENT);
FeIscListener is an interface and the C# code works fine in Visual studio. Here's some more of the code to hopefully offer more clarity. Without the FeIscListener listed after Form the AddEventListner causes an error. Any other ideas?
namespace ReaderConnect
{
public partial class frmMain : Form , FeIscListener
{
public frmMain()
{
//Registry from Events send and receive
fedm.AddEventListener(this, FeIscListenerConst.SEND_STRING_EVENT);
fedm.AddEventListener(this, FeIscListenerConst.RECEIVE_STRING_EVENT);
-
- Posts: 137
- Joined: Mon Jun 11, 2012 2:10 pm
Re: Visual Studio program won't work
OK, I think I understand your problem. iX developer does not use the standard windows Form class. Instead it uses "Neo.ApplicationFramework.Controls.Controls.Form" or another screen (if set to use another screen as a background).
To fix your problem, initialize your screen using the following:
public partial class frmMain : FeIscListener
iX developer will automatically set the screen as a form using the auto-coded portion of the partial class definition meaning you don't need to.
To fix your problem, initialize your screen using the following:
public partial class frmMain : FeIscListener
iX developer will automatically set the screen as a form using the auto-coded portion of the partial class definition meaning you don't need to.
Adam M.
Controls Engineer
FlexEnergy
Controls Engineer
FlexEnergy
Re: Visual Studio program won't work
Adam,
That fixed the problem, thanks for all the help!
That fixed the problem, thanks for all the help!