private bool displayTuneControls;\r
private bool displayLevelControl;\r
private bool displayProfileControl;\r
-\r
+ private Dictionary<string, string> encoderOptions = new Dictionary<string, string>();\r
+ \r
#endregion\r
\r
#region Constructors and Destructors\r
}\r
set\r
{\r
- this.Task.VideoEncoder = value;\r
- this.NotifyOfPropertyChange(() => this.SelectedVideoEncoder);\r
- HandleEncoderChange(this.Task.VideoEncoder);\r
+ if (!object.Equals(value, this.Task.VideoEncoder))\r
+ {\r
+ // Cache the current extra args. We can set them back later if the user switches back\r
+ this.encoderOptions[EnumHelper<VideoEncoder>.GetShortName(this.Task.VideoEncoder)] = this.ExtraArguments;\r
+\r
+ this.Task.VideoEncoder = value;\r
+ this.NotifyOfPropertyChange(() => this.SelectedVideoEncoder);\r
+ HandleEncoderChange(this.Task.VideoEncoder);\r
+ }\r
}\r
}\r
\r
this.NotifyOfPropertyChange(() => SelectedFramerate);\r
this.UseAdvancedTab = false;\r
}\r
+\r
+ // Cleanup Extra Arguments\r
+ // Load the cached arguments. Saves the user from resetting when switching encoders.\r
+ string result;\r
+ this.ExtraArguments = this.encoderOptions.TryGetValue(EnumHelper<VideoEncoder>.GetShortName(selectedEncoder), out result) ? result : string.Empty;\r
}\r
}\r
}
\ No newline at end of file