Ejemplo n.º 1
0
        /// <summary>
        /// Fires the StateChanged event.
        /// </summary>
        /// <remarks><para>If the control parameter was given in the constructor of the class, the
        /// event is fired in the context of the calling thread and not of the worker thread.</para></remarks>
        protected virtual void OnStateChanged()
        {
            ILAlgorithmEventArgs evargs = new ILAlgorithmEventArgs(m_progress, "State: " + m_state.ToString(), m_state);

            if (m_control != null && m_control.InvokeRequired)
            {
                if (!m_control.Disposing && !m_control.IsDisposed && StateChanged != null)
                {
                    m_control.Invoke(StateChanged, this, evargs);
                }
            }
            else
            {
                if (StateChanged != null)
                {
                    StateChanged(this, evargs);
                }
            }
        }
Ejemplo n.º 2
0
 private void SetState(ILAlgorithmState state) {
     m_state = state; 
     m_lastMessage = "State: '" + m_state.ToString() + "'"; 
     OnStateChanged(); 
 }
Ejemplo n.º 3
0
 private void SetState(ILAlgorithmState state)
 {
     m_state       = state;
     m_lastMessage = "State: '" + m_state.ToString() + "'";
     OnStateChanged();
 }