Example #1
0
        /// <summary>
        /// 恢复单元格原始值,撤消
        /// </summary>
        /// <param name="p_args"></param>
        public override void Undo(object p_args)
        {
            IsSetting = true;
            ValueChangedArgs args = (ValueChangedArgs)p_args;

            args.Cell.Val = args.OldVal;
            RptText text = args.RptText;

            if (text != null)
            {
                text.Update(false);
            }
            IsSetting = false;
        }
Example #2
0
        /// <summary>
        /// 设置单元格新值,重做
        /// </summary>
        /// <param name="p_args"></param>
        /// <returns></returns>
        public override object Execute(object p_args)
        {
            IsSetting = true;
            ValueChangedArgs args = (ValueChangedArgs)p_args;

            args.Cell.Val = args.Val;
            RptText text = args.RptText;

            if (text != null)
            {
                text.Update(false);
            }
            IsSetting = false;
            return(null);
        }