Admin/FrmMain.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace Admin
{
    public partial class FrmMain : Form
    {
        private LoginLogManager objLoginLogManager = new LoginLogManager();

        #region 系统初始化与退出

        public FrmMain()
        {
            InitializeComponent();
            // 显示用户姓名
            this.tssl_AdminName.Text = Program.CurrentPerson.AdminName;

            CalcPosition();
        }

        private void CalcPosition()
        {
            FrmFactory.LeftWidth = this.Location.X + this.spContainer.Panel1.Width;
            FrmFactory.Panel2Width = this.spContainer.Panel2.Width;
            FrmFactory.TopHeight = this.Location.Y;
            FrmFactory.Panel2Height = +this.spContainer.Panel2.Height;
        }

        //退出系统
        private void tsmiExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult result = MessageBox.Show("确认退出吗?", "退出询问", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (result != DialogResult.OK)
            {
                //取消当前的关闭操作
                e.Cancel = true;
                return;
            }
            objLoginLogManager.UpdateExitTime(Program.CurrentPerson.LoginLogId);
        }

        #endregion

        //让窗体在容器panle2的中间位置
后面还有 196 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。