コード例 #1
0
        public VisorPrincipal()
        {
            InitializeComponent();

            this.buttonCancel.Enabled = false;

            m_ImageDialog = new ImageDialog();

            m_AddImageDelegate = new DelegateAddImage(this.AddImage);

            m_Controller          = new ThumbnailController();
            m_Controller.OnStart += new ThumbnailControllerEventHandler(m_Controller_OnStart);
            m_Controller.OnAdd   += new ThumbnailControllerEventHandler(m_Controller_OnAdd);
            m_Controller.OnEnd   += new ThumbnailControllerEventHandler(m_Controller_OnEnd);
        }
コード例 #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);
        }