public void Execute()
 {
     ldvmodel.RemoveNetwork(lnvmodel);
     ldvmodel.AddNetwork(lnvmodel, number_new - (number_new > number_old ? 1 : 0));
     ldvmodel.IDVModel.Setup(ldvmodel);
     ldvmodel.UpdateModelMessageByNetwork();
     if (area_new != null)
     {
         area_new.Select(lnvmodel);
     }
 }
Esempio n. 2
0
        public void Execute()
        {
            int oldnum = _sourceNetwork.NetworkNumber, newnum = _desNetwork.NetworkNumber;

            if (oldnum < newnum)
            {
                _ladderDiagram.RemoveNetwork(_desNetwork);
                _ladderDiagram.AddNetwork(_desNetwork, oldnum);
                _ladderDiagram.RemoveNetwork(_sourceNetwork);
                _ladderDiagram.AddNetwork(_sourceNetwork, newnum);
            }
            else
            {
                _ladderDiagram.RemoveNetwork(_sourceNetwork);
                _ladderDiagram.AddNetwork(_sourceNetwork, newnum);
                _ladderDiagram.RemoveNetwork(_desNetwork);
                _ladderDiagram.AddNetwork(_desNetwork, oldnum);
            }
            _ladderDiagram.IDVModel.Setup(_ladderDiagram);
            _ladderDiagram.UpdateModelMessageByNetwork();
        }