Пример #1
0
        public static void InvokeAddCondition()
        {
            if (bcf == null)
            {
                bcf = new BreakpointConditionForm();
                Form1StringResources.SetTextForAllControls(bcf);
            }
            BreakpointInfo bi = null;
            Breakpoint     br = breakpoints[cur_bookmark];

            if (breakpoints_conditions.TryGetValue(br, out bi))
            {
                bcf.IsConditionEnabled = bi.enabled;
                bcf.Condition          = bi.condition;
                if (bi.kind == hit_kind.is_true)
                {
                    bcf.IfTrue = true;
                }
                else
                {
                    bcf.IfChanged = true;
                }
            }
            else
            {
                bcf.IsConditionEnabled = true;
                bcf.Condition          = "";
                bcf.IfTrue             = true;
            }
            if (bcf.ShowDialog() == DialogResult.OK)
            {
                if (bi == null)
                {
                    bi = new BreakpointInfo();
                    breakpoints_conditions.Add(br, bi);
                }
                bi.enabled   = bcf.IsConditionEnabled;
                bi.condition = bcf.Condition;
                if (bcf.IfTrue)
                {
                    bi.kind = hit_kind.is_true;
                }
                else
                {
                    bi.kind = hit_kind.changed;
                }
                cur_bookmark.IsOnCondition = bi.enabled && !string.IsNullOrEmpty(bi.condition.Trim(' ', '\t'));
            }
        }
Пример #2
0
 public static void InvokeAddCondition()
 {
 	if (bcf == null)
 	{
 		bcf = new BreakpointConditionForm();
 		Form1StringResources.SetTextForAllControls(bcf);
 	}
 	BreakpointInfo bi = null;
 	Breakpoint br = breakpoints[cur_bookmark];
 	if (breakpoints_conditions.TryGetValue(br,out bi))
 	{
 		bcf.IsConditionEnabled = bi.enabled;
 		bcf.Condition = bi.condition;
 		if (bi.kind == hit_kind.is_true)
 			bcf.IfTrue = true;
 		else
 			bcf.IfChanged = true;
 	}
 	else
 	{
 		bcf.IsConditionEnabled = true;
 		bcf.Condition = "";
 		bcf.IfTrue = true;
 	}
 	if (bcf.ShowDialog() == DialogResult.OK)
 	{
 		if (bi == null)
 		{
 			bi = new BreakpointInfo();
 			breakpoints_conditions.Add(br,bi);
 		}
 		bi.enabled = bcf.IsConditionEnabled;
 		bi.condition = bcf.Condition;
 		if (bcf.IfTrue)
 			bi.kind = hit_kind.is_true;
 		else
 			bi.kind = hit_kind.changed;
 		cur_bookmark.IsOnCondition = bi.enabled && !string.IsNullOrEmpty(bi.condition.Trim(' ','\t'));
 		
 	}
 }