Esempio n. 1
0
        private void OnMenuItemClick(object sender, RoutedEventArgs e)
        {
            LadderDiagramViewModel ldvmodel = lnvmodel.LDVModel;

            for (int i = 0; i < Count; i++)
            {
                if (sender == MI_Values[i])
                {
                    ShowModifyDialog(i);
                }
            }
            if (sender == MI_Breakpoint)
            {
                switch (MI_Breakpoint.Header.ToString())
                {
                case "添加断点":
                    BreakpointRect brect = new BreakpointRect(String.Empty);
                    brect.BVModel = bvmodel;
                    ldvmodel.ReplaceBreakpoint(lnvmodel, brect);
                    break;

                case "删除断点":
                    ldvmodel.RemoveBreakpoint(lnvmodel, bvmodel.BPRect);
                    break;
                }
            }
        }