示例#1
0
        public MainWindow()
        {
            AutoUpdater.ShowSkipButton = false;

            InitializeComponent();

            tabControlManager = new TabControlManager(ImageTabControl);
            sortingManager    = new SortingManager(tabControlManager);
            filesManager      = new FilesManager(sortingManager, tabControlManager);

            CheckForUpdates();
            SetupSlideshow();

            commands = new Dictionary <CommandKeys, ICommand>
            {
                {
                    new CommandKeys(Key.A),
                    new ToggleDisplayChannelCommand(ToggleDisplayChannel, Channels.Alpha, tabControlManager.CanExcectute)
                },
                {
                    new CommandKeys(Key.R),
                    new ToggleDisplayChannelCommand(ToggleDisplayChannel, Channels.Red, tabControlManager.CanExcectute)
                },
                {
                    new CommandKeys(Key.G),
                    new ToggleDisplayChannelCommand(ToggleDisplayChannel, Channels.Green, tabControlManager.CanExcectute)
                },
                {
                    new CommandKeys(Key.B),
                    new ToggleDisplayChannelCommand(ToggleDisplayChannel, Channels.Blue, tabControlManager.CanExcectute)
                },
                { new CommandKeys(Key.F), new Command(ResetView, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.T), new Command(TileImage, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Space), new Command(NextImage, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Delete), new Command(DeleteImage, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.D, Key.LeftCtrl), new Command(DuplicateTab, tabControlManager.CanExcectute) },
                {
                    new CommandKeys(Key.W, Key.LeftCtrl),
                    new Command(tabControlManager.CloseSelectedTab, tabControlManager.CanExcectute)
                },
                { new CommandKeys(Key.S, Key.LeftCtrl), new Command(ChannelsMontage, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.S), new Command(ToggleSlideshow, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Right, Key.LeftCtrl), new Command(NextTab, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Left, Key.LeftCtrl), new Command(PreviousTab, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Right), new Command(NextImage, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Left), new Command(PreviousImage, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Add), new Command(LowerMip, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Subtract), new Command(HigherMip, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Space, Key.LeftCtrl), new Command(ToggleBars, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.V, Key.LeftCtrl), new Command(Paste) },
                { new CommandKeys(Key.C, Key.LeftCtrl), new Command(Copy, tabControlManager.CanExcectute) },
                { new CommandKeys(Key.Escape), new Command(Close) },
                { new CommandKeys(Key.N, Key.LeftCtrl), new Command(AddNewTab) },
            };
        }
示例#2
0
 public FilesManager(SortingManager sortingManager, TabControlManager tabControlManager)
 {
     Manager           = sortingManager;
     TabControlManager = tabControlManager;
 }