private void TextBuffer_Changed(object sender, TextContentChangedEventArgs e) { if (lastTextChangeTime.AddMilliseconds(TEXT_CHANGE_THROTTLED_MILLISECONDS) > DateTime.Now) { return; } lastTextChangeTime = DateTime.Now; // TODO: Should have a better way to reduce effect of batch action, such as: CTRL+Z RefreshSettings(); if (!generalSettings.IsEnablePowerMode) { return; } if (generalSettings.IsEnableComboMode) { KeyDown(); if (comboModeSettings.IsShowStreakCounter) { streakCounterAdornment.OnTextBufferChanged(adornmentLayer, view, streakCount); } if (ComboService.CanScreenShake(streakCount) && generalSettings.IsEnableScreenShake) { screenShakeAdornment.OnTextBufferChanged(adornmentLayer, view, streakCount); } if (ComboService.CanShowParticles(streakCount) && generalSettings.IsEnableParticles) { particlesAdornment.OnTextBufferChanged(adornmentLayer, view, streakCount); } } else { if (generalSettings.IsEnableParticles) { particlesAdornment.OnTextBufferChanged(adornmentLayer, view, streakCount); } if (generalSettings.IsEnableScreenShake) { screenShakeAdornment.OnTextBufferChanged(adornmentLayer, view, streakCount); } } }