/// <summary> /// Encoding constructor /// </summary> public LZWArgs(string input, string output, LZWSettings setting) { InputFilename = input; OutputFilename = output; Settings = setting; }
/// <summary> /// Decoding constructor /// </summary> public LZWArgs(string input, string output) { InputFilename = input; OutputFilename = output; Settings = null; }
/// <summary> /// Makes a copy of an LZWSettings object /// </summary> public LZWSettings(LZWSettings copyFrom) { MaxBits = copyFrom.MaxBits; ShouldPrune = copyFrom.ShouldPrune; PruneWindow = copyFrom.PruneWindow; InitEmpty = copyFrom.InitEmpty; }
public SettingsViewModel() { _oldSettings = LZWSettings.Current; _settings = new LZWSettings(_oldSettings); _integrateWithShell = RegistryMaster.IsIntegrated; }
public static void UpdateSettings(LZWSettings settings) { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var appSettings = config.AppSettings.Settings; appSettings.Remove("MaxBits"); appSettings.Remove("Pruning"); appSettings.Remove("PruneWindow"); appSettings.Remove("InitEmptyStringTable"); appSettings.Add("MaxBits", Convert.ToString(settings.MaxBits)); appSettings.Add("Pruning", Convert.ToString(settings.ShouldPrune)); appSettings.Add("PruneWindow", Convert.ToString(settings.PruneWindow)); appSettings.Add("InitEmptyStringTable", Convert.ToString(settings.InitEmpty)); config.Save(ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection("appSettings"); }