コード例 #1
0
 public bool ShouldProcess(
     UpdateUIInformation information)
 {
     return
         (doShouldProcess() &&
          (_controlBase != null || _formBase != null || _ribbonFormBase != null) &&
          (
              (_controlBase != null && !_controlBase.DesignMode) ||
              (_formBase != null && !_formBase.DesignMode) ||
              (_ribbonFormBase != null && !_ribbonFormBase.DesignMode)
          ) &&
          !HasProcessed(information));
 }
コード例 #2
0
        private bool HasProcessed(
            UpdateUIInformation information)
        {
            if (information == null)
            {
                throw new ArgumentNullException(@"information");
            }
            else
            {
                var hasProcessed = _tokens.FindIndex(x => x.Token == information.Token) >= 0;

                if (hasProcessed)
                {
                    Trace.TraceInformation(
                        @"Found an already processed token.");
                }

                return(hasProcessed);
            }
        }