コード例 #1
0
 public override void DrawChildren(IRenderer Renderer)
 {
     if (this.State == ButtonState.Pushed)
     {
         if (TextLabel != null && TextLabel.Visible)
         {
             TextLabel.Bounds.Location.Add(1);
             TextLabel.Draw(Renderer);
             TextLabel.Bounds.Location.Add(-1);
         }
         if (MyPicture != null && MyPicture.Visible)
         {
             MyPicture.Bounds.Location.Add(1);
             MyPicture.Draw(Renderer);
             MyPicture.Bounds.Location.Add(-1);
         }
     }
     else
     {
         if (TextLabel != null && TextLabel.Visible)
         {
             TextLabel.Draw(Renderer);
         }
         if (MyPicture != null && MyPicture.Visible)
         {
             MyPicture.Draw(Renderer);
         }
     }
 }
コード例 #2
0
        public Vkontakte(string login, string password)
        {
            this.login    = login;
            this.password = password;

            chrome  = new ChromeDriver();
            picture = new MyPicture(chrome, @"E:\Page");
        }
コード例 #3
0
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     if (CbPicture.Checked)
     {
         MyPicture.Filter = "(JPG, JPEG, PNG, PDF) | *.jpg; *.jpeg; *.pdf; *.png";
         if (MyPicture.ShowDialog() == DialogResult.OK)
         {
             B.IsPicturePress(MyPicture);
         }
         else
         {
         }
     }
 }
コード例 #4
0
        private async void button3_Click(object sender, EventArgs e)
        {
            using (picEntities db = new picEntities())
            {
                MyPicture pic = new MyPicture()
                {
                    FileName = filename, Data = ConvertImageToBinary(pictureBox1.Image)
                };

                db.MyPictures.Add(pic);
                await db.SaveChangesAsync();

                MessageBox.Show("you have been successfully saved", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #5
0
 /// <summary>
 /// 添加GIF图片控件到richtextbox
 /// </summary>
 /// <param name="gifID">gifID</param>
 /// <returns>返回gif控件</returns>
 public CSS.IM.Library.MyPicture addGifControl(string imageMD5, Image image)
 {
     /// pic = this.findPic(gifID.ToString());
     //if (pic == null)
     //{
         System.Random R = new Random();
         uint Index = (uint)R.Next(200, 2147483627);
      
         CSS.IM.Library.MyPicture pic = new MyPicture();
         pic.Index = Index;//图片非托管区标识
         pic.ImageMD5 = imageMD5;//图片MD5值
         pic.Image = image;//图片
         pic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;//自动大小
         pic.BackColor = this.BackColor;//背景色
         pic.Invalidate();//刷新图片
         this.panelGif.Controls.Add(pic);//向集合中添加图片
         this.gifs.add(pic);
     
     //}
     this.InsertMyControl(pic);
     this.Invalidate();
     return pic;
 }