@@ -448,7 +448,7 @@ public class JsonProfile
448448 public string ProjectName { get ; set ; }
449449 public string EncoderType { get ; set ; }
450450 public string Encoder { get ; set ; }
451- public string EnocderParam { get ; set ; }
451+ public string EncoderParam { get ; set ; }
452452 public string ContainerFormat { get ; set ; }
453453 public string VideoFormat { get ; set ; }
454454 public List < JobDetails . AudioInfo > AudioTracks { get ; set ; }
@@ -480,7 +480,7 @@ private bool LoadJsonProfile(string profile)
480480 wizardInfo . EncoderInfo = this . GetEncoderInfo ( wizardInfo . EncoderPath ) ;
481481 }
482482
483- wizardInfo . EncoderParam = okeProj . EnocderParam ;
483+ wizardInfo . EncoderParam = okeProj . EncoderParam ;
484484
485485 Dictionary < string , ComboBoxItem > comboItems = new Dictionary < string , ComboBoxItem > ( ) {
486486 { "MKV" , MKVContainer } ,
@@ -522,8 +522,12 @@ private bool LoadJsonProfile(string profile)
522522 }
523523 comboItems [ wizardInfo . AudioFormat ] . IsSelected = true ;
524524
525- wizardInfo . InputScript = new FileInfo ( projDir . FullName + "\\ " + okeProj . InputScript ) . FullName ;
526- wizardInfo . VSScript = File . ReadAllText ( wizardInfo . InputScript ) ;
525+ var scriptFile = new FileInfo ( projDir . FullName + "\\ " + okeProj . InputScript ) ;
526+
527+ if ( scriptFile . Exists ) {
528+ wizardInfo . InputScript = scriptFile . FullName ;
529+ wizardInfo . VSScript = File . ReadAllText ( wizardInfo . InputScript ) ;
530+ }
527531
528532 // 预览
529533 wizardInfo . ProjectPreview += "项目名字: " + wizardInfo . TaskNamePrefix ;
@@ -638,8 +642,12 @@ private void OpenProjectBtn_Click(object sender, RoutedEventArgs e)
638642 }
639643 comboItems [ wizardInfo . AudioFormat ] . IsSelected = true ;
640644
641- wizardInfo . InputScript = new FileInfo ( projDir . FullName + "\\ " + okeproj . ReadString ( "OKEProject" , "InputScript" , "" ) ) . FullName ;
642- wizardInfo . VSScript = File . ReadAllText ( wizardInfo . InputScript ) ;
645+ var scriptFile = new FileInfo ( projDir . FullName + "\\ " + okeproj . ReadString ( "OKEProject" , "InputScript" , "" ) ) ;
646+
647+ if ( scriptFile . Exists ) {
648+ wizardInfo . InputScript = scriptFile . FullName ;
649+ wizardInfo . VSScript = File . ReadAllText ( wizardInfo . InputScript ) ;
650+ }
643651
644652 // 预览
645653 wizardInfo . ProjectPreview += "项目名字: " + wizardInfo . TaskNamePrefix ;
0 commit comments