📄 mainform.cs
字号:
MyConnection.Close();
}
}
private void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (MessageBox.Show("您确定现在退出本系统吗?", "信息提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
this.Close();
}
}
private void 公司信息设置ToolStripMenuItem_Click(object sender, EventArgs e)
{
CompanyForm MyDlg = new CompanyForm();
MyDlg.ShowDialog();
StringBuilder MyTempPath = new StringBuilder(this.MyBgPhotoShow);
this.GetCompanyInformation();
//生成系统背景图像
if (!System.IO.File.Exists(MyBgPhotoShow))
{
Image MyImage = new Bitmap(MyBgPhoto, true);
int PosX = 10;
int PosY = MyImage.Height / 2 + 200;
int MyFont = 150;
bool bMyFound = false;
int MyWidth = MyImage.Width;
int MyHeight = MyImage.Height;
int MySize = MyWidth * MyHeight;
Bitmap MyPattern = new Bitmap(MyWidth, MyHeight);
Bitmap MyBitmap = new Bitmap(MyImage);
Graphics g = Graphics.FromImage(MyPattern);
Graphics MyGraphics = Graphics.FromImage(MyImage);
g.Clear(Color.White);
while (bMyFound == false)
{
Font NewFont = new Font("宋体", MyFont, FontStyle.Bold);
SizeF MyString = new SizeF(MyWidth, MyHeight);
MyString = g.MeasureString(MySlogan, NewFont);
if (MyString.Width < MyPattern.Width)
{
if (MyString.Height < MyPattern.Height)
{
bMyFound = true;
g.DrawString(MySlogan, NewFont, new SolidBrush(Color.Black), PosX, PosY);
}
}
else
MyFont = MyFont - 1;
}
for (int x = 1; x < MyPattern.Width; x++)
{
for (int y = 1; y < MyPattern.Height; y++)
{
int a, re, gr, bl, x1, y1, z1;
if (MyPattern.GetPixel(x, y).ToArgb() == Color.Black.ToArgb())
{
a = MyBitmap.GetPixel(x, y).A;
re = MyBitmap.GetPixel(x, y).R;
gr = MyBitmap.GetPixel(x, y).G;
bl = MyBitmap.GetPixel(x, y).B;
x1 = re;
y1 = gr;
z1 = bl;
if (bl + 25 < 255)
bl = bl + 25;
if (gr + 25 < 255)
gr = gr + 25;
if (re + 25 < 255)
re = re + 25;
if (x1 - 25 > 0)
x1 = x1 - 25;
if (y1 - 25 > 0)
y1 = y1 - 25;
if (z1 - 25 > 0)
z1 = z1 - 25;
MyGraphics.DrawEllipse(new Pen(new SolidBrush(Color.Black)), x, y + 1, 3, 3);
MyGraphics.DrawEllipse(new Pen(new SolidBrush(Color.FromArgb(a, x1, y1, z1))), x, y, 1, 1);
}
}
}
MyGraphics.DrawString("公司地址:" + MyAddress, new Font("宋体", 10, FontStyle.Regular), new SolidBrush(Color.Yellow), 10, 80);
MyGraphics.DrawString("服务电话:" + MyTel, new Font("宋体", 10, FontStyle.Regular), new SolidBrush(Color.Yellow), 10, 100);
MyGraphics.DrawString("公司网站:" + MyWeb, new Font("宋体", 10, FontStyle.Regular), new SolidBrush(Color.Yellow), 10, 120);
MyImage.Save(MyBgPhotoShow, System.Drawing.Imaging.ImageFormat.Jpeg);
}
this.BackgroundImage = new Bitmap(this.MyBgPhotoShow, true);
this.Text = MySlogan;
}
private void 系统参数设置ToolStripMenuItem_Click(object sender, EventArgs e)
{
DictionaryForm MyDlg = new DictionaryForm();
MyDlg.ShowDialog();
}
private void 公司职员设置ToolStripMenuItem_Click(object sender, EventArgs e)
{
PersonnelForm MyDlg = new PersonnelForm();
MyDlg.ShowDialog();
}
private void 出售房源管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
SaleHouseForm MyDlg = new SaleHouseForm();
MyDlg.MyTel = this.MyTel;
MyDlg.ShowDialog();
}
private void 求购客户管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
SaleClientForm MyDlg = new SaleClientForm();
MyDlg.MyTel = this.MyTel;
MyDlg.ShowDialog();
}
private void 业务资料管理BToolStripMenuItem_Click(object sender, EventArgs e)
{
ManualForm MyDlg = new ManualForm();
MyDlg.ShowDialog();
}
private void 出租房源管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
LeaseHouseForm MyDlg = new LeaseHouseForm();
MyDlg.MyTel = this.MyTel;
MyDlg.ShowDialog();
}
private void 求租客户管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
LeaseClientForm MyDlg = new LeaseClientForm();
MyDlg.MyTel = this.MyTel;
MyDlg.ShowDialog();
}
private void 广告发布管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
AdvertisementForm MyDlg = new AdvertisementForm();
MyDlg.ShowDialog();
}
private void 租售成交管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
ContractForm MyDlg = new ContractForm();
MyDlg.ShowDialog();
}
private void 经纪跟进管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
TraceForm MyDlg = new TraceForm();
MyDlg.ShowDialog();
}
private void 查询可售房源ToolStripMenuItem_Click(object sender, EventArgs e)
{
QuerySaleHouseForm MyDlg = new QuerySaleHouseForm();
MyDlg.MyCompany = this.MyCompany;
MyDlg.ShowDialog();
}
private void 查询求购客户ToolStripMenuItem_Click(object sender, EventArgs e)
{
QuerySaleClientForm MyDlg = new QuerySaleClientForm();
MyDlg.MyCompany = this.MyCompany;
MyDlg.ShowDialog();
}
private void 查询可租房源ToolStripMenuItem_Click(object sender, EventArgs e)
{
QueryLeaseHouseForm MyDlg = new QueryLeaseHouseForm();
MyDlg.MyCompany = this.MyCompany;
MyDlg.ShowDialog();
}
private void 查询求租客户ToolStripMenuItem_Click(object sender, EventArgs e)
{
QueryLeaseClientForm MyDlg = new QueryLeaseClientForm();
MyDlg.MyCompany = this.MyCompany;
MyDlg.ShowDialog();
}
private void 查询已售房源ToolStripMenuItem_Click(object sender, EventArgs e)
{
QuerySaleContractForm MyDlg = new QuerySaleContractForm();
MyDlg.MyCompany = this.MyCompany;
MyDlg.ShowDialog();
}
private void 查询已租房源ToolStripMenuItem_Click(object sender, EventArgs e)
{
QueryLeaseContractForm MyDlg = new QueryLeaseContractForm();
MyDlg.MyCompany = this.MyCompany;
MyDlg.ShowDialog();
}
private void 操作权限设置ToolStripMenuItem_Click(object sender, EventArgs e)
{
OperatorForm MyDlg = new OperatorForm();
MyDlg.ShowDialog();
}
private void 修改用户密码ToolStripMenuItem_Click(object sender, EventArgs e)
{
ChangeUserPasswordForm MyDlg = new ChangeUserPasswordForm();
MyDlg.用户名称TextBox.Text = this.MyOperator;
MyDlg.ShowDialog();
}
private void 系统帮助信息ToolStripMenuItem_Click(object sender, EventArgs e)
{
VersionForm MyDlg = new VersionForm();
MyDlg.label1.Text = this.MySlogan;
MyDlg.ShowDialog();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -