AdjustExposureDialog.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 PaintDotNet.Base.SettingModel;
  11. using TUCamera;
  12. namespace PaintDotNet.ImageCollect.CameraComponent
  13. {
  14. internal class AdjustExposureDialog : FloatingToolForm
  15. {
  16. #region
  17. /// <summary>
  18. /// Required designer variable.
  19. /// </summary>
  20. private System.ComponentModel.IContainer components = null;
  21. /// <summary>
  22. /// Clean up any resources being used.
  23. /// </summary>
  24. /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  25. protected override void Dispose(bool disposing)
  26. {
  27. if (disposing && (components != null))
  28. {
  29. components.Dispose();
  30. }
  31. base.Dispose(disposing);
  32. }
  33. #region Windows Form Designer generated code
  34. /// <summary>
  35. /// Required method for Designer support - do not modify
  36. /// the contents of this method with the code editor.
  37. /// </summary>
  38. private void InitializeComponent()
  39. {
  40. this.SuspendLayout();
  41. //
  42. // AdjustExposureDialog
  43. //
  44. this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
  45. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  46. this.ClientSize = new System.Drawing.Size(645, 225);
  47. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  48. this.MaximizeBox = false;
  49. this.MinimizeBox = false;
  50. this.Name = "AdjustExposureDialog";
  51. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  52. this.Activated += new System.EventHandler(this.AdjustExposureDialog_Activated);
  53. this.Load += new System.EventHandler(this.AdjustExposureDialog_Load);
  54. this.ResumeLayout(false);
  55. }
  56. #endregion
  57. #endregion
  58. private CameraParamModel m_cameraParamModel = Startup.instance.cameraParamModel;
  59. private AdjustExposureControl m_control;
  60. public AdjustExposureDialog()
  61. {
  62. InitializeComponent();
  63. this.Text = PdnResources.GetString("Menu.timeofexposure.text");
  64. }
  65. private void AdjustExposureDialog_Load(object sender, EventArgs e)
  66. {
  67. m_control = new AdjustExposureControl(m_cameraParamModel, true);
  68. m_control.Location = new Point(5, 8);
  69. this.Controls.Add(m_control);
  70. this.Width = m_control.Width + 30;
  71. this.Height = m_control.Height + 50;
  72. }
  73. private void AdjustExposureDialog_Activated(object sender, EventArgs e)
  74. {
  75. m_cameraParamModel = Startup.instance.cameraParamModel;
  76. m_control.ReLoad(m_cameraParamModel, true);
  77. }
  78. }
  79. }