public void UpdateTrack(Sector s) { if (track.SectorIndex != s.Index) { return; } MoveTrack(); targetManager.NotifyAllObservers(track, NotifyType.Update); track.SetRefreshTimeNow(); //设置更新时间 SystemCommunicator.UpdateTrack(track); OpticalDeviceCommunicator.CreateOpticalDeviceCommunicator().SendTrack(track); }
public static OpticalDeviceCommunicator CreateOpticalDeviceCommunicator() => _communicator ?? (_communicator = new OpticalDeviceCommunicator());