コード例 #1
0
        public void Dispose()
        {
            Dispose(true);
            _currentViewModel1 = null;
            _currentViewModel2 = null;
            _currentViewModel3 = null;
            _currentViewModel4 = null;
            _currentViewModel5 = null;
            _currentViewModel6 = null;
            _currentViewModel7 = null;
            _currentViewModel8 = null;
            _currentViewModel9 = null;

            _aggregator.GetEvent <HideToolbarEvent>().Unsubscribe(_subscriptionTokens[typeof(HideToolbarEvent)]);
            _subscriptionTokens.Remove(typeof(HideToolbarEvent));
            _aggregator.GetEvent <DisposeEvent>().Unsubscribe(_subscriptionTokens[typeof(DisposeEvent)]);
            _subscriptionTokens.Remove(typeof(DisposeEvent));
            _aggregator.GetEvent <SendPixelInformationViewEvent>().Unsubscribe(_subscriptionTokens[typeof(SendPixelInformationViewEvent)]);
            _subscriptionTokens.Remove(typeof(SendPixelInformationViewEvent));
            _aggregator.GetEvent <DisplayImage>().Unsubscribe(_subscriptionTokens[typeof(DisplayImage)]);
            _subscriptionTokens.Remove(typeof(DisplayImage));
            _aggregator.GetEvent <GridStatusEvent>().Unsubscribe(_subscriptionTokens[typeof(GridStatusEvent)]);
            _subscriptionTokens.Remove(typeof(GridStatusEvent));

            GC.SuppressFinalize(this);
        }
コード例 #2
0
        private void GetImagePresentersFor2x2()
        {
            switch (_imageCounter)
            {
            case 1:
                CurrentViewModel1 = new ImagePresenterViewModel(_imageList, 1, Tool, _maxWindows);
                break;

            case 2:
                CurrentViewModel2 = new ImagePresenterViewModel(_imageList, 2, Tool, _maxWindows);
                break;

            case 3:
                CurrentViewModel3 = new ImagePresenterViewModel(_imageList, 3, Tool, _maxWindows);
                break;

            case 4:
                CurrentViewModel4 = new ImagePresenterViewModel(_imageList, 4, Tool, _maxWindows);
                break;

            default:
                _imageCounter = 1;
                GetImagePresentersFor2x2();
                break;
            }
        }
コード例 #3
0
        private void GetImagePresentersFor3x3()
        {
            switch (_imageCounter)
            {
            case 1:
                CurrentViewModel1 = new ImagePresenterViewModel(_imageList, 1, Tool, _maxWindows);
                break;

            case 2:
                CurrentViewModel2 = new ImagePresenterViewModel(_imageList, 2, Tool, _maxWindows);
                break;

            case 3:
                CurrentViewModel3 = new ImagePresenterViewModel(_imageList, 3, Tool, _maxWindows);
                break;

            case 4:
                CurrentViewModel4 = new ImagePresenterViewModel(_imageList, 4, Tool, _maxWindows);
                break;

            case 5:
                CurrentViewModel5 = new ImagePresenterViewModel(_imageList, 5, Tool, _maxWindows);
                break;

            case 6:
                CurrentViewModel6 = new ImagePresenterViewModel(_imageList, 6, Tool, _maxWindows);
                break;

            case 7:
                CurrentViewModel7 = new ImagePresenterViewModel(_imageList, 7, Tool, _maxWindows);
                break;

            case 8:
                CurrentViewModel8 = new ImagePresenterViewModel(_imageList, 8, Tool, _maxWindows);
                break;

            case 9:
                CurrentViewModel9 = new ImagePresenterViewModel(_imageList, 9, Tool, _maxWindows);
                break;

            default:
                _imageCounter = 1;
                GetImagePresentersFor3x3();
                break;
            }
        }
コード例 #4
0
 private void GetImagePresentersFor1x1()
 {
     CurrentViewModel1 = new ImagePresenterViewModel(_imageList, 1, Tool, _maxWindows);
     _imageCounter     = 1;
 }