Пример #1
0
        private void WrapperChanged(object sender, System.EventArgs e)
        {
            if (wrapper == null)
            {
                return;
            }

            if (internalchg)
            {
                return;
            }

            // Handler for instructions list
            if (sender is List <Instruction> )
            {
                if (csel >= wrapper.Count)
                {
                    csel = wrapper.Count - 1;
                }
                myrepaint();
                OnSelectedInstChanged(new EventArgs());
            }

            // if any instruction updated, redraw the connectors
            if (sender is Instruction && wrapper.IndexOf((Instruction)sender) >= 0)
            {
                pnflow.Image = DrawConnectors();
            }
        }
Пример #2
0
        private void WrapperChanged(object sender, System.EventArgs e)
        {
            if (wrapper == null || index == -1)
            {
                return;
            }

            if (!(sender is Instruction) || wrapper.IndexOf((Instruction)sender) != index)
            {
                return;
            }
            Instruction inst = (Instruction)sender;

            bhavInstListItem.Text = "";
            instrText.Text        = Content(index, inst);     //LongName;

            trueTarget.Text     = strTrue + ": " + inst.Target1.ToString("X");
            trueTarget.LinkArea = new LinkArea(0, 0);
            if (inst.Target1 < wrapper.Count)
            {
                trueTarget.Links.Add(6, trueTarget.Text.Length - 6, inst.Target1);
            }

            falseTarget.Text     = strFalse + ": " + inst.Target2.ToString("X");
            falseTarget.LinkArea = new LinkArea(0, 0);
            if (inst.Target2 < wrapper.Count)
            {
                falseTarget.Links.Add(7, falseTarget.Text.Length - 7, inst.Target2);
            }
        }