Пример #1
0
        //// 小图焦点改变
        //private void gvSmallPicture_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        //{
        //    if(this.SelectSmailPicture != null)
        //    {
        //        foreach(Control con in this.imagePanel.Controls)
        //        {
        //            imageTitle it = con.Tag as imageTitle;
        //            if(it.pageNo == this.SelectSmailPicture["PAGE_NO"].ToString() && it.subPage == this.SelectSmailPicture["SUB_PAGE"].ToString())
        //            {
        //                con.Focus();
        //            }
        //        }
        //    }
        //}


        private void gvSmallPicture_Click(object sender, EventArgs e)
        {
            if (this.SelectSmailPicture != null)
            {
                foreach (Control con in this.imagePanel.Controls)
                {
                    NewimageTitle it = con.Tag as NewimageTitle;
                    if (it.pageNo == this.SelectSmailPicture["PAGE_NO"].ToString() && it.subPage == this.SelectSmailPicture["SUB_PAGE"].ToString())
                    {
                        con.Focus();
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 一项该panel
        /// </summary>
        /// <param name="panel"></param>
        private void movePanel(CJia.Controls.CJiaPanel panel)
        {
            panel.Focus();
            if (imagePanel.Controls != null && imagePanel.Controls.Count > 0)
            {
                for (int i = 0; i < imagePanel.Controls.Count; i++)
                {
                    if (imagePanel.Controls[i] is CJia.Controls.CJiaPanel)
                    {
                        imagePanel.Controls[i].BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(237)))), ((int)(((byte)(241)))));
                    }
                }
            }
            panel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
            NewimageTitle imagetitle = panel.Tag as NewimageTitle;

            this.selectPanelNumber = imagetitle.number;
            this.SelectPicData     = imagetitle.picData;
            this.picDA.Image       = imagetitle.image;
            if (imagetitle.picData["CHECK_STATUS"].ToString() == "103")
            {
                this.txtCheckStatusName.ForeColor = Color.Black;
            }
            else if (imagetitle.picData["CHECK_STATUS"].ToString() == "101")
            {
                this.txtCheckStatusName.ForeColor = Color.Green;
            }
            else
            {
                this.txtCheckStatusName.ForeColor = Color.Red;
            }
            this.txtPageNo.Text          = imagetitle.pageNo;
            this.txtProName.Text         = imagetitle.title;
            this.txtCheckStatusName.Text = imagetitle.picData["CHECK_STATUS_NAME"].ToString();
            this.txtSubPage.Text         = imagetitle.subPage;
            //this.labTitle.Text = imagetitle.title;
            //this.labPageNo.Text = imagetitle.pageNo;
        }
Пример #3
0
        //增加图片
        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;
        }