Form1.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ////////////////////////////////////////////////////////////////////////////
  2. // Copyright : Robert Hartman
  3. // Date: 2/25/2006
  4. //
  5. // Email : hart_dev@yahoo.com
  6. //
  7. // This file may be redistributed unmodified by any means PROVIDING it is
  8. // not sold for profit without the authors written consent, and
  9. // providing that this notice and the authors name is included.
  10. //
  11. // This file is provided 'as is' with no expressed or implied warranty.
  12. // The author accepts no liability for damages caused by the use of this software.
  13. ////////////////////////////////////////////////////////////////////////////
  14. using System;
  15. using System.Collections.Generic;
  16. using System.ComponentModel;
  17. using System.Data;
  18. using System.Drawing;
  19. using System.Text;
  20. using System.Windows.Forms;
  21. namespace TurnThePage
  22. {
  23. public partial class Form1 : Form
  24. {
  25. public Form1()
  26. {
  27. InitializeComponent();
  28. string current = Environment.CurrentDirectory;
  29. pageControl.HeightAdjustment = (int)(.15 * this.ClientRectangle.Height);
  30. pageControl.LoadSamples();
  31. }
  32. //ǰһҳ
  33. private void ForwardButton_Click(object sender, EventArgs e)
  34. {
  35. // Animate Right Page!
  36. pageControl.animateRightPageTurn();
  37. }
  38. //ÏÂÒ»Ò³
  39. private void PrevButton_Click(object sender, EventArgs e)
  40. {
  41. // Animate Left Page!
  42. pageControl.animateLeftPageTurn();
  43. }
  44. private void trackBar1_Scroll(object sender, EventArgs e)
  45. {
  46. int speed = 10;
  47. speed = 10 + (int)(985*((float)this.trackBar1.Value / (float)trackBar1.Maximum));
  48. pageControl.TickSpeed = speed;
  49. }
  50. }
  51. }