Beispiel #1
0
        private void capture_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(30);

            //CaptureImageTool capture = new CaptureImageTool();

            //if (capture.ShowDialog() == DialogResult.OK)
            {
                Image image = capture.Image;



                string imageID = FileIDCreator.GetNextFileID("abc");
                this.richTextBoxEx_send.InsertGIF(imageID, image);

                if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    image.Save(saveFileDialog1.FileName, ImageFormat.Bmp);
                }


                //添加图片到字典中
                imageDict.Add(imageID, Image.FromFile(saveFileDialog1.FileName));
            }

            if (!Visible)
            {
                Show();
            }
        }
Beispiel #2
0
        private void InsertImage_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "图片文件|*.jpg|所有文件|*.*";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string imageID = FileIDCreator.GetNextFileID("abc");
                this.richTextBoxEx_send.InsertGIF(imageID, Image.FromFile(openFileDialog1.FileName));


                //添加图片到字典中
                imageDict.Add(imageID, Image.FromFile(openFileDialog1.FileName));
            }
        }