示例#1
0
        private void btnBlock_Click(object sender, EventArgs e)
        {
            var latticeInfo = slaveInfoService.GetLatticeInfo(LatticeNo);

            upDownService.BlockError(new UpDownMessage
            {
                LatticeByUpDown = new List <LatticeByUpDown>()
                {
                    new LatticeByUpDown()
                    {
                        LatticeNo = LatticeNo
                    }
                }
            });
            buttonService.UpdateButton(latticeInfo);
            this.Close();
        }
示例#2
0
文件: Main.cs 项目: liusile/WGProject
        private void CommandHandle(UpDownMessage upDownMessage)
        {
            //用反射可以一劳永益以后不用再一个一个添加,但影响效率的效率有多少?
            switch (upDownMessage.UpDownCommand)
            {
            case UpDownCommand.PutIng:
                UpDownService.PutIng(upDownMessage);
                break;

            case UpDownCommand.BlockError:
                UpDownService.BlockError(upDownMessage);
                break;

            case UpDownCommand.RemoveBlockError:
                UpDownService.RemoveBlockError(upDownMessage);
                break;

            case UpDownCommand.PrintSingle:
                UpDownService.PrintSingle(upDownMessage);
                break;

            case UpDownCommand.PrintAll:
                UpDownService.PrintAll(upDownMessage);
                break;

            case UpDownCommand.WaveCancel:
                UpDownService.WaveCancel(upDownMessage);
                break;

            case UpDownCommand.WavePowerComplete:
                UpDownService.WavePowerComplete(upDownMessage);
                break;

            default:
                break;
            }
        }