示例#1
0
        public void Save()
        {
            if (!radioBreakAlways.Active)
            {
                bp.ConditionExpression     = entryCondition.Text;
                bp.BreakIfConditionChanges = radioBreakChange.Active;
            }
            else
            {
                bp.ConditionExpression = null;
            }

            bp.HitCount = (int)spinHitCount.Value;

            if (radioActionBreak.Active)
            {
                bp.HitAction = HitAction.Break;
            }
            else
            {
                bp.HitAction       = HitAction.PrintExpression;
                bp.TraceExpression = entryTraceExpr.Text;
            }
            bp.CommitChanges();
        }
        public void Save()
        {
            if (isNew)
            {
                if (bp is FunctionBreakpoint)
                {
                    FunctionBreakpoint fb = (FunctionBreakpoint)bp;

                    fb.FunctionName = parsedFunction;
                    fb.ParamTypes   = parsedParamTypes;
                }
                else
                {
                    bp.SetColumn((int)spinColumn.Value);
                    bp.SetLine((int)spinLine.Value);
                }
            }

            if (!radioBreakAlways.Active)
            {
                bp.ConditionExpression     = entryCondition.Text;
                bp.BreakIfConditionChanges = radioBreakWhenChanges.Active;
            }
            else
            {
                bp.ConditionExpression = null;
            }

            bp.HitCountMode = (HitCountMode)comboHitCountMode.Active;
            if (bp.HitCountMode != HitCountMode.None)
            {
                bp.HitCount = (int)spinHitCount.Value;
            }
            else
            {
                bp.HitCount = 0;
            }

            if (radioActionBreak.Active)
            {
                bp.HitAction = HitAction.Break;
            }
            else
            {
                bp.HitAction       = HitAction.PrintExpression;
                bp.TraceExpression = entryTraceExpression.Text;
            }

            bp.CommitChanges();
        }