Code:
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
eMPlantLib.RemoteControl em;
private void button1_Click(object sender, EventArgs e)
{
em = new eMPlantLib.RemoteControl();
string str = "EDUCATIONAL";
em.SetLicenseType(str);
em.SimulationFinished += new eMPlantLib._IRemoteControlEvents_SimulationFinishedEventHandler(em_SimulationFinished);
em.SimTalkMessage += new eMPlantLib._IRemoteControlEvents_SimTalkMessageEventHandler(em_SimTalkMessage);
em.LoadModel("c:/Test.spp");
}
void em_SimTalkMessage(string __MIDL_0033)
{
throw new Exception("The method or operation is not implemented.");
label1.Text = "SIMTALKMESSAGE" ; // HERE IS THE PROBLEM, THIS DOESN'T WORK
}
void em_SimulationFinished()
{
throw new Exception("The method or operation is not implemented.");
label1.Text = "SIMULATIONFINISHED";// IF YOU PUT HERE GetValue IT WOULDN'T WORK EITHER
}
private void button2_Click(object sender, EventArgs e)
{
em.StartSimulation(".Models.Frame.Eventcontroller");
//em.ExecuteSimTalk("(r:real) is do .Models.Model.WebControl.Start; end;", 2.3);
}
}
}