public InfosFading(long _iReferenceTimestamp, long _iAverageTimeStampsPerFrame) { // This constructor is used by all drawings to get the default values. FromInfosFading(PreferencesManager.Instance().DefaultFading); m_iReferenceTimestamp = _iReferenceTimestamp; m_iAverageTimeStampsPerFrame = _iAverageTimeStampsPerFrame; }
public static PreferencesManager Instance() { if (m_instance == null) { m_instance = new PreferencesManager(); } return(m_instance); }
public double GetOpacityFactor(long _iTimestamp) { double fOpacityFactor = 0.0f; if (!m_bEnabled) { // No fading. if (_iTimestamp == m_iReferenceTimestamp) { fOpacityFactor = 1.0f; } else { fOpacityFactor = 0.0f; } } else if (m_bUseDefault) { // Default value InfosFading info = PreferencesManager.Instance().DefaultFading; if (info.AlwaysVisible) { fOpacityFactor = 1.0f; } else { fOpacityFactor = ComputeOpacityFactor(m_iReferenceTimestamp, _iTimestamp, info.FadingFrames); } } else if (m_bAlwaysVisible) { // infinite fading. (= persisting drawing) fOpacityFactor = 1.0f; } else { // Custom value. fOpacityFactor = ComputeOpacityFactor(m_iReferenceTimestamp, _iTimestamp, m_iFadingFrames); } return(fOpacityFactor * m_fMasterFactor); }
public void AddRecentColor(Color _color) { PreferencesManager.UpdateRecents(_color, recentColors, maxRecentColors); }
public static void Initialize() { instance = new PreferencesManager(); }
public void AddRecentFile(string file) { PreferencesManager.UpdateRecents(file, recentFiles, maxRecentFiles); NotificationCenter.RaiseRecentFilesChanged(this); }
public void AddRecentCapturedFile(string file) { PreferencesManager.UpdateRecents(file, recentCapturedFiles, maxRecentCapturedFiles); }