コード例 #1
0
        public override void ReportErrors(IHost host, ErrorList errorList)
        {
            if (OnDeserializationErrors != null)
            {
                OnDeserializationErrors(host, errorList);
            }

            if ((host != null) && (host.Children.Count > 0))
            {
                IFormInterface formInterface = host.Children[0] as IFormInterface;
                if (formInterface == null)
                {
                    formInterface = (IFormInterface)host.Children[0].FindParent(typeof(IFormInterface));
                }

                if (formInterface != null)
                {
                    formInterface.EmbedErrors(errorList);
                    return;
                }
            }

                        #if (DEBUG)
            if (HasErrors(errorList))
            {
                ErrorListForm.ShowErrorList(errorList, true);
            }
                        #endif
        }
コード例 #2
0
 public static void ShowErrorList(ErrorList list, bool warning)
 {
     if ((list != null) && (list.Count > 0))
     {
         using (ErrorListForm form = new ErrorListForm())
         {
             form._errorListView.AppendErrors(null, list, warning);
             form.ShowDialog();
         }
     }
 }
コード例 #3
0
 private void EmbeddedErrorsClicked(object sender, EventArgs args)
 {
     ErrorListForm.ShowErrorList(_errorList, true);
 }