| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using PaintDotNet.Base.SettingModel;namespace PaintDotNet.ImageCollect{    internal class AdjustGainDialog : FloatingToolForm    {        #region        /// <summary>        /// Required designer variable.        /// </summary>        private System.ComponentModel.IContainer components = null;        /// <summary>        /// Clean up any resources being used.        /// </summary>        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>        protected override void Dispose(bool disposing)        {            if (disposing && (components != null))            {                components.Dispose();            }            base.Dispose(disposing);        }        #region Windows Form Designer generated code        /// <summary>        /// Required method for Designer support - do not modify        /// the contents of this method with the code editor.        /// </summary>        private void InitializeComponent()        {            this.components = new System.ComponentModel.Container();            this.timer1 = new System.Windows.Forms.Timer(this.components);            this.SuspendLayout();            //             // timer1            //             this.timer1.Enabled = true;            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);            //             // AdjustGainDialog            //             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);            this.ClientSize = new System.Drawing.Size(144, 17);            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;            this.Name = "AdjustGainDialog";            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;            this.Activated += new System.EventHandler(this.AdjustExposureDialog_Activated);            this.Load += new System.EventHandler(this.Dialog_Load);            this.ResumeLayout(false);        }        #endregion        #endregion        private Timer timer1;        private AdjustExposureControl m_control;        public AdjustGainDialog()        {            InitializeComponent();            m_control = new AdjustExposureControl(2);            m_control.Location = new Point(4, 4);            this.Controls.Add(m_control);        }        private void Dialog_Load(object sender, EventArgs e)        {            this.Text = PdnResources.GetString("Menu.timeofexposure.text");            this.Height = m_control.Height + 42;            this.Width = m_control.Width + 26;        }        private void AdjustExposureDialog_Activated(object sender, EventArgs e)        {            m_control.Initialize(Startup.instance.cameraParamModel);        }        private void timer1_Tick(object sender, EventArgs e)        {            m_control.Enabled = Camera.CameraManager.IsLive;        }    }}
 |