コード例 #1
0
        /// <summary>
        /// Sets the given target using a generic binding info object</summary>
        /// <param name="target">The binding info for the target object, or null to remove existing
        /// binding</param>
        /// <param name="name">The readable name of the Control, to indicate to the user
        /// which Control has the focus. Can't be null</param>
        /// <remarks>Use this for special cases, such as when the Paint event isn't raised on a Control</remarks>
        public void Bind(IPerformanceTarget target, string name)
        {
            if (m_target == target &&
                m_targetName.Equals(name))
                return;

            if (m_target != null)
                m_target.EventOccurred -= TargetEventHandler;

            m_target = target;
            m_targetName = name;

            if (m_target != null)
                m_target.EventOccurred += TargetEventHandler;

            controlNameLabel.Text = m_targetName;
        }
コード例 #2
0
        /// <summary>
        /// Sets the given target using a generic binding info object</summary>
        /// <param name="target">The binding info for the target object, or null to remove existing
        /// binding</param>
        /// <param name="name">The readable name of the Control, to indicate to the user
        /// which Control has the focus. Can't be null</param>
        /// <remarks>Use this for special cases, such as when the Paint event isn't raised on a Control</remarks>
        public void Bind(IPerformanceTarget target, string name)
        {
            if (m_target == target &&
                m_targetName.Equals(name))
            {
                return;
            }

            if (m_target != null)
            {
                m_target.EventOccurred -= TargetEventHandler;
            }

            m_target     = target;
            m_targetName = name;

            if (m_target != null)
            {
                m_target.EventOccurred += TargetEventHandler;
            }

            controlNameLabel.Text = m_targetName;
        }
コード例 #3
0
 /// <summary>
 /// Constructor</summary>
 /// <param name="target">Target whose performance is monitored. Can be null.</param>
 /// <param name="name">User readable name of the target</param>
 public TargetChangeEventArgs(IPerformanceTarget target, string name)
 {
     Target = target;
     Name = name;
 }
コード例 #4
0
 /// <summary>
 /// Constructor</summary>
 /// <param name="target">Target whose performance is monitored. Can be null.</param>
 /// <param name="name">User readable name of the target</param>
 public TargetChangeEventArgs(IPerformanceTarget target, string name)
 {
     Target = target;
     Name   = name;
 }