Ejemplo n.º 1
0
 private void CreateShortcuts()
 {
     binds = new ManualAsyncBindCollector
     {
         shortcutManager.Bind("reader.next-page", s => new ManualAsyncBinder(s, NextPageAsync)),
         shortcutManager.Bind("reader.previous-page", s => new ManualAsyncBinder(s, PreviousPageAsync))
     };
 }
Ejemplo n.º 2
0
 private void CreateShortcuts()
 {
     binds = new ManualBindCollector
     {
         shortcutManager.Bind("reader.fit-vertically", s => new ManualBinder(s, FitVertically)),
         shortcutManager.Bind("reader.fit-horizonally", s => new ManualBinder(s, FitHorizontally)),
         shortcutManager.Bind("reader.fit-original", s => new ManualBinder(s, FitOriginal)),
     };
 }
Ejemplo n.º 3
0
        private void CreateShortcuts()
        {
            var closeShortcut = new Shortcut("Close Application", "Saves everything and closes the application. Never displays a dialog.");

            shortcutManager.Add("application.close", closeShortcut, new ShortcutBinding(Key.Escape));

            // reader shortcuts
            shortcutManager.Add(
                "reader.next-page", new Shortcut(
                    "Next Page",
                    "Navigates to the next page in the reader if there is one."),
                new ShortcutBinding(Key.D),
                new ShortcutBinding(Key.Right));

            shortcutManager.Add(
                "reader.previous-page", new Shortcut(
                    "Previous Page",
                    "Navigates to the previous page in the reader if there is one."),
                new ShortcutBinding(Key.A),
                new ShortcutBinding(Key.Left));

            shortcutManager.Add(
                "reader.fit-vertically",
                new Shortcut(
                    "Fit Vertically",
                    "Resizes the page to fill the vertical space completely."),
                new ShortcutBinding(Key.V));

            shortcutManager.Add(
                "reader.fit-horizonally",
                new Shortcut(
                    "Fit Horizontally",
                    "Resizes the page to fill the horizontal space completely."),
                new ShortcutBinding(Key.H));

            shortcutManager.Add(
                "reader.fit-original",
                new Shortcut(
                    "Original Size",
                    "Shows the page in its original size."),
                new ShortcutBinding(Key.B));



            applicationCloseBinding = shortcutManager.Bind("application.close",
                                                           s => new ManualBinder(s, () => TryClose()));
        }