Exemple #1
0
        public VirtualModelVM()
        {
            MovingHeads = new VMovingHead[2];
            MovingHeads[0] = new VMovingHead();
            MovingHeads[1] = new VMovingHead();
            MovingHeads[0].Pos = new VPosition();
            MovingHeads[1].Pos = new VPosition();

            MovingHeads[0].Color = 17;

            Task.Factory.StartNew(() =>
            {
                while (true)
                {
                    CurTime = DateTime.Now;
                    Thread.Sleep(1000);
                }
            });
        }
Exemple #2
0
 private void UpdMh(VMovingHead mh)
 {
     if (mh == null)
     {
         Log.Warn("OnMHChanged: moving head is null");
         return;
     }
     MovingHeads[mh.ID] = mh;
 }
Exemple #3
0
 /// <summary>
 /// Notifies clients about changes
 /// </summary>
 /// <param name="mh"></param>
 public void OnMovingHeadChanged(VMovingHead mh)
 {
     Action<int, object> act = new Action<int, object>((int idx, object o) => clients[idx].Svc.OnMHChanged(mh));
     NetworkSvc.NotifyClients(clients, mh, act);
     //NotifyClients(mh, act);
 }
Exemple #4
0
 public void OnMHChanged(VMovingHead mv)
 {
     UpdMh(mv);
     OnDataChanged(VMChangedType.MH);
 }