public void SaveSettings(string fileName) { EchoTubeSettings settings = new EchoTubeSettings { StartCutOff = StartCutOff, EndCutOff = EndCutOff, Alpha = EnvelopeAlpha, UpperTouchThreshold = (int)UpperTouchThreshold, LowerTouchThreshold = (int)LowerTouchThreshold, SingleTouch = NumberOfTouchPoints == 1 }; SettingsFileHandler.SaveSettings(fileName, settings); }
public void LoadSettings(string fileName) { EchoTubeSettings settings = SettingsFileHandler.LoadSettings(fileName); if (settings != null) { StartCutOff = settings.StartCutOff; EndCutOff = settings.EndCutOff; EnvelopeAlpha = settings.Alpha; UpperTouchThreshold = settings.UpperTouchThreshold; LowerTouchThreshold = settings.LowerTouchThreshold; NumberOfTouchPoints = settings.SingleTouch ? 1 : 2; } }