Beispiel #1
0
        protected override void FillDisplayerRequestedParams(ReferenceEventArgs e)
        {
            if (SelectedItem != null)
            {
                if (IsAuditCheck)
                {
                    var form = new CheckListAuditForm(SelectedItem, AuditId.Value);
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        _animatedThreadWorker.RunWorkerAsync();
                    }
                }
                else
                {
                    var form = new CheckListForm(SelectedItem);
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        _animatedThreadWorker.RunWorkerAsync();
                    }
                }



                e.Cancel = true;
            }
        }
        public override bool UpdateValue(object sender)
        {
            Form form = (Form)sender;

            //var s = "";

            //if ((s = Microsoft.VisualBasic.Interaction.InputBox(HasValue ? Value.ToString() : "")) != string.Empty)
            //{
            //    Value = s;
            //    return true;
            //}
            var dlg = new CheckListForm(typeof(MailDirection), Value);

            if (dlg.ShowDialog(form) == DialogResult.OK)
            {
                Value = dlg.Selected;
                return(true);
            }
            return(false);
        }