Esempio n. 1
0
        public ImageDialogMain()//构造函数
        {
            InitializeComponent();



            m_ImageDialog = new ImageDialog();

            m_AddImageDelegate = new DelegateAddImage(this.AddImage);

            Controller          = new GetImageThumbnail();
            Controller.OnStart += new GetImageThumbnailEventHandler(m_Controller_OnStart);
            Controller.OnAdd   += new GetImageThumbnailEventHandler(m_Controller_OnAdd);
            Controller.OnEnd   += new GetImageThumbnailEventHandler(m_Controller_OnEnd);
        }
Esempio n. 2
0
        private void imageViewer_MouseClick(object sender, MouseEventArgs e)
        {
            if (m_ActiveImageViewer != null)
            {
                m_ActiveImageViewer.IsActive = false;
            }

            m_ActiveImageViewer          = (ImageViewer)sender;
            m_ActiveImageViewer.IsActive = true;

            if (m_ImageDialog.IsDisposed)
            {
                m_ImageDialog = new ImageDialog();
            }
            if (!m_ImageDialog.Visible)
            {
                m_ImageDialog.Show();
            }

            m_ImageDialog.SetImage(m_ActiveImageViewer.ImageLocation);
        }