public CheckInTimerControl(DynamicSheetWriter writer, int number) : base(writer, number) { InitializeComponent(); this.heading.Text = "Check in " + number; this.heading.AutoSize = false; this.heading.TextAlign = ContentAlignment.TopCenter; this.heading.Dock = DockStyle.Fill; writer.WriteLineArrWithoutLineBreak(new string[] { "Checkin " + number + " start", "Checkin " + number + " end", "Checkin " + number + " duration", "Checkin " + number + " type", "Checkin " + number + " comments" }); writer.FormatPretty(); this.clearButton.Click += (s, e) => { this.textbox.Text = ""; }; this.startButton.Click += StartButton_Click; this.stopButton.Click += StopButton_Click; this.stopButton.Enabled = false; this.checkInType = "Normal"; this.neverStarted = true; // Set keyboard shortcuts string[] shortcuts = TimerControl.GetShortCutsForStartAndStop(number); if (shortcuts[0] != null && shortcuts[1] != null) { this.startButton.Text = this.startButton.Text + " (&" + shortcuts[0] + ")"; this.stopButton.Text = this.stopButton.Text + " (&" + shortcuts[1] + ")"; } }
public ArrivalTimerControl(DynamicSheetWriter writer) : base(writer, 0) { InitializeComponent(); writer.WriteLineArrWithoutLineBreak(new string[] { "Arrival time", "Arrival type", "Arrival comment" }); writer.FormatPretty(); this.neverStarted = true; this.undoLastButton.Enabled = false; this.totalArrivals = 0; }