AdjustWhiteBalanceDialog.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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
  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.components = new System.ComponentModel.Container();
  40. this.timer1 = new System.Windows.Forms.Timer(this.components);
  41. this.SuspendLayout();
  42. //
  43. // timer1
  44. //
  45. this.timer1.Enabled = true;
  46. this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
  47. //
  48. // AdjustWhiteBalanceDialog
  49. //
  50. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  51. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  52. this.ClientSize = new System.Drawing.Size(650, 275);
  53. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  54. this.Name = "AdjustWhiteBalanceDialog";
  55. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  56. this.Load += new System.EventHandler(this.AdjustWhiteBalanceDialog_Load);
  57. this.ResumeLayout(false);
  58. }
  59. #endregion
  60. #endregion
  61. private CameraParamModel m_cameraParamModel = Startup.instance.cameraParamModel;
  62. private Timer timer1;
  63. private AdjustWhiteBalanceControl m_control;
  64. public AdjustWhiteBalanceDialog()
  65. {
  66. InitializeComponent();
  67. }
  68. private void AdjustWhiteBalanceDialog_Load(object sender, EventArgs e)
  69. {
  70. this.Text = PdnResources.GetString("Menu.Image.WhiteBalance.Text");
  71. m_control = new AdjustWhiteBalanceControl();
  72. m_control.Initialize(m_cameraParamModel, true);
  73. m_control.Location = new Point(5, 5);
  74. this.Controls.Add(m_control);
  75. this.Width = m_control.Width + 30;
  76. this.Height = m_control.Height + 50;
  77. }
  78. private void timer1_Tick(object sender, EventArgs e)
  79. {
  80. m_control.Enabled = Camera.CameraManager.IsLive;
  81. }
  82. }
  83. }