MainForm.cs
(开头部分) 19KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace MyPersonnel
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private string MyBgPhoto;
private string MyAddress;
private string MyTel;
private string MyCode;
private string MyWeb;
private string MySlogan;
private string MyBgPhotoShow;
private string MyOperator;
private string MyCompany;
private void MainForm_Load(object sender, EventArgs e)
{
//添加ThreadException事件关联程序
Application.ThreadException += MyThreadException;
//从公司信息数据表中读取基本信息
this.GetCompanyInformation();
//显示登录对话框
LoginForm MyDlg = new LoginForm();
MyDlg.Text = "欢迎使用" + MySlogan;
MyDlg.ShowDialog(this);
this.MyOperator = MyDlg.用户名称TextBox.Text;
//根据用户的操作权限配置系统菜单
SetUserOperateMenu();
//最大化显示系统主窗体
if (MyOperator.Length > 0)
{
this.WindowState = FormWindowState.Maximized;
}
//设置系统背景图像信息
this.BackgroundImage = new Bitmap(this.MyBgPhotoShow, true);
//设置系统标题栏显示文字
this.Text = MySlogan;
}
//系统异常处理代码
public void MyThreadException(Object sender, System.Threading.ThreadExceptionEventArgs e)
{
string MyInfo = "错误名称:" + e.Exception.Source + ",错误信息:" + e.Exception.Message;
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
//实现在系统关闭前给予用户提示
protected override void WndProc(ref Message SystemMessage)
{
switch (SystemMessage.Msg)
后面还有 379 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
