Пример #1
0
        private void Initialize()
        {
            Utils.ConfigureColumns <PlayListObject>(PlayList, hiddenColumns: new [] { "Player" });
            _replayController = new ReplayController(ViewerBox, Global.AppSettings.ReplayViewer.RenderingSettings);
            _replayController.UpdateReplaySettings();
            foreach (var resolution in DisplayDevice.Default.AvailableResolutions)
            {
                ResolutionBox.Items.Add(
                    $"{resolution.Width}x{resolution.Height}x{resolution.BitsPerPixel}, {resolution.RefreshRate} Hz");
                if (resolution.Equals(DisplayDevice.Default.SelectResolution(1, 1, 1, 1)))
                {
                    ResolutionBox.SelectedIndex = ResolutionBox.Items.Count - 1;
                }
            }

            Size = Global.AppSettings.ReplayViewer.Size;
            playbackSpeedBar.Value         = 0;
            FollowDriverBox.Checked        = Global.AppSettings.ReplayViewer.FollowDriver;
            followAlsoWhenZooming.Checked  = Global.AppSettings.ReplayViewer.FollowAlsoWhenZooming;
            LoopPlayingBox.Checked         = Global.AppSettings.ReplayViewer.LoopPlaying;
            ShowDriverPathBox.Checked      = Global.AppSettings.ReplayViewer.ShowDriverPath;
            MouseClickZoomBox.Text         = Global.AppSettings.ReplayViewer.MouseClickStep.ToString();
            MouseWheelZoomBox.Text         = Global.AppSettings.ReplayViewer.MouseWheelStep.ToString();
            LockedCamBox.Checked           = Global.AppSettings.ReplayViewer.LockedCamera;
            TransparentInactiveBox.Checked = Global.AppSettings.ReplayViewer.DrawTransparentInactive;
            PictBackGroundBox.Checked      = Global.AppSettings.ReplayViewer.PicturesInBackGround;
            PlayerFramesBox.Checked        = Global.AppSettings.ReplayViewer.DrawOnlyPlayerFrames;
            SelectNoPlayersBox.Checked     = Global.AppSettings.ReplayViewer.DontSelectPlayersByDefault;
            HideStartObjectBox.Checked     = Global.AppSettings.ReplayViewer.HideStartObject;
            multiSpyBox.Checked            = Global.AppSettings.ReplayViewer.MultiSpy;
            WindowState = Global.AppSettings.ReplayViewer.WindowState;
            UpdateControlColor(ActivePlayerPanel, Global.AppSettings.ReplayViewer.ActivePlayerColor);
            UpdateControlColor(InActivePlayerPanel, Global.AppSettings.ReplayViewer.InactivePlayerColor);
            SetupEventHandlers();
        }
Пример #2
0
        private void RenderingOptionsChanged(object sender = null, EventArgs e = null)
        {
            SaveViewerSettings();
            var speed = Math.Pow(2, playbackSpeedBar.Value);

            _replayController.SetPlayBackSpeed(speed);
            toolTip1.SetToolTip(playbackSpeedBar, "Playback speed: " + speed + "x");
            _replayController.UpdateReplaySettings();
            RedrawSceneIfNotPlaying();
        }