AdjustWhiteBalanceDialog.cs 3.0 KB

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