Exemplo n.º 1
0
        public MainGameForm()
        {
            InitializeComponent();
            var vizualizationForm = new VizualizationForm(this);

            vizualizationForm.Show();

            KeepAlive();

            UserParameters = new UserDefinedParametersPrototypeFactory();

            var outputFacade = new UserInterfaceOutputFacade(this, vizualizationForm);

            InputFacade = new UserInterfaceInputFacade(outputFacade, UserParameters);

            TrackingLog = new List <string>();

            InitializeVisualisationCombobox();
            Buttons = new List <Button>()
            {
                NewGameBtn, LoadGameBtn, SaveGameBtn,
                EndGameBtn, StartTrackingBtn, Recalibrate, StopTrackingBtn,
                MovementBtn1, MovementBtn2, MovementBtn3, MovementBtn4
            };
            InitialUiLockState();

            var materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue400, Primary.Blue600, Primary.Red100, Accent.Pink100, TextShade.WHITE);
        }
Exemplo n.º 2
0
 public Pipeline(BlockingCollection <Message> processingOutputQueue, UserDefinedParametersPrototypeFactory userParametersFactory)
 {
     ProcessingOutputQueue  = processingOutputQueue;
     UserParametersFactory  = userParametersFactory;
     UserParameters         = userParametersFactory.GetShallowCopy();
     IsTracking             = false;
     PlaneLocalization      = new PlaneLocalization(this);
     ChessboardLocalization = new ChessboardLocalization();
     FiguresLocalization    = new FiguresLocalization();
 }
Exemplo n.º 3
0
        public AdvancedSettingsForm(MainGameForm mainForm, UserDefinedParametersPrototypeFactory userParameters)
        {
            MainForm       = mainForm;
            UserParameters = userParameters;
            InitializeComponent();

            var materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);

            PrepareComponentsValues();
        }
Exemplo n.º 4
0
        public UserInterfaceInputFacade(UserInterfaceOutputFacade outputFacade, UserDefinedParametersPrototypeFactory userParameters)
        {
            var programStateController = new ProgramStateController();

            ProgramState = programStateController;

            OutputFacade             = outputFacade;
            GameController           = new GameController(outputFacade, ProgramState);
            TrackingResultProcessing = new TrackingResultProcessing(outputFacade, GameController, ProgramState);
            TrackingManager          = new TrackingManager(OutputFacade, TrackingResultProcessing, userParameters, ProgramState);

            programStateController.SetInitialContext(outputFacade, GameController, TrackingManager, TrackingResultProcessing);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initialization of tracking thread
        /// </summary>
        private void InitPipelineThread(UserDefinedParametersPrototypeFactory userParameters)
        {
            var thread = new Thread(() =>
            {
                var processingController =
                    new PipelineController(ProcessingCommandsQueue, ProcessingOutputQueue, userParameters);
                processingController.Start();
            })
            {
                IsBackground = true
            };

            thread.Start();
        }
Exemplo n.º 6
0
        public TrackingManager(UserInterfaceOutputFacade outputFacade, TrackingResultProcessing trackingResultProcessing, UserDefinedParametersPrototypeFactory userParameters, IProgramState programState)
        {
            OutputFacade             = outputFacade;
            TrackingResultProcessing = trackingResultProcessing;
            ProgramState             = programState;

            ProcessingCommandsQueue = new BlockingCollection <Message>(new ConcurrentQueue <Message>());
            ProcessingOutputQueue   = new BlockingCollection <Message>(new ConcurrentQueue <Message>());

            InitPipelineThread(userParameters);
        }
Exemplo n.º 7
0
 public PipelineController(BlockingCollection <Message> processingCommandsQueue, BlockingCollection <Message> processingOutputQueue, UserDefinedParametersPrototypeFactory userParameters)
 {
     ProcessingCommandsQueue = processingCommandsQueue;
     ProcessingOutputQueue   = processingOutputQueue;
     Pipeline = new Pipeline(ProcessingOutputQueue, userParameters);
 }