Exemplo n.º 1
0
        protected bool DialogThenAssign(object obj, EpiInfo.Plugin.DataType dataType = EpiInfo.Plugin.DataType.Unknown)
        {
            MaskOpt  = MaskOpt == null ? string.Empty : MaskOpt;
            MaskOpt  = MaskOpt == "None" ? string.Empty : MaskOpt;
            Modifier = Modifier == null ? string.Empty : Modifier;

            if (this.Context.EnterCheckCodeInterface.Dialog(Prompt, TitleText, MaskOpt, Modifier, ref obj, dataType))
            {
                if (obj is StringBuilder)
                {
                    Assign.AssignValue(this.Context, Identifier, obj.ToString());
                }
                else
                {
                    Assign.AssignValue(this.Context, Identifier, obj);
                }

                return(true);
            }

            return(false);
        }