/// <summary>
        /// METHOD: InitialiseDisplay, a method which is used to display a new display
        /// </summary>
        /// <param name="pSource"></param>
        /// <param name="pArgs"></param>
        public void InitialiseDisplay(object pSource, InitialiseData pArgs)
        {
            // INSTANTIATE a new IDisplay as DisplayView
            // passing in the InitialiseData EventArgs data as parameters
            IDisplayView newDisplay = new DisplayView(pArgs._flipH, _execute, pArgs._resize,
                                                      pArgs._flipV, pArgs._rotateCW, pArgs._rotateACW, pArgs._save);

            // SUBSCRIBE the new display to the source object, cast as a IDisplayPublisher
            (pSource as IImageCollection).SubscribeDisplay((newDisplay as ISubscriber).OnImageEvent, pArgs._key);
            // CALL to the new display Loaded method
            newDisplay.Loaded();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// METHOD: DoubleClick, a method which is used to handle the double click of
        /// a thumbnail
        /// </summary>
        /// <param name="pSource"></param>
        /// <param name="pArgs"></param>
        public void DoubleClick(object pSource, EventArgs pArgs)
        {
            // INSTANTIATE an IImageData as the return value of the dictionary at the
            // key found in the source cast as an ICustomPictureBox
            IImageData i = RetrieveImageData((pSource as ICustomPictureBox).imgKey);
            // INSTANTIATE a new InitialiseData as a new InitialiseData
            // passing in the delegates found in the local IImageData variable
            InitialiseData args = new InitialiseData(i.FlipImageH, i.DisplaySize,
                                                     i.FlipImageV, i.RotateCW,
                                                     i.RotateACW, i.SaveImage, (pSource as ICustomPictureBox).imgKey);

            // CALL _newDisplay delegate, passing in this and the agrs
            _newDisplay(this, args);
        }