Exemplo n.º 1
0
 public ControlPanelViewModel(ServotorEmulator hexy)
 {
     this.hexy = hexy;
     string[] portName = SerialPort.GetPortNames();
     COMPorts = new ObservableCollection <string>(portName);
     if (portName.Length > 0)
     {
         SelectedCOMPort = portName[0];
     }
 }
Exemplo n.º 2
0
        public HexyWorldViewModel(ServotorEmulator servotor)
        {
            this.servotor = servotor;
            hexy          = new Hexy();

            servotor.Update += servotor_Update;

            Visuals = new ObservableCollection <Visual3D>();

            Visuals.Add(new SunLight());

            Visuals.Add(hexy);
        }