Ejemplo n.º 1
0
 private void OnParameterChanged(IntPtr devicePtr, Parameter parameter, IntPtr userData)
 {
     if (DevicePtr != devicePtr)
     {
         return;
     }
     ParameterChanged?.Invoke(this, parameter);
 }
Ejemplo n.º 2
0
        /// <summary>Raises any deferred events notifying parameter changes or settings changes.  Usually triggered internally on a timer, but can be publicly triggered to force changes to happen immediately</summary>
        public static void SendDelayedEvents(object sender, EventArgs e)
        {
            m_tmr.Enabled = false;
            if (m_ApplicableChanged)
            {
                m_ApplicableChanged = false;
                //Debug.WriteLine("Applicable changed")
                ApplicabilityChanged?.Invoke();
            }
            var parameters = m_ParametersChanged.ToList();             // take a copy in case of sync issues

            m_ParametersChanged.Clear();
            foreach (Parameters parameter in parameters)
            {
                //Debug.WriteLine("Sending param change: " + parameter.ToString)
                ParameterChanged?.Invoke(parameter);
            }
            if (m_SettingsChanged)
            {
                m_SettingsChanged          = false;
                m_VerbApplicabilityChanged = false;                 // We don't raise both events.  Handlers should assume that all verbs change if settings change
                SettingsChanged?.Invoke();
            }
            if (m_KeyApplicableChanged)
            {
                m_KeyApplicableChanged = false;
                KeyApplicabilityChanged?.Invoke();
            }
            if (m_VerbApplicabilityChanged)
            {
                m_VerbApplicabilityChanged = false;
                VerbApplicabilityChanged?.Invoke();
            }
            // from error handling
            if (m_InvalidDocument)
            {
                Root.Log.WriteLine("Globals raising InvalidCurrentDocument");
                m_InvalidDocument = false;
                InvalidCurrentDocument?.Invoke();
            }
            if (m_InvalidState)
            {
                Root.Log.WriteLine("Globals raising InvalidCurrentState");
                m_InvalidState = false;
                InvalidCurrentState?.Invoke();
            }
            if (m_UpdateInfo)
            {
                m_UpdateInfo = false;
                UpdateInfo?.Invoke();
            }
            lock (m_Queued)
                while (m_Queued.Any())
                {
                    m_Queued.Dequeue().Invoke();
                }
        }
Ejemplo n.º 3
0
 private static void OnParameterChanged()
 {
     ParameterChanged?.Invoke();
     OnAction();
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Raises the <see cref="ParameterChanged" /> event.
 /// </summary>
 /// <param name="e">The <see cref="DspParameterEventArgs" /> instance containing the event data.</param>
 protected virtual void OnParameterChanged(DspParameterEventArgs e)
 {
     ParameterChanged?.Invoke(this, e);
 }
Ejemplo n.º 5
0
 protected virtual void OnParameterChanged()
 {
     ParameterChanged?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 6
0
 private static void OnParameterChanged()
 {
     ParameterChanged?.Invoke();
     A205M_1Parameters.ResetParameters();
     OnAction();
 }
Ejemplo n.º 7
0
 private void OnParameterChanged(FilterModel model, string parameterName)
 {
     ParameterChanged?.Invoke(this, new ParameterChangeEventArgs(model, parameterName));
 }
Ejemplo n.º 8
0
 protected void RaiseParameterChanged(string key)
 {
     ParameterChanged?.Invoke(this, key);
 }
Ejemplo n.º 9
0
 private void OnParameterChanged(IntPtr devicePtr, Parameter parameter)
 {
     ParameterChanged?.Invoke(this, parameter);
 }