Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

42 rader
1.0 KiB

  1. // MainWindow.cs created with MonoDevelop
  2. // User: sam at 10:31 AM 9/2/2008
  3. //
  4. // To change standard headers go to Edit->Preferences->Coding->Standard Headers
  5. //
  6. using System;
  7. using Gtk;
  8. using Pipi;
  9. using ThePimp;
  10. public partial class MainWindow: Gtk.Window
  11. {
  12. public MainWindow (): base (Gtk.WindowType.Toplevel)
  13. {
  14. Build ();
  15. Title += " v" + Libpipi.getVersion();
  16. }
  17. protected void OnDeleteEvent (object sender, DeleteEventArgs a)
  18. {
  19. Application.Quit ();
  20. a.RetVal = true;
  21. }
  22. protected virtual void OnOpenActionActivated (object sender, System.EventArgs e)
  23. {
  24. ThePimp.OpenFile open = new ThePimp.OpenFile();
  25. Pipi.Picture p = open.Load();
  26. open.Destroy();
  27. if(p != null)
  28. {
  29. Title += " image " + p.Width + "x" + p.Height;
  30. scrolledwindow1.Add(new PictureView(p));
  31. }
  32. }
  33. protected virtual void OnQuitActionActivated (object sender, System.EventArgs e)
  34. {
  35. Application.Quit ();
  36. }
  37. }