private void timer_showAlert_Tick(object sender, EventArgs e) { timer_showAlert.Stop(); if (remindSign) { fr = new Form_Remind(); fr.Show(); } }
//初始化 private void MainForm_Load(object sender, EventArgs e) { //设置窗体初始的位置 double screenX = Screen.GetWorkingArea(this).Width; //得到屏幕整体宽度 this.Left = int.Parse((screenX * 0.75).ToString()); //设置窗体与左边的距离 //double screenY = Screen.GetWorkingArea(this).Height;//得到屏幕整体高度 //this.Top = int.Parse((screenY * 0.1).ToString());//设置窗体与上边的距离 this.Top = 100;//设置窗体与上边的距离 //初始化数据 userList = new List <UserItem>(); countdownList = new List <string>(); countdownID = new List <int>(); fr = null; //得到数据库数据 GetDeadLineData(); if (userList.Count > 0) { userList[0].SetBackColor(0); UserItem.setCurID(userList[0].UserID); } else { EmptyItem ei = new EmptyItem(); pannelList.Controls.Add(ei); } //设置Utils的TOP&LEFT Utils.formTop = this.Top + this.Height / 3; Utils.formLeft = this.Left; Utils.formWidth = this.Width; //显示提醒 timer_showAlert.Start(); }
//初始化 private void MainForm_Load(object sender, EventArgs e) { //设置窗体初始的位置 double screenX = Screen.GetWorkingArea(this).Width;//得到屏幕整体宽度 this.Left = int.Parse((screenX * 0.75).ToString());//设置窗体与左边的距离 //double screenY = Screen.GetWorkingArea(this).Height;//得到屏幕整体高度 //this.Top = int.Parse((screenY * 0.1).ToString());//设置窗体与上边的距离 this.Top = 100;//设置窗体与上边的距离 //初始化数据 userList = new List<UserItem>(); countdownList = new List<string>(); countdownID = new List<int>(); fr = null; //得到数据库数据 GetDeadLineData(); if (userList.Count > 0) { userList[0].SetBackColor(0); UserItem.setCurID(userList[0].UserID); } else { EmptyItem ei = new EmptyItem(); pannelList.Controls.Add(ei); } //设置Utils的TOP&LEFT Utils.formTop = this.Top + this.Height / 3; Utils.formLeft = this.Left; Utils.formWidth = this.Width; //显示提醒 timer_showAlert.Start(); }