Ejemplo n.º 1
0
        private void stagepcbx_DragDrop(object sender, DragEventArgs e)
        {
            Stagepcbx pbx         = sender as Stagepcbx;
            String    lastboxType = lastbox.GetType().Name;
            Card      replacement;


            if (lastboxType.Equals("Handpcbx"))
            {
                Handpcbx lastbox2 = lastbox as Handpcbx;
                replacement = lastbox2.getCard();
                lastbox2.setCard(pbx.getCard());
                pbx.setCard(replacement);
                lastbox2.updateImage();
                pbx.updateImage();
            }

            else if (lastboxType.Equals("Stagepcbx"))
            {
                Stagepcbx lastbox2 = lastbox as Stagepcbx;
                replacement = lastbox2.getCard();
                lastbox2.setCard(pbx.getCard());
                pbx.setCard(replacement);
                lastbox2.updateImage();
                pbx.updateImage();
            }
            else
            {
                throw new Exception("Not implemented");
            }
        }
Ejemplo n.º 2
0
        private void WR_DragDrop(object sender, DragEventArgs e)
        {
            String lastboxType = lastbox.GetType().Name;
            Card   Addition;


            if (lastboxType.Equals("Handpcbx"))
            {
                Handpcbx lastbox2 = lastbox as Handpcbx;
                Addition = lastbox2.getCard();
                lastbox2.setCard(null);
                currentWR.insertCard(Addition);
                lastbox2.updateImage();
                currentWR.updateImage();
                WaitingRm.Image = currentWR.Image;
            }

            else if (lastboxType.Equals("Stagepcbx"))
            {
                Stagepcbx lastbox2 = lastbox as Stagepcbx;
                Addition = lastbox2.getCard();
                lastbox2.setCard(null);
                currentWR.insertCard(Addition);
                lastbox2.updateImage();
                currentWR.updateImage();
                WaitingRm.Image = currentWR.Image;
            }
            else
            {
                throw new Exception("Not implemented");
            }
        }