//增加图片 private void AddPic(Image picImage, string title, string pageNo) { imageTitle imagetitle = new imageTitle() { image = picImage, title = title, pageNo = pageNo }; CJia.Controls.CJiaPicture pic = new Controls.CJiaPicture(); pic.Image = picImage; pic.Location = new System.Drawing.Point(1, 1); pic.Properties.Appearance.BackColor = System.Drawing.Color.Transparent; pic.Properties.Appearance.Options.UseBackColor = true; pic.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; pic.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; pic.Size = new System.Drawing.Size(160, 120); CJia.Controls.CJiaLabel label = new Controls.CJiaLabel(); label.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); label.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; label.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; label.Location = new System.Drawing.Point(1, 130); label.Size = new System.Drawing.Size(156, 16); label.Text = title + " " + pageNo; CJia.Controls.CJiaLabel line = new Controls.CJiaLabel(); line.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; line.LineVisible = true; line.Location = new System.Drawing.Point(1, 142); line.LookAndFeel.SkinName = "Office 2010 Blue"; line.LookAndFeel.UseDefaultLookAndFeel = false; line.Size = new System.Drawing.Size(160, 10); CJia.Controls.CJiaPanel panel = new Controls.CJiaPanel(); panel.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(237)))), ((int)(((byte)(241))))); panel.Appearance.Options.UseBackColor = true; panel.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; panel.Controls.Add(label); panel.Controls.Add(pic); panel.Controls.Add(line); panel.Location = new System.Drawing.Point(3, height + 3); panel.LookAndFeel.SkinName = "Office 2010 Silver"; panel.LookAndFeel.UseDefaultLookAndFeel = false; panel.Size = new System.Drawing.Size(140, 130); panel.Tag = imagetitle; panel.Enter += new System.EventHandler(panel_Enter); imagePanel.Controls.Add(panel); this.height += 130; }
public void addMessage(string mes, bool result) { foreach (Control control in this.pnMes.Controls) { control.Location = new Point(control.Location.X, control.Location.Y + 18); } CJia.Controls.CJiaLabel cJiaLabel = new Controls.CJiaLabel(); cJiaLabel.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); cJiaLabel.Location = new System.Drawing.Point(3, 3); cJiaLabel.Name = "cJiaLabel" + (this.pnMes.Controls.Count + 1); cJiaLabel.Text = mes; if (result) { cJiaLabel.ForeColor = Color.Black; } else { cJiaLabel.ForeColor = Color.Red; } this.pnMes.Controls.Add(cJiaLabel); }
//增加图片 private void AddPic(DataRow picData, Image picImage, string title, string pageNo, string subPage, int i) { NewimageTitle imagetitle = new NewimageTitle() { image = picImage, title = title, pageNo = pageNo, subPage = subPage, number = i, picData = picData }; CJia.Controls.CJiaPicture pic = new Controls.CJiaPicture(); pic.Image = picImage; pic.Location = new System.Drawing.Point(1, 1); pic.Properties.Appearance.BackColor = System.Drawing.Color.Transparent; pic.Properties.Appearance.Options.UseBackColor = true; pic.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; pic.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; pic.Size = new System.Drawing.Size(158, 120); CJia.Controls.CJiaLabel label = new Controls.CJiaLabel(); label.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); label.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; label.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; label.Location = new System.Drawing.Point(1, 122); label.Size = new System.Drawing.Size(156, 16); label.Name = picData["PICTURE_ID"].ToString(); label.Text = title + " " + pageNo + " " + subPage; if (picData["CHECK_STATUS"].ToString() == "103") { label.Appearance.ForeColor = Color.Black; } else if (picData["CHECK_STATUS"].ToString() == "101") { label.Appearance.ForeColor = Color.Green; } else { label.Appearance.ForeColor = Color.Red; } CJia.Controls.CJiaLabel line = new Controls.CJiaLabel(); line.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; line.LineVisible = true; line.Location = new System.Drawing.Point(1, 138); line.LookAndFeel.SkinName = "Office 2010 Blue"; line.LookAndFeel.UseDefaultLookAndFeel = false; line.Size = new System.Drawing.Size(160, 10); CJia.Controls.CJiaPanel panel = new Controls.CJiaPanel(); panel.Appearance.Options.UseBackColor = true; panel.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; panel.Controls.Add(pic); panel.Controls.Add(label); panel.Controls.Add(line); panel.Location = new System.Drawing.Point(3, height + 3); panel.LookAndFeel.SkinName = "Office 2010 Silver"; panel.LookAndFeel.UseDefaultLookAndFeel = false; panel.Size = new System.Drawing.Size(140, 140); panel.Tag = imagetitle; panel.Name = "panel" + i.ToString(); panel.Enter += new System.EventHandler(panel_Enter); imagePanel.Controls.Add(panel); this.height += 140; }