private void StudentWelcomeForm_Load(object sender, EventArgs e) { ViewHelper.MdiChildrenAutoSize(this); this.Dock = DockStyle.Fill; cboMajorsInit(); lblName.Text = UserHelper.user.name; //switch (UserHelper.currentMajorId) //{ // case 1: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.车学; // break; // case 2: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.电学; // break; // case 3: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.工学; // break; // case 4: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.调学; // break; // case 5: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.供学; // break; // default: // break; //} }
private void UserInfoForm_Load(object sender, EventArgs e) { ViewHelper.MdiChildrenAutoSize(this); this.Dock = DockStyle.Fill; //设置ListView为详细视图,并添加5列 //listView1.View = View.Details; //listView1.Columns.Add("", 80); //listView1.Columns.Add("", 100); //listView1.Columns.Add("", 100); //listView1.Columns.Add("", 100); //listView1.Columns.Add("", 150); //listView1.Columns.Add("", 100); //设置ListView选中一项时选中整行 listView1.FullRowSelect = true; //设置ListView失去焦点时选中内容可见 listView1.HideSelection = false; //设置ListView只能选中一行 listView1.MultiSelect = false; //创建一个联系人对话框的实例 dialog = new UserDialog(); dialog.Owner = this; showAllUsers(); }
private void StudentWelcomeForm_Load(object sender, EventArgs e) { int top = 45; int toop = 30; int sen = this.Height - (top + toop); int heit = this.Size.Height; int with = this.Size.Width; this.panel2.Location = new Point(0, 0); this.panel2.Size = new Size(this.Width, top); this.panel1.Location = new Point(0, this.panel2.Height); this.panel1.Size = new Size(this.Width, sen); this.panel3.Location = new Point(0, this.panel1.Location.Y + this.panel1.Height); this.panel3.Size = new Size(this.Width, toop); ViewHelper.MdiChildrenAutoSize(this); this.Dock = DockStyle.Fill; cboMajorsInit(); lblName.Text = UserHelper.user.name; //switch (UserHelper.currentMajorId) //{ // case 1: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.车学; // break; // case 2: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.电学; // break; // case 3: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.工学; // break; // case 4: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.调学; // break; // case 5: upDownSplitContainer.Panel1.BackgroundImage = VirtualTrain.Properties.Resources.供学; // break; // default: // break; //} }