public MySelfInfoForm(HomeSubForm home) { InitializeComponent(); //保存主界面对象 _home = home; //查询我的资料 int uid = Local.getCurrentUid(); DataTable dt = BLL.UserBLL.selectMYInfo(uid); labuid.Text = dt.Rows[0]["uid"].ToString(); txtName.Text = dt.Rows[0]["name"].ToString(); comboxsex.SelectedIndex = Convert.ToInt32(dt.Rows[0]["sex"]); skinDateTimePicker1.text = dt.Rows[0]["birthday"].ToString(); txtQQ.Text = dt.Rows[0]["qq"].ToString(); txtPhone.Text = dt.Rows[0]["phone"].ToString(); txtAddress.Text = dt.Rows[0]["address"].ToString(); //init header初始化头像 string headurl = BLL.UserBLL.selectMyHeader(Local.getCurrentUid()); if (headurl == null || headurl == "") { this.pictureBox1.Load("img/touxiang.png"); } else { this.pictureBox1.Load(headurl); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnHome_Click(object sender, EventArgs e) { this.skinPanel1.Controls.Clear(); HomeSubForm hsf = new HomeSubForm(); hsf.BackColor = Color.FromArgb(240, 240, 240); hsf.TopLevel = false; hsf.Size = this.skinPanel1.Size; this.skinPanel1.Controls.Add(hsf); hsf.Show(); }
public MainForm() { InitializeComponent(); /// showWin += showGG; //初始化网络模块 initNetWork(); /// HomeSubForm hsf = new HomeSubForm(); hsf.BackColor = Color.FromArgb(240, 240, 240); hsf.TopLevel = false;//设置不为顶级窗口 hsf.Size = this.skinPanel1.Size; this.skinPanel1.Controls.Add(hsf); hsf.Show(); }