using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class Frm_1 : Form
{
public Frm_1()
{
InitializeComponent();
string str;
str = ConfigurationManager.AppSettings[""];
if (str == null)
MessageBox.Show("str为空");
this.Text = str;
}
private void button1_Click(object sender, EventArgs e)
{
string str1;
str1 = ConfigurationManager.AppSettings["User"];
MessageBox.Show( str1);
}
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show("窗体正在加载");
}
private void Frm_1_FormClosing(object sender, FormClosingEventArgs e)
{
MessageBox.Show("正在关闭窗口,是否退出?");
}
}
}