37 lines
		
	
	
		
			848 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			37 lines
		
	
	
		
			848 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| 
								 | 
							
								namespace PrivateBox
							 | 
						|||
| 
								 | 
							
								{
							 | 
						|||
| 
								 | 
							
								    public partial class InputDlgBox:Form
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
								        public InputDlgBox() {
							 | 
						|||
| 
								 | 
							
								            InitializeComponent();
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								            this.Load += InputDlgBox_Load;
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        public InputDlgBox(string title,string msg) : this() {
							 | 
						|||
| 
								 | 
							
								            this.Text = title;
							 | 
						|||
| 
								 | 
							
								            this.textBox1.Text = msg;
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        private void InputDlgBox_Load(object? sender,EventArgs e) {
							 | 
						|||
| 
								 | 
							
								            this.btOk.Click += BtOk_Click;
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        private void BtOk_Click(object? sender,EventArgs e) {
							 | 
						|||
| 
								 | 
							
								            this.DialogResult = DialogResult.OK;
							 | 
						|||
| 
								 | 
							
								            this.Hide();
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        private int msg;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        /// <summary>
							 | 
						|||
| 
								 | 
							
								        /// 输入的信息
							 | 
						|||
| 
								 | 
							
								        /// </summary>
							 | 
						|||
| 
								 | 
							
								        public string Msg {
							 | 
						|||
| 
								 | 
							
								            get { return this.textBox1.Text; }
							 | 
						|||
| 
								 | 
							
								            set { this.textBox1.Text = value; }
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |