Ejemplo n.º 1
0
 private void DisplayFullVideo(object Camera)
 {
     if (Camera is TeslaCamFile.CameraType)
     {
         if (CurrentFullVideo == TeslaCamFile.CameraType.UNKNOWN)
         {
             var cam = (TeslaCamFile.CameraType)Camera;
             if (cam == TeslaCamFile.CameraType.FRONT)
             {
                 this.BottomVideoRowHeight = new GridLength(0);
                 this.TopVideoRowHeight    = new GridLength(1, GridUnitType.Star);
             }
             if (cam == TeslaCamFile.CameraType.LEFT_REPEATER)
             {
                 this.TopVideoRowHeight     = new GridLength(0);
                 this.BottomVideoRowHeight  = new GridLength(1, GridUnitType.Star);
                 this.LeftVideoColumnWidth  = new GridLength(1, GridUnitType.Star);
                 this.RightVideoColumnWidth = new GridLength(0);
             }
             if (cam == TeslaCamFile.CameraType.RIGHT_REPEATER)
             {
                 this.TopVideoRowHeight     = new GridLength(0);
                 this.BottomVideoRowHeight  = new GridLength(1, GridUnitType.Star);
                 this.RightVideoColumnWidth = new GridLength(1, GridUnitType.Star);
                 this.LeftVideoColumnWidth  = new GridLength(0);
             }
             CurrentFullVideo = cam;
         }
         else
         {
             ResetVideoDisplay();
             CurrentFullVideo = TeslaCamFile.CameraType.UNKNOWN;
         }
     }
 }
Ejemplo n.º 2
0
        private void DisplayFullVideo(object Camera)
        {
            if (Camera is TeslaCamFile.CameraType)
            {
                if (CurrentFullVideo == TeslaCamFile.CameraType.UNKNOWN)
                {
                    var cam = (TeslaCamFile.CameraType)Camera;
                    switch (cam)
                    {
                    case TeslaCamFile.CameraType.FRONT:
                        this.BottomVideoRowHeight = new GridLength(0);
                        this.TopVideoRowHeight    = new GridLength(1, GridUnitType.Star);
                        break;

                    case TeslaCamFile.CameraType.LEFT_REPEATER:
                        this.TopVideoRowHeight     = new GridLength(0);
                        this.BottomVideoRowHeight  = new GridLength(1, GridUnitType.Star);
                        this.LeftVideoColumnWidth  = new GridLength(1, GridUnitType.Star);
                        this.BackVideoColumnWidth  = new GridLength(0);
                        this.RightVideoColumnWidth = new GridLength(0);
                        break;

                    case TeslaCamFile.CameraType.RIGHT_REPEATER:
                        this.TopVideoRowHeight     = new GridLength(0);
                        this.BottomVideoRowHeight  = new GridLength(1, GridUnitType.Star);
                        this.RightVideoColumnWidth = new GridLength(1, GridUnitType.Star);
                        this.LeftVideoColumnWidth  = new GridLength(0);
                        this.BackVideoColumnWidth  = new GridLength(0);
                        break;

                    case TeslaCamFile.CameraType.BACK:
                        this.TopVideoRowHeight     = new GridLength(0);
                        this.BottomVideoRowHeight  = new GridLength(1, GridUnitType.Star);
                        this.BackVideoColumnWidth  = new GridLength(1, GridUnitType.Star);
                        this.LeftVideoColumnWidth  = new GridLength(0, GridUnitType.Pixel);
                        this.RightVideoColumnWidth = new GridLength(0, GridUnitType.Pixel);
                        break;
                    }
                    CurrentFullVideo = cam;
                }
                else
                {
                    ResetVideoDisplay();
                    CurrentFullVideo = TeslaCamFile.CameraType.UNKNOWN;
                }
            }
        }