Please I'm stuck, i really appreciate any help. Ventuz Runtime loads the project, but I don't know how to load the scene to it . . . i'm really frustrated .... here is the code I have so far... (and I don't want to use clusters if possible)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Ventuz.Remoting4;
using Ventuz.Remoting4.MachineService;
using System.Net;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Cluster servercluster;
Cluster cluster = null;
VMSClient theclients;
List<VMS> AllVMachines = new List<VMS>();
List<VMSClient> activeVMSClients = new List<VMSClient>();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var theclient = new VMSDiscovery(5, 0, null);
label2.Text = VMSDiscovery.GetLocalSystemId();
label1.Text = theclient.ToString();
StartMachineDiscovery();
}
VMSDiscovery vmsDiscover = null;
private void StartMachineDiscovery()
{
if (this.vmsDiscover == null)
{
this.vmsDiscover = new VMSDiscovery(10);
this.vmsDiscover.PropertyChanged += VMSDiscovery_Changed;
this.vmsDiscover.Discover();
}
else
{
this.vmsDiscover.Discover();
}
}
private void VMSDiscovery_Changed(object sender, PropertyChangedEventArgs e)
{
// TODO: compare with existing?
// create list from discovered Ventuz machines
AllVMachines = new List<VMS>(vmsDiscover.Items);
}
private void button2_Click(object sender, EventArgs e)
{
this.cluster = new Cluster { Name = "Wall" };
foreach (VMS vms in this.AllVMachines)
{
var aa = vms.ID;
var bb = vms.IPAddress;
var cc = vms.IPEndPoint;
//this.cluster.AddMachine(new IPEndPoint(vms.IPAddress, Cluster.DEFAULT_PORT));
this.activeVMSClients.Add(new VMSClient(vms));
this.cluster.AddMachine(cc);
listBox1.Items.Add(aa+" "+ bb);
this.cluster.Start();
}
}
private void button3_Click(object sender, EventArgs e)
{
foreach (VMSClient client in this.activeVMSClients)
{
client.Start(@"C:\Weather\Weather 2016.vzp");
//error happens here
FlaggedIID iid = cluster.Load("0000", "Icons Test ", LoadFlags.New | LoadFlags.Existing, null).Result;
}
}
}
}