protected void initDataPanel(string url, string title, string discription, string jpgPath, int newsEmotion, int newsPoint, Bitmap charBody, EventHandler enter)
        {
            //要素の取得
            this.url         = url;
            this.title       = title;
            this.discription = discription;;
            this.jpgPath     = jpgPath;

            //初期化
            //this.lblText    = new CusCtlLabel();
            this.lnkLbl     = new CusCtlLinkLabel();
            this.pic        = new CusCtlPictureBox();
            this.picChar    = new CusCtlPictureBox();
            this.lblEmotion = new CusCtlLabel();
            this.lblPoint   = new CusCtlLabel();
            this.btnUrlCopy = new System.Windows.Forms.PictureBox();
            this.btnWebJump = new System.Windows.Forms.PictureBox();
            this.btnTweet = new System.Windows.Forms.PictureBox();

            //
            // panel
            //
            this.BackColor = Color.Azure;
            //this.Controls.Add(this.lblText);
            this.Controls.Add(this.btnUrlCopy);
            this.Controls.Add(this.btnWebJump);
            this.Controls.Add(this.btnTweet);

            this.Controls.Add(this.lnkLbl);
            this.Controls.Add(this.pic);
            this.Controls.Add(this.lblPoint);
            this.Controls.Add(this.lblEmotion);
            this.Controls.Add(this.picChar);

            this.Location = new System.Drawing.Point(3, 3);
            this.Name = "panel";
            this.Size = new System.Drawing.Size(445, 60);
            this.TabIndex = 0;
            this.MouseEnter += new System.EventHandler(enter);

            //
            // lnkLbl
            //
            this.lnkLbl.ContextMenuStrip = cms;
            this.lnkLbl.Location = new System.Drawing.Point(85, 14);
            this.lnkLbl.Name = "lnkLbl";
            this.lnkLbl.Size = new System.Drawing.Size(290, 12);
            this.lnkLbl.TabIndex = 1;
            this.lnkLbl.TabStop = true;
            this.lnkLbl.Text = title;
            this.lnkLbl.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnlLbl_LinkClicked);
            this.lnkLbl.MouseEnter += new System.EventHandler(enter);

            //
            // pic
            //
            this.pic.Location = new System.Drawing.Point(380, 12);
            this.pic.Name = "pic";
            this.pic.Size = new System.Drawing.Size(65, 50);
            this.pic.TabIndex = 0;
            this.pic.TabStop = false;
            this.pic.Click += new System.EventHandler(this.pic_Click);
            this.pic.MouseEnter += new System.EventHandler(enter);

            try
            {
                //イメージ
                if (!jpgPath.Equals(""))
                {
                    this.pic.Image = new Bitmap(new Bitmap(jpgPath), new Size(65, 50));
                }
                else
                {
                    this.pic.Image = FctCreateFromResource.getResourceBitmap(LiplisDefine.TRANSE);
                }
            }
            catch
            {

            }

            //
            // picChar
            //
            //int wid = 50 * (lips.Width/lips.Height);
            this.picChar.Location = new System.Drawing.Point(3, 11);
            this.picChar.Name = "picChar";
            this.picChar.Size = new System.Drawing.Size(75, 75);
            this.picChar.TabIndex = 3;
            this.picChar.TabStop = false;
            this.picChar.Image = charBody;
            //
            // lblEmotion
            //
            this.lblEmotion.BackColor = Color.FromArgb(220, 229, 242, 247);
            this.lblEmotion.Location = new System.Drawing.Point(122, 40);
            this.lblEmotion.Name = "lblEmotion";
            this.lblEmotion.Size = new System.Drawing.Size(100, 15);
            this.lblEmotion.TabIndex = 4;
            this.lblEmotion.Text = getEmotion(newsEmotion, newsPoint);
            this.lblEmotion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // lblPoint
            //
            this.lblPoint.BackColor = Color.FromArgb(220, 229, 242, 247);
            this.lblPoint.Location = new System.Drawing.Point(80, 40);
            this.lblPoint.Name = "lblPoint";
            this.lblPoint.Size = new System.Drawing.Size(40, 15);
            this.lblPoint.TabIndex = 5;
            this.lblPoint.Text = newsPoint.ToString();
            this.lblPoint.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

            //スモールアイコンの初期化
            initSmallIcon();
        }
Esempio n. 2
0
        protected void initDataPanel(string url, string title, string discription, string jpgPath, int newsEmotion, int newsPoint, Bitmap charBody)
        {
            //要素の取得
            this.url         = url;
            this.title       = title;
            this.discription = discription;;
            this.jpgPath     = jpgPath;

            //初期化
            this.lblText    = new CusCtlLabel();
            this.lnkLbl     = new CusCtlLinkLabel();
            this.pic        = new CusCtlPictureBox();
            this.picChar    = new CusCtlPictureBox();
            this.lblEmotion = new CusCtlLabel();
            this.lblPoint   = new CusCtlLabel();

            //
            // panel
            //
            this.BackColor = Color.FromArgb(50,255,255,255);
            this.Controls.Add(this.lblText);
            this.Controls.Add(this.lnkLbl);
            this.Controls.Add(this.pic);
            this.Controls.Add(this.lblPoint);
            this.Controls.Add(this.lblEmotion);
            this.Controls.Add(this.picChar);
            this.Location = new System.Drawing.Point(3, 3);
            this.Name = "panel";
            this.Size = new System.Drawing.Size(590, 120);
            this.TabIndex = 0;
            this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

            //
            // lnkLbl
            //
            this.lnkLbl.ContextMenuStrip = cms;
            this.lnkLbl.Location = new System.Drawing.Point(148, 11);
            this.lnkLbl.Name = "lnkLbl";
            this.lnkLbl.Size = new System.Drawing.Size(333, 12);
            this.lnkLbl.TabIndex = 1;
            this.lnkLbl.TabStop = true;
            this.lnkLbl.Text = title;
            this.lnkLbl.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnlLbl_LinkClicked);

            //
            // lblText
            //
            this.lblText.ContextMenuStrip = cms;
            this.lblText.Location = new System.Drawing.Point(148, 23);
            this.lblText.Name = "lblText";
            this.lblText.Size = new System.Drawing.Size(333, 88);
            this.lblText.Text = discription;
            this.lblText.TabIndex = 2;
            this.lblText.Click += new System.EventHandler(this.lblText_Click);

            //
            // pic
            //
            this.pic.Location = new System.Drawing.Point(12, 11);
            this.pic.Name = "pic";
            this.pic.Size = new System.Drawing.Size(130, 100);
            this.pic.TabIndex = 0;
            this.pic.TabStop = false;
            this.pic.Click += new System.EventHandler(this.pic_Click);

            //イメージ
            if (!jpgPath.Equals(""))
            {
                this.pic.Image = new Bitmap (new Bitmap(jpgPath), new Size(130,100));
            }
            else
            {
                this.pic.Image = FctCreateFromResource.getResourceBitmap(LiplisDefine.TRANSE);
            }

            //
            // picChar
            //
            this.picChar.Location = new System.Drawing.Point(487, 11);
            this.picChar.Name = "picChar";
            this.picChar.Size = new System.Drawing.Size(100, 100);
            this.picChar.TabIndex = 3;
            this.picChar.TabStop = false;
            this.picChar.Image = charBody;
            //
            // lblEmotion
            //
            this.lblEmotion.BackColor = Color.FromArgb(220, 229, 242, 247);
            this.lblEmotion.Location = new System.Drawing.Point(487, 81);
            this.lblEmotion.Name = "lblEmotion";
            this.lblEmotion.Size = new System.Drawing.Size(100, 15);
            this.lblEmotion.TabIndex = 4;
            this.lblEmotion.Text = getEmotion(newsEmotion, newsPoint);
            this.lblEmotion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // lblPoint
            //
            this.lblPoint.BackColor = Color.FromArgb(220, 229, 242, 247);
            this.lblPoint.Location = new System.Drawing.Point(487, 96);
            this.lblPoint.Name = "lblPoint";
            this.lblPoint.Size = new System.Drawing.Size(100, 15);
            this.lblPoint.TabIndex = 5;
            this.lblPoint.Text = newsPoint.ToString();
            this.lblPoint.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
        }