Пример #1
0
 public AdEdit(string ad_id)
 {
     InitializeComponent();
     GlobalData.InitForm(this);
     this.ad_id              = ad_id;
     ad                      = bll.Select(ad_id);
     txt_ad_text.Text        = ad.ad_text;
     txt_name.Text           = ad.ad_name;
     txt_goods_nos.Text      = ad.goods_ids;
     pnlimgA.Text            = ad.title_img;
     pnlimgA.BackgroundImage = bllg.getImage(AppSetting.imgsvr + ad.title_img);
     string[] arr = ad.detail_img.Split(',', ',');
     if (arr.Length >= 1)
     {
         pnlimgC1.Text            = arr[0];
         pnlimgC1.BackgroundImage = bllg.getImage(AppSetting.imgsvr + arr[0]);
         string url = AppSetting.imgsvr + arr[0];
     }
     if (arr.Length >= 2)
     {
         pnlimgC2.Text            = arr[1];
         pnlimgC2.BackgroundImage = bllg.getImage(AppSetting.imgsvr + arr[1]);
     }
     if (arr.Length >= 3)
     {
         pnlimgC3.Text            = arr[2];
         pnlimgC3.BackgroundImage = bllg.getImage(AppSetting.imgsvr + arr[2]);
     }
     if (arr.Length >= 4)
     {
         pnlimgC4.Text            = arr[3];
         pnlimgC4.BackgroundImage = bllg.getImage(AppSetting.imgsvr + arr[3]);
     }
     if (arr.Length >= 5)
     {
         pnlimgC5.Text            = arr[4];
         pnlimgC5.BackgroundImage = bllg.getImage(AppSetting.imgsvr + arr[4]);
     }
     if (arr.Length >= 6)
     {
         pnlimgC6.Text            = arr[5];
         pnlimgC6.BackgroundImage = bllg.getImage(AppSetting.imgsvr + arr[5]);
     }
 }
Пример #2
0
        private void pnltop_MouseDown(object sender, MouseEventArgs e)
        {
            try
            {
                System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                //

                if (rec1.Contains(new Point(e.X, e.Y)))
                {
                    pnlIndex = 1;
                    goods基础信息设置.BringToFront();
                }
                else if (rec2.Contains(new Point(e.X, e.Y)))
                {
                    pnlIndex = 2;
                    if (goods上传图片.pnlimgA.BackgroundImage == null)
                    {
                        goods上传图片.pnlimgA.BackgroundImage = bll.getImage(small_img_full_url);
                    }
                    if (large_img_full_url != "")
                    {
                        string[] arr = large_img_full_url.Split(',');
                        if (goods上传图片.pnlimgB1.BackgroundImage == null && arr.Length >= 1)
                        {
                            goods上传图片.pnlimgB1.BackgroundImage = bll.getImage(arr[0]);
                        }
                        if (goods上传图片.pnlimgB2.BackgroundImage == null && arr.Length >= 2)
                        {
                            goods上传图片.pnlimgB2.BackgroundImage = bll.getImage(arr[1]);
                        }
                        if (goods上传图片.pnlimgB3.BackgroundImage == null && arr.Length >= 3)
                        {
                            goods上传图片.pnlimgB3.BackgroundImage = bll.getImage(arr[2]);
                        }
                    }
                    if (detail_img_full_url != "")
                    {
                        string[] arr = detail_img_full_url.Split(',');
                        if (goods上传图片.pnlimgC1.BackgroundImage == null && arr.Length >= 1)
                        {
                            goods上传图片.pnlimgC1.BackgroundImage = bll.getImage(arr[0]);
                        }
                        if (goods上传图片.pnlimgC2.BackgroundImage == null && arr.Length >= 2)
                        {
                            goods上传图片.pnlimgC2.BackgroundImage = bll.getImage(arr[1]);
                        }
                        if (goods上传图片.pnlimgC3.BackgroundImage == null && arr.Length >= 3)
                        {
                            goods上传图片.pnlimgC3.BackgroundImage = bll.getImage(arr[2]);
                        }
                        if (goods上传图片.pnlimgC4.BackgroundImage == null && arr.Length >= 4)
                        {
                            goods上传图片.pnlimgC4.BackgroundImage = bll.getImage(arr[3]);
                        }
                        if (goods上传图片.pnlimgC5.BackgroundImage == null && arr.Length >= 5)
                        {
                            goods上传图片.pnlimgC5.BackgroundImage = bll.getImage(arr[4]);
                        }
                        if (goods上传图片.pnlimgC6.BackgroundImage == null && arr.Length >= 6)
                        {
                            goods上传图片.pnlimgC6.BackgroundImage = bll.getImage(arr[5]);
                        }
                    }

                    goods上传图片.BringToFront();
                }
                else if (rec3.Contains(new Point(e.X, e.Y)))
                {
                    pnlIndex = 3;
                    goods属性组定义.BringToFront();
                }

                pnltop.Refresh();
            }
            catch (Exception ex)
            {
                Program.frmMsg(ex.Message);
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = Cursors.Default;
            }
        }