Esempio n. 1
0
 private void CheckTrack405(double xPoint, double yPoint)
 {
     TrackSensorsViewModel.Track408(xPoint, yPoint);
     TrackSensorsViewModel.Track410(xPoint, yPoint);
     TrackSensorsViewModel.Track405a(xPoint, yPoint);
     TrackSensorsViewModel.Track405b(xPoint, yPoint);
     TrackSensorsViewModel.Track405c(xPoint, yPoint);
     TrackSensorsViewModel.Track405d(xPoint, yPoint);
     TrackSensorsViewModel.Track405e(xPoint, yPoint);
     TrackSensorsViewModel.Track442(xPoint, yPoint);
     TrackSensorsViewModel.Track444(xPoint, yPoint);
 }
Esempio n. 2
0
 private void CheckTrack403(double xPoint, double yPoint)
 {
     TrackSensorsViewModel.Track408(xPoint, yPoint);
     TrackSensorsViewModel.Track410(xPoint, yPoint);
     TrackSensorsViewModel.Track403a(xPoint, yPoint);
     TrackSensorsViewModel.Track403b(xPoint, yPoint);
     TrackSensorsViewModel.Track403c(xPoint, yPoint);
     TrackSensorsViewModel.Track403d(xPoint, yPoint);
     TrackSensorsViewModel.Track403e(xPoint, yPoint);
     TrackSensorsViewModel.Track442(xPoint, yPoint);
     TrackSensorsViewModel.Track444(xPoint, yPoint);
 }
Esempio n. 3
0
        private void CheckTrack401(double xPoint, double yPoint)
        {
            if (ModbusProtocol.GetDataCoils(4) == false && xPoint < 500 && xPoint != 0 && direction == 0)
            {
                storyboard.Pause();
                timer.Stop();
                TrainViewModel.queueTrainTo401Track.Add(trainNumber);
            }

            TrackSensorsViewModel.Track408(xPoint, yPoint);
            TrackSensorsViewModel.Track411(xPoint, yPoint);
            TrackSensorsViewModel.Track401a(xPoint, yPoint);
            TrackSensorsViewModel.Track401b(xPoint, yPoint);
            TrackSensorsViewModel.Track401c(xPoint, yPoint);
            TrackSensorsViewModel.Track401d(xPoint, yPoint);
            TrackSensorsViewModel.Track401e(xPoint, yPoint);
            TrackSensorsViewModel.Track440(xPoint, yPoint);
            TrackSensorsViewModel.Track441(xPoint, yPoint);
            TrackSensorsViewModel.Track444(xPoint, yPoint);
        }
Esempio n. 4
0
        private void Timer_Tick(object sender, EventArgs e)
        {
            if (trainInMove)
            {
                Char delimeter = ';';
                offset = VisualTreeHelper.GetOffset(newTrain);
                String[] subString = offset.ToString().Split(delimeter);
                Double   xPoint    = Double.Parse(subString[0]);
                Double   yPoint    = Double.Parse(subString[1]);


                switch (ModbusProtocol.availableTrack2)
                {
                case 403:
                    Console.WriteLine("x: {0} y:{1}", xPoint, yPoint);
                    TrackSensorsViewModel.Track445(xPoint, yPoint);
                    TrackSensorsViewModel.Track403a_a(xPoint, yPoint);
                    TrackSensorsViewModel.Track403a_b(xPoint, yPoint);
                    TrackSensorsViewModel.Track403a_c(xPoint, yPoint);
                    TrackSensorsViewModel.Track403a_d(xPoint, yPoint);
                    TrackSensorsViewModel.Track403a_e(xPoint, yPoint);
                    TrackSensorsViewModel.Track446(xPoint, yPoint);
                    break;


                case 406:
                    Console.WriteLine("x: {0} y:{1}", xPoint, yPoint);
                    TrackSensorsViewModel.Track445(xPoint, yPoint);
                    TrackSensorsViewModel.Track406a(xPoint, yPoint);
                    TrackSensorsViewModel.Track406b(xPoint, yPoint);
                    TrackSensorsViewModel.Track406c(xPoint, yPoint);
                    TrackSensorsViewModel.Track446(xPoint, yPoint);

                    break;
                }
            }
            else
            {
                timer.Stop();
            }
        }
Esempio n. 5
0
        private void CheckTrack404(double xPoint, double yPoint)
        {
            if (ModbusProtocol.GetDataCoils(2) == false && xPoint < 500 && xPoint != 0)
            {
                TrainViewModel.queueTrainTo404Track.Add(trainNumber);
                storyboard.Pause();
                timer.Stop();
            }


            TrackSensorsViewModel.Track408(xPoint, yPoint);
            TrackSensorsViewModel.Track411(xPoint, yPoint);
            TrackSensorsViewModel.Track412(xPoint, yPoint);
            TrackSensorsViewModel.Track404a(xPoint, yPoint);
            TrackSensorsViewModel.Track404b(xPoint, yPoint);
            TrackSensorsViewModel.Track404c(xPoint, yPoint);
            TrackSensorsViewModel.Track404d(xPoint, yPoint);
            TrackSensorsViewModel.Track404e(xPoint, yPoint);
            TrackSensorsViewModel.Track441(xPoint, yPoint);
            TrackSensorsViewModel.Track444(xPoint, yPoint);
        }
Esempio n. 6
0
        private void CheckTrack402(double xPoint, double yPoint)
        {
            if (ModbusProtocol.GetDataCoils(3) == false && xPoint < 500 && xPoint != 0)
            {
                storyboard.Pause();
                timer.Stop();
                TrainViewModel.trainWait = true;
                TrainViewModel.queueTrainTo402Track.Add(trainNumber);
            }

            TrackSensorsViewModel.Track408(xPoint, yPoint);
            TrackSensorsViewModel.Track411(xPoint, yPoint);
            TrackSensorsViewModel.Track412(xPoint, yPoint);
            TrackSensorsViewModel.Track402a(xPoint, yPoint);
            TrackSensorsViewModel.Track402b(xPoint, yPoint);
            TrackSensorsViewModel.Track402c(xPoint, yPoint);
            TrackSensorsViewModel.Track402d(xPoint, yPoint);
            TrackSensorsViewModel.Track402e(xPoint, yPoint);
            TrackSensorsViewModel.Track440(xPoint, yPoint);
            TrackSensorsViewModel.Track441(xPoint, yPoint);
            TrackSensorsViewModel.Track444(xPoint, yPoint);
        }