示例#1
0
        private void LstView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter && lstView.SelectedItems.Count >= 1)
            {
                DetailedStatsForm detailedStatsForm = new DetailedStatsForm(HistoryManager.GetTrainingHistory((DateTime)lstView.SelectedItems[0].Tag));

                Point location = this.PointToScreen(Point.Empty);
                detailedStatsForm.Location = new Point(location.X + (this.Width / 2) - (detailedStatsForm.Width / 2),
                                                       location.Y + (this.Height / 2) - (detailedStatsForm.Height / 2) - 30);

                detailedStatsForm.ShowDialog();
            }
        }
示例#2
0
        private void MoreBtn_Click(object sender, EventArgs e)
        {
            DetailedStatsForm detailedStatsForm = new DetailedStatsForm(new TrainingHistory(AverageSpeed,
                                                                                            Date,
                                                                                            Duration,
                                                                                            ListName,
                                                                                            MinimumVerbs,
                                                                                            Mode,
                                                                                            ObjectiveSpeed,
                                                                                            ObjectiveWon,
                                                                                            Score,
                                                                                            TimeOver,
                                                                                            TimerObjectiveTime,
                                                                                            TotalVerbs,
                                                                                            WinPercentage,
                                                                                            WonVerbs,
                                                                                            VerbAnswers));
            Point location = this.PointToScreen(Point.Empty);

            detailedStatsForm.Location = new Point(location.X + (this.Width / 2) - (detailedStatsForm.Width / 2),
                                                   location.Y + (this.Height / 2) - (detailedStatsForm.Height / 2) - 30);

            detailedStatsForm.ShowDialog();
        }