public FrmLogin() { InitializeComponent(); Rectangle rectangle = Screen.PrimaryScreen.Bounds; PubGlobal.SetFullScreen(true, ref rectangle);//false为恢复状态栏 this.Location = new Point((Screen.PrimaryScreen.Bounds.Width - this.Width) / 2, (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2); Cursor.Hide(); }
/// <summary> /// 登陆操作 /// </summary> private void Login() { string msg; if (frmLogin.ShowDialog() == DialogResult.OK) { ShowWait("正获取系统信息\r\n请稍候..."); if (!Comm.Comm.GetPayModeFunc(PubGlobal.OrgCode, PubGlobal.User.UserCode, PubGlobal.User.Password, ref PubGlobal.sPayTypes, out msg))//登陆成功,读取付款方式参数 { MessageBox.Show("付款方式列表获取失败:" + msg); } if (!Comm.Comm.GetBillPre(PubGlobal.OrgCode, PubGlobal.User.UserCode, PubGlobal.User.Password, out msg)) { MessageBox.Show("业务类型编码获取失败:" + msg); } //清空功能列表 listView1.Items.Clear(); foreach (UserRight right in PubGlobal.User.Rights) { if (right.ISENABLE == "1") { ListViewItem lvItem = new ListViewItem(right.FUNNAME); lvItem.Tag = right.FUNCODE; int index = int.Parse(right.FUNCODE); if (index > imageList1.Images.Count - 1) { lvItem.ImageIndex = 0; } else { lvItem.ImageIndex = int.Parse(right.FUNCODE); } listView1.Items.Add(lvItem); } } HideWait(); } else { Rectangle rectangle = Screen.PrimaryScreen.Bounds; PubGlobal.SetFullScreen(false, ref rectangle);//false为恢复状态栏 this.Close(); } }