示例#1
0
文件: Form1.cs 项目: Texl/BeadSurge
        private void importToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (pal != null)
            {
                pal.Close();

            }
            if (ofdImage.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                try
                {
                    Bitmap test = new Bitmap(ofdImage.FileName);
                    m_Import = new Import(test);
                    m_Import.ImagePicked += Picked;
                    m_Import.Show();
                }
                catch
                {
                    MessageBox.Show(this, "Not a Valid Picture", "I'm not good with computer");
                }
            }
        }
示例#2
0
文件: Form1.cs 项目: Texl/BeadSurge
 private void importFromClipboardToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Clipboard.ContainsImage())
     {
         m_Import = new Import((Bitmap)Clipboard.GetImage());
         m_Import.ImagePicked += Picked;
         m_Import.Show();
     }
 }