You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

1 month ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using ShenTun.PhotoGraph;
  11. namespace ShenTun.Camera.AForge.Tests
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. /**
  22. FrmCamera frm = new FrmCamera();
  23. frm.ShowDialog();
  24. * */
  25. string dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
  26. MessageBox.Show(dir);
  27. }
  28. private async void button2_Click(object sender, EventArgs e)
  29. {
  30. /**
  31. CameraClient ca = new CameraClient();
  32. await ca.ShowCameraAsync("1");
  33. * * */
  34. PhotoGraphMethods p = new PhotoGraphMethods();
  35. Request r = new Request()
  36. {
  37. asPhotoInterface = 1,
  38. asCapturesTotal = 100,
  39. asCapturesTimes = 100,
  40. asImageFormat = "jpeg",
  41. asIsAutoConnect=true,
  42. };
  43. var aa= await p.getPhotoGrap(r);
  44. }
  45. }
  46. }