⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainform.cs

📁 vs2005+sql server2005编写的小区物业管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
                this.分配用户权限ToolStripSeparator.Visible = false;
                this.分配用户权限ToolStripSeparator.Visible = false;
            }
            if ((int)MyTable.Rows[0]["系统管理之小区信息设置"] == 0)
            {
                this.小区信息设置ToolStripMenuItem.Visible = false;
                this.小区信息设置ToolStripSeparator.Visible = false;
                this.小区信息设置ToolStripSeparator.Visible = false;
            }
            if (MyConnection.State == ConnectionState.Open)
            {
                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)
        {
            CommunityForm MyDlg = new CommunityForm();
            MyDlg.ShowDialog();
            StringBuilder MyTempPath = new StringBuilder(this.MyBgPhotoShow);
            this.GetCommunityInformation();
            //生成系统背景图像
            if (!System.IO.File.Exists(MyBgPhotoShow))
            {
                Image MyImage = new Bitmap(MyBgPhoto, true);
                int PosX = 10;
                int PosY = MyImage.Height/2+70 ;
                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.Cyan)), 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.White), 5, 10);
                MyGraphics.DrawString("服务电话:" + MyTel, new Font("宋体", 10, FontStyle.Regular), new SolidBrush(Color.White), 5, 30);
                MyGraphics.DrawString("公司网站:" + MyWeb, new Font("宋体", 10, FontStyle.Regular), new SolidBrush(Color.White), 5, 50);
                MyImage.Save(MyBgPhotoShow, System.Drawing.Imaging.ImageFormat.Jpeg);
            }
            this.BackgroundImage = new Bitmap(this.MyBgPhotoShow, true);
            this.Text = MySlogan;
            this.Icon = new Icon(this.MyIcon);
        }
        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();
        }
        private void 业主登记管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OwnerForm MyDlg = new OwnerForm();
            MyDlg.ShowDialog();
        }
        private void 业主迁出管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MoveForm MyDlg = new MoveForm();
            MyDlg.ShowDialog();
        }
        private void 楼栋信息管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BuildingForm MyDlg = new BuildingForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 公共财产管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CommonPropertyForm MyDlg = new CommonPropertyForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 服务投诉管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ComplainForm MyDlg = new ComplainForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 业主维修管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OwnerRepairForm MyDlg = new OwnerRepairForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 公共维修管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CommonRepairForm MyDlg = new CommonRepairForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 车位使用管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StationForm MyDlg = new StationForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 突发事件管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EventForm MyDlg = new EventForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 水电气费登记ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GasRegisterForm MyDlg = new GasRegisterForm();
            MyDlg.ShowDialog();
        }
        private void 水电气费查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GasQueryForm MyDlg = new GasQueryForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 水电气费交纳ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GasPaymentForm MyDlg = new GasPaymentForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.MyOperator = this.MyOperator;
            MyDlg.ShowDialog();
        }
        private void 物管费用登记ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ManageRegisterForm MyDlg = new ManageRegisterForm();
            MyDlg.ShowDialog();
        }
        private void 物管费用查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ManageQueryForm MyDlg = new ManageQueryForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 物管费用交纳ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ManagePaymentForm MyDlg = new ManagePaymentForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.MyOperator = this.MyOperator;
            MyDlg.ShowDialog();
        }
        private void 其他费用交纳ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OtherPaymentForm MyDlg = new OtherPaymentForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.MyOperator = this.MyOperator;
            MyDlg.ShowDialog();
        }
        private void 业主统计报表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportOwnerForm MyDlg = new ReportOwnerForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 投诉统计报表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportComplainForm MyDlg = new ReportComplainForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 业主维修报表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportOwnerRepairForm MyDlg = new ReportOwnerRepairForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 公共维修报表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportCommonRepairForm MyDlg = new ReportCommonRepairForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
        private void 收入统计报表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportChargeForm MyDlg = new ReportChargeForm();
            MyDlg.MyCommunity = this.MyCommunity;
            MyDlg.ShowDialog();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -