Пример #1
0
        private void PopulateButtons()
        {
            toggleCapture = new Button(
                "Stop Capture",
                new Vector2f(20, 20),
                () => ToggleCapture(),
                HorizontalAlignment.Left);

            buttons.Add(toggleCapture);

            samplesCaptured = new Button(
                "0",
                new Vector2f(appManager.GetScreenConfiguration().Width - 20, 20),
                () => { },
                HorizontalAlignment.Right);

            buttons.Add(samplesCaptured);

            buttons.Add(new Button("Reset", new Vector2f(20, 75), () =>
            {
                humanCar.ResetCapture();
                notificationService.ShowToast(
                    ToastType.Info,
                    "Capture Data Cleared");
            }, HorizontalAlignment.Left));

            buttons.Add(new Button("Train", new Vector2f(20, 125), () =>
            {
                StartTraining();
            }, HorizontalAlignment.Left));

            buttons.Add(new Button("Test", new Vector2f(20, 175), () =>
            {
                notificationService.ShowToast(
                    ToastType.Info,
                    "Starting Test...");

                StartTesting();
            }, HorizontalAlignment.Left));

            buttons.Add(new Button("Export", new Vector2f(20, appManager.GetScreenConfiguration().Height - 65), () =>
            {
                SaveNetwork();

                notificationService.ShowToast(
                    ToastType.Info,
                    "Saved");
            }, HorizontalAlignment.Left));
        }
        public RacingSimulationVisualization(
            IApplicationManager appManager)
        {
            this.camera = new Camera(appManager.GetScreenConfiguration());

            this.carVisuals = new List <CarVisual>();
        }