Ejemplo n.º 1
0
        public ClockControlDialog(AppController appController)
        {
            InitializeComponent();
            this.appController = appController;

            // Add the clock label
            clockLabel = new ClockLabel
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Font     = new Font("Microsoft Sans Serif", 25F, FontStyle.Regular, GraphicsUnit.Millimeter, 0),
                Location = new Point(20, 50),
                Name     = "clockLabel",
                Size     = new Size(270, 110),
            };
            clockControlGroupBox.Controls.Add(clockLabel);
            appController.ClockTime.ClockChangeHandler += clockLabel.ClockChangeEventListener;
            clockLabel.SetTimeLabel(appController.ClockTime.CurrentTime);
            clockLabel.Redraw();
        }
Ejemplo n.º 2
0
        public RaceTimingForm()
        {
            Application.EnableVisualStyles();
            InitializeComponent();

            // Add the clock label
            clockLabel = new ClockLabel
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Font     = new Font("Microsoft Sans Serif", 25F, FontStyle.Regular, GraphicsUnit.Millimeter, 0),
                Location = new Point(12, 24),
                Name     = "clockLabel",
                Size     = new Size(splitContainer1.Panel1.Size.Width, 166),
            };
            splitContainer1.Panel1.Controls.Add(clockLabel);
            spaceBarLabel.Visible = false;

            Application.ThreadException += (o, e) => ShowExceptionMessageBox(e.Exception);
            AppDomain.CurrentDomain.UnhandledException += (o, e) => ShowExceptionMessageBox((Exception)e.ExceptionObject);

            appController = new ControllerFactory().AppController;
            appController.ClockTime.ClockChangeHandler  += clockLabel.ClockChangeEventListener;
            appController.ClockTime.ClockRunningHandler += ClockTimeOnClockRunningHandler;
            appController.ResultDataChange += ResultsQueueOnNewResult;
            SetTitle();

            // Setup result list view
            var listViewExtender   = new ListViewExtender(resultListView);
            var deleteResultColumn = new ListViewButtonColumn(3)
            {
                FixedWidth = true, DrawIfEmpty = false
            };

            deleteResultColumn.Click += DeleteResult;
            listViewExtender.AddColumn(deleteResultColumn);
            ListResults();

            var webController = new WebController(appController.GetRootUrl());

            webController.Start();
        }
Ejemplo n.º 3
0
        public RaceTimingForm()
        {
            Application.EnableVisualStyles();
            InitializeComponent();

            // Add the clock label
            clockLabel = new ClockLabel
            {
                Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Font = new Font( "Microsoft Sans Serif", 25F, FontStyle.Regular, GraphicsUnit.Millimeter, 0 ),
                Location = new Point( 12, 24 ),
                Name = "clockLabel",
                Size = new Size(splitContainer1.Panel1.Size.Width, 166),
            };
            splitContainer1.Panel1.Controls.Add( clockLabel );
            spaceBarLabel.Visible = false;

            Application.ThreadException += (o, e) => ShowExceptionMessageBox(e.Exception);
            AppDomain.CurrentDomain.UnhandledException += (o, e) => ShowExceptionMessageBox((Exception)e.ExceptionObject);

            appController = new ControllerFactory().AppController;
            appController.ClockTime.ClockChangeHandler += clockLabel.ClockChangeEventListener;
            appController.ClockTime.ClockRunningHandler += ClockTimeOnClockRunningHandler;
            appController.ResultDataChange += ResultsQueueOnNewResult;
            SetTitle();

            // Setup result list view
            var listViewExtender = new ListViewExtender(resultListView);
            var deleteResultColumn = new ListViewButtonColumn(3) { FixedWidth = true, DrawIfEmpty = false };
            deleteResultColumn.Click += DeleteResult;
            listViewExtender.AddColumn(deleteResultColumn);
            ListResults();

            var webController = new WebController( appController.GetRootUrl() );
            webController.Start();
        }