Esempio n. 1
0
        /// <summary>
        /// Erzeugt as Hauptfenster.
        /// </summary>
        /// <param name="profile">Die zu verwendene lokale DVB.NET Hardware.</param>
        /// <param name="mode">Operationsmodus der Anwendung.</param>
        /// <param name="args">Parameter zum Operationsmodus der Anwendung.</param>
        public ViewerMain(Profile profile, StartupModes mode, params string[] args)
        {
            // Remember
            m_Arguments = args;
            Profile     = profile;
            m_Mode      = mode;

            // Create components
            InitializeComponent();

            // Attach to viewer
            IViewerSite viewer = (IViewerSite)theViewer;

            // Register additional keys - to be kept we must do this before SetSite fixes the map
            viewer.SetKeyHandler(Keys.J, ProcessFullScreen);
            viewer.SetKeyHandler(Keys.End, Close);

            // Connect viewer control to configuration
            theViewer.SetSite(this);

            // Prepare to show
            SetBounds();
        }
Esempio n. 2
0
 /// <summary>
 /// Konfiguriert die Tastatur für das Abspielen einer Datei.
 /// </summary>
 /// <param name="viewer">Die zugehörige Anzeigeeinheit.</param>
 /// <param name="replay">Die Komponente, die für das Auslesen der Datei zuständig ist.</param>
 public static void RegisterReplayKeys( IViewerSite viewer, IFileReplay replay )
 {
     // Register all keys to move in file
     viewer.SetKeyHandler( Keys.Subtract, () => replay.MovePosition( -0.001 ) );
     viewer.SetKeyHandler( Keys.PageDown, () => replay.MovePosition( -0.01 ) );
     viewer.SetKeyHandler( Keys.PageUp, () => replay.MovePosition( +0.01 ) );
     viewer.SetKeyHandler( (Keys) 189, () => replay.MovePosition( -0.001 ) );
     viewer.SetKeyHandler( (Keys) 187, () => replay.MovePosition( +0.001 ) );
     viewer.SetKeyHandler( Keys.Add, () => replay.MovePosition( +0.001 ) );
     viewer.SetKeyHandler( Keys.F3, () => replay.MovePosition( 0 ) );
     viewer.SetKeyHandler( Keys.D0, () => replay.Position = 0.0 );
     viewer.SetKeyHandler( Keys.D1, () => replay.Position = 0.1 );
     viewer.SetKeyHandler( Keys.D2, () => replay.Position = 0.2 );
     viewer.SetKeyHandler( Keys.D3, () => replay.Position = 0.3 );
     viewer.SetKeyHandler( Keys.D4, () => replay.Position = 0.4 );
     viewer.SetKeyHandler( Keys.D5, () => replay.Position = 0.5 );
     viewer.SetKeyHandler( Keys.D6, () => replay.Position = 0.6 );
     viewer.SetKeyHandler( Keys.D7, () => replay.Position = 0.7 );
     viewer.SetKeyHandler( Keys.D8, () => replay.Position = 0.8 );
     viewer.SetKeyHandler( Keys.D9, () => replay.Position = 0.9 );
 }
Esempio n. 3
0
 /// <summary>
 /// Konfiguriert die Tastatur für das Abspielen einer Datei.
 /// </summary>
 /// <param name="viewer">Die zugehörige Anzeigeeinheit.</param>
 /// <param name="replay">Die Komponente, die für das Auslesen der Datei zuständig ist.</param>
 public static void RegisterReplayKeys(IViewerSite viewer, IFileReplay replay)
 {
     // Register all keys to move in file
     viewer.SetKeyHandler(Keys.Subtract, () => replay.MovePosition(-0.001));
     viewer.SetKeyHandler(Keys.PageDown, () => replay.MovePosition(-0.01));
     viewer.SetKeyHandler(Keys.PageUp, () => replay.MovePosition(+0.01));
     viewer.SetKeyHandler((Keys)189, () => replay.MovePosition(-0.001));
     viewer.SetKeyHandler((Keys)187, () => replay.MovePosition(+0.001));
     viewer.SetKeyHandler(Keys.Add, () => replay.MovePosition(+0.001));
     viewer.SetKeyHandler(Keys.F3, () => replay.MovePosition(0));
     viewer.SetKeyHandler(Keys.D0, () => replay.Position = 0.0);
     viewer.SetKeyHandler(Keys.D1, () => replay.Position = 0.1);
     viewer.SetKeyHandler(Keys.D2, () => replay.Position = 0.2);
     viewer.SetKeyHandler(Keys.D3, () => replay.Position = 0.3);
     viewer.SetKeyHandler(Keys.D4, () => replay.Position = 0.4);
     viewer.SetKeyHandler(Keys.D5, () => replay.Position = 0.5);
     viewer.SetKeyHandler(Keys.D6, () => replay.Position = 0.6);
     viewer.SetKeyHandler(Keys.D7, () => replay.Position = 0.7);
     viewer.SetKeyHandler(Keys.D8, () => replay.Position = 0.8);
     viewer.SetKeyHandler(Keys.D9, () => replay.Position = 0.9);
 }