@@ -24,16 +24,24 @@ public partial class UtilsMetricsForm : Form
2424 public string VideoLq { get ; set ; }
2525 public string VideoHq { get ; set ; }
2626
27+ private bool closeRightAway = false ;
28+
2729 ListBox fileList = Program . mainForm . fileListBox ;
2830
29- public UtilsMetricsForm ( )
31+ public UtilsMetricsForm ( bool close = false )
3032 {
3133 InitializeComponent ( ) ;
32-
34+
35+ closeRightAway = close ;
36+
37+ if ( closeRightAway )
38+ Opacity = 0 ;
39+
3340 vmaf . Checked = UtilGetMetrics . runVmaf ;
3441 ssim . Checked = UtilGetMetrics . runSsim ;
3542 psnr . Checked = UtilGetMetrics . runPsnr ;
3643 align . SelectedIndex = UtilGetMetrics . alignMode ;
44+ subsample . SelectedIndex = ( UtilGetMetrics . subsample - 1 ) . Clamp ( 0 , 64 ) ;
3745 vmafMdl . SelectedIndex = UtilGetMetrics . vmafModel ;
3846 AcceptButton = confirmBtn ;
3947 }
@@ -52,8 +60,7 @@ private void LoadVideoBox (ComboBox box, string videoPath)
5260
5361 private void UtilsMetricsForm_Load ( object sender , EventArgs e )
5462 {
55- align . SelectedIndex = UtilGetMetrics . alignMode ;
56- subsample . SelectedIndex = ( UtilGetMetrics . subsample - 1 ) . Clamp ( 0 , 64 ) ;
63+
5764 }
5865
5966 private void UtilsMetricsForm_Shown ( object sender , EventArgs e )
@@ -74,6 +81,9 @@ private void UtilsMetricsForm_Shown(object sender, EventArgs e)
7481 encodedVideo . SelectedItem = encodedVideo . Items . OfType < MediaFile > ( ) . OrderByDescending ( x => x . Size ) . Last ( ) ;
7582 referenceVideo . SelectedItem = referenceVideo . Items . OfType < MediaFile > ( ) . OrderByDescending ( x => x . Size ) . First ( ) ;
7683 }
84+
85+ if ( closeRightAway )
86+ Close ( ) ;
7787 }
7888
7989 bool pressedOk = false ;
0 commit comments