diff --git a/ISCamRecorder/Setting.Designer.cs b/ISCamRecorder/Setting.Designer.cs index 3d0ef0a..e025f76 100644 --- a/ISCamRecorder/Setting.Designer.cs +++ b/ISCamRecorder/Setting.Designer.cs @@ -175,6 +175,7 @@ this.TxtRecodingDulation.TabIndex = 27; this.TxtRecodingDulation.Text = "30"; this.TxtRecodingDulation.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.TxtRecodingDulation.TextChanged += new System.EventHandler(this.TxtRecodingDulation_TextChanged); this.TxtRecodingDulation.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumberKeyOnly); // // LblRecodingMemory diff --git a/ISCamRecorder/Setting.cs b/ISCamRecorder/Setting.cs index ca106b6..45b8c87 100644 --- a/ISCamRecorder/Setting.cs +++ b/ISCamRecorder/Setting.cs @@ -57,7 +57,7 @@ var availableMemory = (int)(info.AvailablePhysicalMemory / bcs); //利用可能な物理メモリ LblAvailableMemory.Text = $"利用可能メモリー:{availableMemory.ToString("#,0").PadLeft(7)}MB"; - var totalConsumedMemory = (int)(TotalConsumedMemoryPerSecond * RecodingLimit); + var totalConsumedMemory = (int)(TotalConsumedMemoryPerSecond * float.Parse(TxtRecodingDulation.Text)); LblRecodingMemory.Text = $"最大消費メモリー:{totalConsumedMemory.ToString("#,0").PadLeft(7)}MB"; if (totalConsumedMemory > availableMemory) LblRecodingMemory.ForeColor = Color.Red; else LblRecodingMemory.ForeColor = Color.Black; @@ -101,5 +101,14 @@ e.Handled = true; } } + + /// + /// 記録時間上限書き換え時 + /// + /// + /// + private void TxtRecodingDulation_TextChanged(object sender, EventArgs e) { + this.UpdateMemoryInfo(); + } } }