예제 #1
0
        public PictureView(PictureViewController pictureViewController, KeyInputHandler keyInputHandler)
        {
            InitializeComponent ();

              CurrentZoomFactor = 1.0;
              PictureViewController = pictureViewController;
              KeyInputHandler = keyInputHandler;

              PictureViewController.SetPictureForm (this);

              MouseWheel += OnMouseWheel;
              CurrentPicture.Paint += CurrentPictureOnPaint;
        }
        public void Start(string[] args)
        {
            if (args.Length == 0)
            {
                MessageBox.Show ("Picture Viewer must be called with arguments.");
                return;
            }

            var fileCache = new PictureCache ();
            fileCache.Initialize (args [0]);
            var pictureFormController = new PictureViewController (fileCache);
            var keyInputHandler = new KeyInputHandler (pictureFormController);

            Application.Run (new PictureView (pictureFormController, keyInputHandler));
        }