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 PlumByteUI_Learn { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { UCOverview uo = new UCOverview(); uo.Dock = DockStyle.Fill; panelContainer.Controls.Add(uo); } private void button3_Click(object sender, EventArgs e) { throw new System.NotImplementedException(); } private void button4_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show(@"确定要退出吗?", @"确定退出?", MessageBoxButtons.OKCancel,MessageBoxIcon.Question); if (dialogResult.Equals(DialogResult.OK)) { System.Environment.Exit(0); // Application.Exit(); } } private void button1_Click(object sender, EventArgs e) { var playerView = new PlayerView(); this.panelContainer.Controls.Clear(); this.panelContainer.Controls.Add(playerView); } } }