protected override bool ExecuteCommand(int cmd)
        {
            ThumbnailViewerCameraCommands command = (ThumbnailViewerCameraCommands)cmd;

            switch (command)
            {
            case ThumbnailViewerCameraCommands.RenameSelected:
                if (selectedThumbnail != null)
                {
                    selectedThumbnail.StartRenaming();
                }
                break;

            case ThumbnailViewerCameraCommands.LaunchSelected:
                CameraTypeManager.LoadCamera(selectedThumbnail.Summary, -1);
                break;

            case ThumbnailViewerCameraCommands.Refresh:
                refreshImages = true;
                CameraTypeManager.StartDiscoveringCameras();
                this.Focus();
                break;

            default:
                return(base.ExecuteCommand(cmd));
            }

            return(true);
        }
        private void Thumbnail_DeleteCamera(object sender, EventArgs e)
        {
            // Delete camera in prefs (blurbs).
            // Should be enough to remove the thumbnail at next discovery heart beat.
            ThumbnailCamera thumbnail = sender as ThumbnailCamera;

            CameraTypeManager.ForgetCamera(thumbnail.Summary);

            refreshImages = true;
            CameraTypeManager.StartDiscoveringCameras();
        }
Example #3
0
        private void SwitchContent(ThumbnailViewerContent newContent)
        {
            if (viewer != null && currentContent == newContent)
            {
                return;
            }

            ClearContent();
            this.splitMain.Panel2.Controls.Clear();

            switch (newContent)
            {
            case ThumbnailViewerContent.Files:
            {
                viewerFiles.UpdateThumbnailsSize(sizeSelector.SelectedSize);
                viewer = viewerFiles;
                break;
            }

            case ThumbnailViewerContent.Shortcuts:
            {
                viewerShortcuts.UpdateThumbnailsSize(sizeSelector.SelectedSize);
                viewer = viewerShortcuts;
                break;
            }

            case ThumbnailViewerContent.Cameras:
            {
                CameraTypeManager.StartDiscoveringCameras();
                viewerCameras.UpdateThumbnailsSize(sizeSelector.SelectedSize);
                viewer = viewerCameras;
                break;
            }
            }

            this.splitMain.Panel2.Controls.Add(viewer);
            viewer.BringToFront();
            currentContent = newContent;
        }
Example #4
0
 private void ThumbnailViewerContainer_Load(object sender, EventArgs e)
 {
     CameraTypeManager.StartDiscoveringCameras();
 }
 public void Unhide()
 {
     refreshImages = true;
     CameraTypeManager.StartDiscoveringCameras();
     this.Focus();
 }
 public void BeforeSwitch()
 {
     CameraTypeManager.StartDiscoveringCameras();
     refreshImages = true;
 }