Skip to main content
FluidEarth Portal Header version 3

FluidEarth Portal

Go Search
  
FluidEarth Portal > FluidEarth Discussions > Using Windows Forms > Using Windows Forms  

FluidEarth Discussions: Using Windows Forms

Body

The code in invalid C#, try ...
 

    public class Form1 : System.Windows.Forms.Form

    {

         GUI Code and model equations

    }

 

void Compute()

{

     Form f1 = new Form1();

etc...

   _time_current = _time_current + _time_delta;

}

 

I hope that the UI is being added to compute() function for debug purposes only. As requiring user interaction every timestep does defeat the object of OpenMI.




From: ABarkwith
Posted: 29 March 2011 10:49
Subject: Using Windows Forms

I am wrapping an existing model and am having trouble compiling the code. The model has a GUI built using windows forms and the engine is in the format below. Although all brackets are correct i am getting the following errors:
 
} - expected after 1st {
=, +, ; - invalid tokens in class struct, or interface member decleration - called on the advancing of timestep
 

void Compute()

{

    public class Form1 : System.Windows.Forms.Form

    {

         GUI Code and model equations

    }

   _time_current = _time_current + _time_delta;

}

Attachments
Content Type: Message
Created at 29/03/2011 11:32  by Adrian Harper 
Last modified at 29/03/2011 11:32  by Adrian Harper