diff --git a/ISCamRecorder/ISCamera.cs b/ISCamRecorder/ISCamera.cs index f3bfe9c..c3116dd 100644 --- a/ISCamRecorder/ISCamera.cs +++ b/ISCamRecorder/ISCamera.cs @@ -225,7 +225,7 @@ _Cam.LiveDisplayHeight = h; } else { _Cam.LiveDisplayTop = 0; - _Cam.LiveDisplayHeight = _Cam.Width; + _Cam.LiveDisplayHeight = _Cam.Height; var w = vf.Width * _Cam.Height / vf.Height; _Cam.LiveDisplayLeft = (_Cam.Width - w) / 2; _Cam.LiveDisplayWidth = w; diff --git a/ISCamRecorder/MainForm.Designer.cs b/ISCamRecorder/MainForm.Designer.cs index 179ce6b..8226813 100644 --- a/ISCamRecorder/MainForm.Designer.cs +++ b/ISCamRecorder/MainForm.Designer.cs @@ -115,6 +115,7 @@ this.splitContainer1.Size = new System.Drawing.Size(1016, 496); this.splitContainer1.SplitterDistance = 248; this.splitContainer1.TabIndex = 7; + this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // // splitContainer2 // @@ -133,6 +134,7 @@ this.splitContainer2.Size = new System.Drawing.Size(1016, 248); this.splitContainer2.SplitterDistance = 336; this.splitContainer2.TabIndex = 0; + this.splitContainer2.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // // TxtCvCamera // @@ -176,6 +178,7 @@ this.splitContainer3.Size = new System.Drawing.Size(676, 248); this.splitContainer3.SplitterDistance = 337; this.splitContainer3.TabIndex = 0; + this.splitContainer3.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // // TxtTop // @@ -284,6 +287,7 @@ this.splitContainer4.Size = new System.Drawing.Size(1016, 244); this.splitContainer4.SplitterDistance = 336; this.splitContainer4.TabIndex = 0; + this.splitContainer4.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // // TxtLeft // @@ -329,6 +333,7 @@ this.splitContainer5.Size = new System.Drawing.Size(676, 244); this.splitContainer5.SplitterDistance = 337; this.splitContainer5.TabIndex = 0; + this.splitContainer5.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.SplitterMoved); // // TxtFront // diff --git a/ISCamRecorder/MainForm.cs b/ISCamRecorder/MainForm.cs index 2a39087..5beaeac 100644 --- a/ISCamRecorder/MainForm.cs +++ b/ISCamRecorder/MainForm.cs @@ -222,42 +222,6 @@ BtnSnapImage.Text = $"{ButtonSymbol(Setting.ACTION.image)}撮影"; } - /// - /// フォームタイトルを設定 - /// - private void SetTitle(string title) { - var version = Assembly.GetExecutingAssembly().GetName().Version; -#if DEBUG - var debug = " [DEBUG]"; -#else - var debug = ""; -#endif - Text = $"{title} ver {version.Major}.{version.Minor}{debug}"; - } - - /// - /// フォームを閉じる時 - /// - /// - /// - private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { - if (State == STATE.Idle) { - Task.Run(ExitProgram); - e.Cancel = true; - }else if(State != STATE.Exit) { - e.Cancel = true; - } - } - - /// - /// サイズ変更時 - /// - /// - /// - private void MainForm_SizeChanged(object sender, EventArgs e) { - _Cameras.ForEach(c => c.SetDisplaySize()); - } - /// /// 録画開始・中断 /// @@ -466,6 +430,33 @@ } /// + /// フォームを閉じる時 + /// + /// + /// + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { + if (State == STATE.Idle) { + Task.Run(ExitProgram); + e.Cancel = true; + } else if (State != STATE.Exit) { + e.Cancel = true; + } + } + + /// + /// フォームタイトルを設定 + /// + private void SetTitle(string title) { + var version = Assembly.GetExecutingAssembly().GetName().Version; +#if DEBUG + var debug = " [DEBUG]"; +#else + var debug = ""; +#endif + Text = $"{title} ver {version.Major}.{version.Minor}{debug}"; + } + + /// /// スイッチ連動の表示ラベル /// /// @@ -474,5 +465,23 @@ return Setting.ButtonAction == action ? "● " : ""; } + + /// + /// サイズ変更時 + /// + /// + /// + private void MainForm_SizeChanged(object sender, EventArgs e) { + _Cameras.ForEach(c => c.SetDisplaySize()); + } + + /// + /// スプリッター移動時 + /// + /// + /// + private void SplitterMoved(object sender, SplitterEventArgs e) { + _Cameras.ForEach(c => c.SetDisplaySize()); + } } }