예제 #1
0
        public void ReplayGame()
        {
            Game.GetPhysics().Dispose();

            InfoBody foeBody = Game.GetPhysics().AddCircle(Game.GetWindowWidth() / 2, 100, 50, 0, 1f, 1f, 1f, GameResource.circle_3, "I");

            myBody   = Game.GetPhysics().AddCircle(Game.GetWindowWidth() / 2, Game.GetWindowHeight() - 100, 50, 0, 1f, 1f, 1f, GameResource.circle_1, "FOE");
            ballBody = Game.GetPhysics().AddCircle(Game.GetWindowWidth() / 2, Game.GetWindowHeight() / 2 + 40, 30, 0, 1f, 1f, 1f, GameResource.circle_2, "BALL");
            LFoe     = new LogicFoe(Game, foeBody, ballBody);

            // Create borders
            Game.GetPhysics().AddRect(0, Game.GetWindowHeight() / 2, 20, Game.GetWindowHeight(), 0, 0f, 0f, 0f, GameResource.rect_3, "BORDER");
            Game.GetPhysics().AddRect(Game.GetWindowWidth() - 15, Game.GetWindowHeight() / 2, 20, Game.GetWindowHeight(), 0, 0f, 0f, 0f, GameResource.rect_3, "BORDER");

            Game.GetSystemParticles().Dispose();
        }
예제 #2
0
        private void displayMsg()
        {
            if (_entity.Recvlist.Count > 0)
            {
                string UserInfo = "<table width=\"984\" class=\" gridtable\" border=\"0px\" cellpadding=\"0\" cellspacing=\"1\" style=\"background-color:#ccc;\" ><tr><th style=\"width:12%;\" id=\"pic1.1\">寄件日期</th><th style=\"width:10%;\" id=\"pic1.2\">目的地</th><th style=\"width:10%;\" id=\"pic1.3\">收件人</th><th style=\"width:17%;\" id=\"pic1.4\">运单号</th><th style=\"width:11%;\" id=\"pic1.5\">货号</th><th style=\"width:10%;\" id=\"pic1.6\">代收金额</th><th style=\"width:10%;\" id=\"pic1.7\">代扣运费</th><th style=\"width:10%;\" id=\"pic1.8\">手续费</th><th style=\"width:10%;\" id=\"pic1.9\">实际应付</th></tr>";

                for (int i = (_pageIndex - 1) * MaxitemNum; i < _entity.Recvlist.Count && i < MaxitemNum; i++)
                {
                    InfoBody body = _entity.Recvlist[i];
                    string   backgroundcolor;
                    string   temp = "<tr id=\"{0}\" name=\"info\" style=\"background-color: {1};\" align=\"center\" valign=\"middle\"><td style=\"height: 40px\">{2}</td><td style=\"height: 40px\">{3}</td><td style=\"height: 40px\">{4}</td><td style=\" color:#279b2c; height: 40px\">{5}</td><td style=\"height: 40px\">{6}</td><td style=\"height: 40px\" >{7}</td><td style=\" color:#2f41af; height: 40px\">{8}</td><td style=\" color:#2f41af; height: 40px\">{9}</td><td style=\" color:#f00; height: 40px\">{10}</td></tr>";

                    if (i % 2 == 0)
                    {
                        backgroundcolor = "white";
                    }
                    else
                    {
                        backgroundcolor = "#eee";
                    }

                    temp = string.Format(temp, i, backgroundcolor, DealDate(body.SendDate), body.Destination, body.Recipient, body.WayBill, body.ArticleNum, DealCash(body.CollectAmt), DealCash(body.ShipWithholding), DealCash(body.Fee), DealCash(body.ActualCope));

                    UserInfo += temp;
                }
                UserInfo += "</table>";

                GetElementById("userinfo").InnerHtml  = UserInfo;
                GetElementById("pageIndex").InnerText = _pageIndex.ToString();//设置页码
                GetElementById("pageCount").InnerText = _pageCount.ToString();
            }
            else
            {
                StartActivity("管理设置通用错误提示");
            }
        }
예제 #3
0
 public LogicFoe(IGame game, InfoBody body, InfoBody ball)
 {
     this.game = game;
     this.body = body;
     this.ball = ball;
 }
예제 #4
0
        public override void Resume()
        {
            // Initialize particle parameters
            partParams    = new GSystemParticles.ParticleParameters[1];
            partParams[0] = new GSystemParticles.ParticleParameters()
            {
                Type   = GSystemParticles.TypeParticle.Circle,
                Color  = Color.DarkTurquoise,
                TTL    = 100,
                radius = 10
            };

            // Initialize Physics
            Game.GetPhysics().Initialize(-1000, -1000, 1000, 1000, 0, 0, false);
            Game.GetPhysics().GetSolver().onAdd += ScreenGame_onAdd;

            // Create circles
            InfoBody foeBody = Game.GetPhysics().AddCircle(Game.GetWindowWidth() / 2, 100, 50, 0, 1f, 1f, 1f, GameResource.circle_3, "I");

            myBody   = Game.GetPhysics().AddCircle(Game.GetWindowWidth() / 2, Game.GetWindowHeight() - 100, 50, 0, 1f, 1f, 1f, GameResource.circle_1, "FOE");
            ballBody = Game.GetPhysics().AddCircle(Game.GetWindowWidth() / 2, Game.GetWindowHeight() / 2 + 40, 30, 0, 1f, 1f, 1f, GameResource.circle_2, "BALL");
            LFoe     = new LogicFoe(Game, foeBody, ballBody);

            // Create borders
            Game.GetPhysics().AddRect(0, Game.GetWindowHeight() / 2, 20, Game.GetWindowHeight(), 0, 0f, 0f, 0f, GameResource.rect_3, "BORDER");
            Game.GetPhysics().AddRect(Game.GetWindowWidth() - 15, Game.GetWindowHeight() / 2, 20, Game.GetWindowHeight(), 0, 0f, 0f, 0f, GameResource.rect_3, "BORDER");

            // Decor
            image_line = new GImage(Game);
            image_line.SetImage(GameResource.rect_1);
            image_line.SetX(Game.GetWindowWidth() / 2);
            image_line.SetY(Game.GetWindowHeight() / 2);
            image_line.SetWidth(Game.GetWindowWidth());
            image_line.SetHeight(10);

            // Create intent to menu
            Intent intent_to_menu = new Intent(Game);

            intent_to_menu.SetScreenLoading(null);

            // Create top panel
            topPanel = new GTopPanel(Game);
            topPanel.ClearBalls();
            topPanel.onCommand += (cmd) =>
            {
                switch (cmd)
                {
                case GTopPanel.CommandTopPanel.menu:
                    intent_to_menu.screenFrom = this;
                    intent_to_menu.screenTo   = new ScreenMenu(Game);
                    intent_to_menu.Start();
                    break;

                case GTopPanel.CommandTopPanel.play:
                    IsPause = false;
                    break;

                case GTopPanel.CommandTopPanel.pause:
                    IsPause = true;
                    break;
                }
            };
            AddElement(topPanel);
        }