private void Login_Load(object sender, EventArgs e) { Welcome welform = new Welcome(); welform.ShowDialog(); igl = (new ClassFactory()).GetIGeneralLogin(); dh = new DataHelper(); UserDT = dh.GetTable(GlobalParam.TableName_User); foreach (DataRow dr in UserDT.Rows) { comboBox_Account.Items.Add(dr["UserName"]); } this.Icon = Properties.Resources.Icon_book; this.AcceptButton = button_Login; textBox_PassWord.PasswordChar = '*'; button_Login.BackColor = Color.Blue; button_Login.ForeColor = Color.White; button_Login.FlatStyle = FlatStyle.Flat; pictureBox_eye.Image = Properties.Resources.P_eye; pictureBox_eye.SizeMode = PictureBoxSizeMode.StretchImage; toolTip_p_eye.SetToolTip(pictureBox_eye, "显示密码"); //控件排版 Composing(); WindowsAPI.AnimateWindow(this.Handle, 300, WindowsAPI.AW_CENTER | WindowsAPI.AW_ACTIVATE); timer1.Enabled = true; }
private void WriteNote_FormClosed(object sender, FormClosedEventArgs e) { RegistryKey RegKey1, RegKey2; RegKey1 = Registry.CurrentUser;//获取当前用户注册表项 try { RegKey2 = RegKey1.CreateSubKey(@"Software\NoteBook");//创建注册表子项 RegKey2.SetValue("PointX", this.Location.X.ToString()); RegKey2.SetValue("PointY", this.Location.Y.ToString()); } catch { } WindowsAPI.AnimateWindow(this.Handle, 1000, WindowsAPI.AW_BLEND | WindowsAPI.AW_HIDE); }
private void WriteNote_Load(object sender, EventArgs e) { dh = new DataHelper(); tfb = new TestForBinary(); RegistryKey RegKey1, RegKey2; RegKey1 = Registry.CurrentUser;//获取当前用户注册表项 try { RegKey2 = RegKey1.CreateSubKey(@"Software\NoteBook");//创建注册表子项 this.Location = new Point(Convert.ToInt16(RegKey2.GetValue("PointX")), Convert.ToInt16(RegKey2.GetValue("PointY"))); } catch { this.Location = new Point( (Screen.PrimaryScreen.WorkingArea.Width - this.Size.Width) / 2, (Screen.PrimaryScreen.WorkingArea.Height - this.Size.Height) / 2); } this.Icon = Properties.Resources.Icon_book; pictureBox_min.BackColor = Color.Transparent; pictureBox_close.BackColor = Color.Transparent; comboBox_weather.Items.Add("晴"); comboBox_weather.Items.Add("阴"); comboBox_weather.Items.Add("多云"); comboBox_weather.Items.Add("雨"); comboBox_weather.Items.Add("雪"); comboBox_weather.SelectedIndex = 0; comboBox_mood.Items.Add("开心"); comboBox_mood.Items.Add("郁闷"); comboBox_mood.Items.Add("失落"); comboBox_mood.Items.Add("无聊"); comboBox_mood.SelectedIndex = 0; label_UserName.Text = GlobalParam.Active_User; WindowsAPI.AnimateWindow(this.Handle, 300, WindowsAPI.AW_CENTER | WindowsAPI.AW_ACTIVATE); }
private void Welcome_FormClosed(object sender, FormClosedEventArgs e) { timer1.Stop(); timer2.Stop(); WindowsAPI.AnimateWindow(this.Handle, 3000, WindowsAPI.AW_BLEND | WindowsAPI.AW_HIDE); }