This repository has been archived on 2024-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
2024-04-18 08:38:59 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace CDSAE3_Lian_Lian_Kan.Forms
|
|
|
|
|
{
|
|
|
|
|
public partial class FinishedMessageBox : Form
|
|
|
|
|
{
|
|
|
|
|
public FinishedMessageBox()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
int score = 0;
|
|
|
|
|
int costTime = 0;
|
|
|
|
|
public FinishedMessageBox(int score,int costTime)
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2024-04-22 13:48:40 +08:00
|
|
|
|
Location = new Point(Etcs.form!.Left + Etcs.form.Width - Width / 2, Etcs.form.Top + Etcs.form.Height + Height / 2);
|
2024-04-18 08:38:59 +08:00
|
|
|
|
this.score = score;
|
|
|
|
|
this.costTime = costTime;
|
|
|
|
|
scoreLabel.Text = "分数:" + score.ToString();
|
|
|
|
|
scoreLabel.Location = new Point((649 - scoreLabel.Size.Width) / 2, scoreLabel.Location.Y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void nameTextBox_Enter(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
nameTextBox.Font = new Font("Microsoft YaHei UI", 15F);
|
|
|
|
|
nameTextBox.ForeColor = Color.FromArgb(0,0,0);
|
|
|
|
|
nameTextBox.Text = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void 确定_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Etcs.charts.AddRecord(new Etcs.RecordInfo { Name = nameTextBox.Text==""?"Anonymous": nameTextBox.Text ,Score = score,Time = DateTime.Now,CostTime = costTime,Difficulty = Etcs.current_difficulty.ToString()});
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|