選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

49 行
1.2 KiB

  1. //
  2. // The Pimp The Pathetic Image Manipulation Program
  3. // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org>
  4. // All Rights Reserved
  5. //
  6. // $Id$
  7. //
  8. // This library is free software. It comes without any warranty, to
  9. // the extent permitted by applicable law. You can redistribute it
  10. // and/or modify it under the terms of the Do What The Fuck You Want
  11. // To Public License, Version 2, as published by Sam Hocevar. See
  12. // http://sam.zoy.org/wtfpl/COPYING for more details.
  13. //
  14. using System;
  15. using Gtk;
  16. namespace ThePimp
  17. {
  18. public partial class NewFile : Gtk.Dialog
  19. {
  20. public NewFile()
  21. {
  22. this.Build();
  23. }
  24. public string GetChoice()
  25. {
  26. ResponseType rsp = (ResponseType)Run();
  27. Hide();
  28. if(rsp != ResponseType.Ok)
  29. return null;
  30. string type = "random";
  31. switch(combobox1.Active)
  32. {
  33. case 0:
  34. type = "random";
  35. break;
  36. case 1:
  37. type = "bayer";
  38. break;
  39. }
  40. return type + ":" + entry1.Text + "x" + entry2.Text;
  41. }
  42. }
  43. }