public InputErrorEventArgs(InputError error, EditField_DialogEntry entry)
 {
     this.Entry       = entry;
     this.Title       = error.Title;
     this.ErrorCode   = error.ErrorCode;
     this.Description = error.Description;
 }
 public ValidationErrorEventArgs(ValidationError error, EditField_DialogEntry entry)
 {
     this.Entry         = entry;
     this.Title         = error.Title;
     this.ErrorCode     = error.ErrorCode;
     this.ErrorPosition = error.ErrorPosition;
     this.Description   = error.Description;
 }
        public void fire_ValidationError(ValidationError error, EditField_DialogEntry entry)
        {
            logWarning(error);

            if (ValidationErrors != null)
            {
                try
                {
                    ValidationErrors.Invoke(this, new ValidationErrorEventArgs(error, entry));
                }
                catch { }
            }
        }
        public void fire_InputError(InputError error, EditField_DialogEntry entry)
        {
            logError(error);

            if (InputErrors != null)
            {
                try
                {
                    InputErrors.Invoke(this, new InputErrorEventArgs(error, entry));
                }
                catch { }
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DialogEntry_ToolStripMenuItem"/> class.
        /// </summary>
        /// <param name="dlgEntry">The dialog entry.</param>
        public DialogEntry_ToolStripMenuItem(DialogEntry dlgEntry) : base(dlgEntry)
        {
            Type = dlgEntry.Type;
            this.CheckOnClick = true;

            //Check for Types & Status, some coloring to differentiate between types for now

            switch (Type)
            {
            case DialogEntryType.Activation:
                break;

            case DialogEntryType.Button:
                this.Text         = "btn:: " + this.Text;
                this.CheckOnClick = false;
                break;

            case DialogEntryType.Checkbox:
                this.Text = "[] " + this.Text;
                break;

            case DialogEntryType.EditField:

                EditField_DialogEntry efield = (EditField_DialogEntry)dlgEntry;
                if (efield.HasLabel)
                {
                    if (efield.InputBox != null && !efield.InputBox.IsGraphical)
                    {
                        this.Text = efield.Label + this.Text;
                    }
                    else
                    {
                        this.Text = "ef:: " + efield.Label + this.Text;
                    }
                }
                else
                {
                    this.Text = "ef:: " + this.Text;
                }
                this.CheckOnClick = false;
                this.Enabled      = false;

                break;

            case DialogEntryType.Group:
                this.CheckOnClick = false;
                this.Font         = new System.Drawing.Font(this.Font, System.Drawing.FontStyle.Bold);
                break;

            case DialogEntryType.EditField_Label:
                this.CheckOnClick = false;
                this.Enabled      = false;
                this.Font         = new System.Drawing.Font(this.Font, System.Drawing.FontStyle.Italic);
                break;

            case DialogEntryType.Label:
                this.CheckOnClick = false;
                this.Enabled      = false;
                break;

            case DialogEntryType.RadioButton:
                this.Text = "() " + this.Text;
                break;

            case DialogEntryType.Unknown:
                break;

            default: break;
            }

            DialogEntryStatus itemStatus = dlgEntry.Status;

            if (itemStatus.HasFlag(DialogEntryStatus.Checked))
            {
                this.Checked = true;
            }

            if (itemStatus.HasFlag(DialogEntryStatus.Disabled))
            {
                this.Enabled = false;
                this.Text    = "xx" + this.Text;
            }

            dlgEntry.DialogEntryChanged += d_EntryChanged;
        }