Ejemplo n.º 1
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);
 }
Ejemplo 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 );
 }