コード例 #1
0
 // Token: 0x060008A0 RID: 2208 RVA: 0x0007DB4C File Offset: 0x0007BD4C
 public override void update()
 {
     if (SplashScr.splashScrStat == 30 && !this.isCheckConnect)
     {
         this.isCheckConnect = true;
         if (Rms.loadRMSInt("isPlaySound") != -1)
         {
             GameCanvas.isPlaySound = (Rms.loadRMSInt("isPlaySound") == 1);
         }
         if (GameCanvas.isPlaySound)
         {
             SoundMn.gI().loadSound(TileMap.mapID);
         }
         SoundMn.gI().getStrOption();
         if (Rms.loadRMSInt("svselect") == -1)
         {
             ServerListScreen.loadIP();
         }
         else
         {
             ServerListScreen.loadIP();
         }
     }
     SplashScr.splashScrStat++;
     ServerListScreen.updateDeleteData();
 }
コード例 #2
0
 // Token: 0x0600088F RID: 2191 RVA: 0x0007CFE0 File Offset: 0x0007B1E0
 public override void updateKey()
 {
     if (GameCanvas.isTouch)
     {
         ServerListScreen.updateDeleteData();
         if (this.cmdCallHotline != null && this.cmdCallHotline.isPointerPressInside())
         {
             this.cmdCallHotline.performAction();
         }
         if (!ServerListScreen.loadScreen)
         {
             if (ServerListScreen.cmdDownload != null && ServerListScreen.cmdDownload.isPointerPressInside())
             {
                 ServerListScreen.cmdDownload.performAction();
             }
             base.updateKey();
             return;
         }
         for (int i = 0; i < this.cmd.Length; i++)
         {
             if (this.cmd[i] != null && this.cmd[i].isPointerPressInside())
             {
                 this.cmd[i].performAction();
             }
         }
     }
     else if (ServerListScreen.loadScreen)
     {
         if (GameCanvas.keyPressed[8])
         {
             int num = (mGraphics.zoomLevel <= 1) ? 4 : 2;
             GameCanvas.keyPressed[8] = false;
             ServerListScreen.selected++;
             if (ServerListScreen.selected > num)
             {
                 ServerListScreen.selected = 0;
             }
             this.processInput();
         }
         if (GameCanvas.keyPressed[2])
         {
             int num2 = (mGraphics.zoomLevel <= 1) ? 4 : 2;
             GameCanvas.keyPressed[2] = false;
             ServerListScreen.selected--;
             if (ServerListScreen.selected < 0)
             {
                 ServerListScreen.selected = num2;
             }
             this.processInput();
         }
     }
     if (ServerListScreen.isWait)
     {
         return;
     }
     base.updateKey();
 }
コード例 #3
0
        public void TestVPNConnection()
        {
            // Switch to VPN client session
            this.vpnClient.Session.SwitchTo();
            LandingScreen landingScreen = new LandingScreen(this.vpnClient.Session);

            landingScreen.ClickGetStartedButton();

            // User Sign In via web browser
            UserCommonOperation.UserSignIn(this.vpnClient, this.browser);

            // Main Screen
            this.vpnClient.Session.SwitchTo();
            MainScreen mainScreen = new MainScreen(this.vpnClient.Session);

            mainScreen.ClickServerListButton();

            // Server Screen
            ServerListScreen serverListScreen = new ServerListScreen(this.vpnClient.Session);

            serverListScreen.RandomSelectDifferentCityServer("Miami");
            string prevCity = serverListScreen.GetSelectedCity();

            Console.WriteLine("Before switching: the selected city is {0}", prevCity);

            // User turns on VPN
            UserCommonOperation.ConnectVPN(this.vpnClient, this.desktop);

            // Click the server button
            mainScreen = new MainScreen(this.vpnClient.Session);
            mainScreen.ClickServerListButton();

            // Select a random US server
            serverListScreen = new ServerListScreen(this.vpnClient.Session);
            serverListScreen.RandomSelectDifferentCityServer("Atlanta");
            string currentCity = serverListScreen.GetSelectedCity();

            Console.WriteLine("After switching: the selected city is {0}", currentCity);

            // Check the subtitle
            Assert.AreEqual(string.Format("From {0} to {1}", prevCity, currentCity), mainScreen.GetSubtitle());

            // Check the windows notification again
            this.desktop.Session.SwitchTo();
            WindowsNotificationScreen windowsNotificationScreen = new WindowsNotificationScreen(this.desktop.Session);

            Assert.AreEqual(string.Format("From {0} to {1}", prevCity, currentCity), windowsNotificationScreen.GetTitleText());
            Assert.AreEqual("You switched servers.", windowsNotificationScreen.GetMessageText());
            windowsNotificationScreen.ClickDismissButton();

            // User turns off VPN
            UserCommonOperation.DisconnectVPN(this.vpnClient, this.desktop);

            // Sign out
            UserCommonOperation.UserSignOut(this.vpnClient);
        }
コード例 #4
0
 // Token: 0x06000889 RID: 2185 RVA: 0x0007C9C0 File Offset: 0x0007ABC0
 public static void getServerList(string str)
 {
     ServerListScreen.lengthServer = new int[3];
     string[] array = Res.split(str.Trim(), ",", 0);
     Res.outz("tem leng= " + array.Length);
     mResources.loadLanguague(sbyte.Parse(array[array.Length - 2]));
     ServerListScreen.nameServer   = new string[array.Length - 2];
     ServerListScreen.address      = new string[array.Length - 2];
     ServerListScreen.port         = new short[array.Length - 2];
     ServerListScreen.language     = new sbyte[array.Length - 2];
     ServerListScreen.hasConnected = new bool[2];
     for (int i = 0; i < array.Length - 2; i++)
     {
         string[] array2 = Res.split(array[i].Trim(), ":", 0);
         ServerListScreen.nameServer[i] = array2[0];
         ServerListScreen.address[i]    = array2[1];
         ServerListScreen.port[i]       = short.Parse(array2[2]);
         ServerListScreen.language[i]   = sbyte.Parse(array2[3].Trim());
         ServerListScreen.lengthServer[(int)ServerListScreen.language[i]]++;
     }
     ServerListScreen.serverPriority = sbyte.Parse(array[array.Length - 1]);
     ServerListScreen.saveIP();
     GameCanvas.endDlg();
 }
コード例 #5
0
    // Token: 0x06000897 RID: 2199 RVA: 0x0007D454 File Offset: 0x0007B654
    public void perform(int idAction, object p)
    {
        Res.outz("perform " + idAction);
        if (idAction == 1000)
        {
            GameCanvas.connect();
        }
        if (idAction == 1 || idAction == 4)
        {
            this.cancel();
        }
        if (idAction == 2)
        {
            ServerListScreen.stopDownload  = false;
            ServerListScreen.cmdDownload   = new Command(mResources.huy, this, 4, null);
            ServerListScreen.cmdDownload.x = GameCanvas.w / 2 - mScreen.cmdW / 2;
            ServerListScreen.cmdDownload.y = GameCanvas.hh + 65;
            this.right = null;
            if (!GameCanvas.isTouch)
            {
                ServerListScreen.cmdDownload.x = GameCanvas.w / 2 - mScreen.cmdW / 2;
                ServerListScreen.cmdDownload.y = GameCanvas.h - mScreen.cmdH - 1;
            }
            this.center = new Command(string.Empty, this, 4, null);
            if (!ServerListScreen.isGetData)
            {
                Service.gI().getResource(1, null);
                if (!GameCanvas.isTouch)
                {
                    ServerListScreen.cmdDownload.isFocus = true;
                    this.center = new Command(string.Empty, this, 4, null);
                }
                ServerListScreen.isGetData = true;
            }
        }
        if (idAction == 3)
        {
            Res.outz("toi day");
            if (GameCanvas.loginScr == null)
            {
                GameCanvas.loginScr = new LoginScr();
            }
            GameCanvas.loginScr.switchToMe();
            bool flag  = Rms.loadRMSString("acc") != null && !Rms.loadRMSString("acc").Equals(string.Empty);
            bool flag2 = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect) != null && !Rms.loadRMSString("userAo" + ServerListScreen.ipSelect).Equals(string.Empty);
            if (!flag && !flag2)
            {
                GameCanvas.connect();
                string text = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect);
                if (text == null || text.Equals(string.Empty))
                {
                    Service.gI().login2(string.Empty);
                }
                else
                {
                    GameCanvas.loginScr.isLogin2 = true;
                    GameCanvas.connect();
                    Service.gI().setClientType();
                    Service.gI().login(text, string.Empty, GameMidlet.VERSION, 1);
                }
                if (Session_ME.connected)
                {
                    GameCanvas.startWaitDlg();
                }
                else
                {
                    GameCanvas.startOKDlg(mResources.maychutathoacmatsong);
                }
            }
            else
            {
                GameCanvas.loginScr.doLogin();
            }
            LoginScr.serverName = ServerListScreen.nameServer[ServerListScreen.ipSelect];
        }
        if (idAction == 10100)
        {
            if (GameCanvas.loginScr == null)
            {
                GameCanvas.loginScr = new LoginScr();
            }
            GameCanvas.loginScr.switchToMe();
            GameCanvas.connect();
            Service.gI().login2(string.Empty);
            Res.outz("tao user ao");
            GameCanvas.startWaitDlg();
            LoginScr.serverName = ServerListScreen.nameServer[ServerListScreen.ipSelect];
        }
        if (idAction == 5)
        {
            ServerListScreen.doUpdateServer();
            if (ServerListScreen.nameServer.Length == 1)
            {
                return;
            }
            MyVector myVector = new MyVector(string.Empty);
            for (int i = 0; i < ServerListScreen.nameServer.Length; i++)
            {
                myVector.addElement(new Command(ServerListScreen.nameServer[i], this, 6, null));
            }
            GameCanvas.menu.startAt(myVector, 0);
            if (!GameCanvas.isTouch)
            {
                GameCanvas.menu.menuSelectedItem = ServerListScreen.ipSelect;
            }
        }
        if (idAction == 6)
        {
            ServerListScreen.ipSelect = GameCanvas.menu.menuSelectedItem;
            this.selectServer();
        }
        if (idAction == 7)
        {
            if (GameCanvas.loginScr == null)
            {
                GameCanvas.loginScr = new LoginScr();
            }
            GameCanvas.loginScr.switchToMe();
        }
        if (idAction == 8)
        {
            bool     flag3     = Rms.loadRMSInt("lowGraphic") == 1;
            MyVector myVector2 = new MyVector("cau hinh");
            myVector2.addElement(new Command(mResources.cauhinhthap, this, 9, null));
            myVector2.addElement(new Command(mResources.cauhinhcao, this, 10, null));
            GameCanvas.menu.startAt(myVector2, 0);
            if (flag3)
            {
                GameCanvas.menu.menuSelectedItem = 0;
            }
            else
            {
                GameCanvas.menu.menuSelectedItem = 1;
            }
        }
        if (idAction == 9)
        {
            Rms.saveRMSInt("lowGraphic", 1);
            GameCanvas.startOK(mResources.plsRestartGame, 8885, null);
        }
        if (idAction == 10)
        {
            Rms.saveRMSInt("lowGraphic", 0);
            GameCanvas.startOK(mResources.plsRestartGame, 8885, null);
        }
        if (idAction == 11)
        {
            if (GameCanvas.loginScr == null)
            {
                GameCanvas.loginScr = new LoginScr();
            }
            GameCanvas.loginScr.switchToMe();
            string text2 = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect);
            if (text2 == null || text2.Equals(string.Empty))
            {
                Service.gI().login2(string.Empty);
            }
            else
            {
                GameCanvas.loginScr.isLogin2 = true;
                GameCanvas.connect();
                Service.gI().setClientType();
                Service.gI().login(text2, string.Empty, GameMidlet.VERSION, 1);
            }
            GameCanvas.startWaitDlg(mResources.PLEASEWAIT);
            Res.outz("tao user ao");
        }
        if (idAction == 12)
        {
            GameMidlet.instance.exit();
        }
        if (idAction == 13 && (!ServerListScreen.isGetData || ServerListScreen.loadScreen))
        {
            switch (mSystem.clientType)
            {
            case 1:
                mSystem.callHotlineJava();
                break;

            case 3:
            case 5:
                mSystem.callHotlineIphone();
                break;

            case 4:
                mSystem.callHotlinePC();
                break;

            case 6:
                mSystem.callHotlineWindowsPhone();
                break;
            }
        }
        if (idAction == 14)
        {
            Command cmdYes = new Command(mResources.YES, GameCanvas.serverScreen, 15, null);
            Command cmdNo  = new Command(mResources.NO, GameCanvas.serverScreen, 16, null);
            GameCanvas.startYesNoDlg(mResources.deletaDataNote, cmdYes, cmdNo);
        }
        if (idAction == 15)
        {
            Rms.clearAll();
            GameCanvas.startOK(mResources.plsRestartGame, 8885, null);
        }
        if (idAction == 16)
        {
            InfoDlg.hide();
            GameCanvas.currentDialog = null;
        }
    }
コード例 #6
0
    // Token: 0x06000884 RID: 2180 RVA: 0x0007C510 File Offset: 0x0007A710
    public ServerListScreen()
    {
        int num = 4;

        if (num * 32 + 23 + 33 >= GameCanvas.w)
        {
            num--;
        }
        this.initCommand();
        if (!GameCanvas.isTouch)
        {
            ServerListScreen.selected = 0;
            this.processInput();
        }
        GameScr.loadCamera(true, -1, -1);
        GameScr.cmx = 100;
        GameScr.cmy = 200;
        if (this.cmdCallHotline == null)
        {
            this.cmdCallHotline   = new Command("Gọi hotline", this, 13, null);
            this.cmdCallHotline.x = GameCanvas.w - 75;
            if (mSystem.clientType == 1 && !GameCanvas.isTouch)
            {
                this.cmdCallHotline.y = GameCanvas.h - 20;
            }
            else
            {
                int num2 = 2;
                this.cmdCallHotline.y = num2 + 6;
            }
        }
        ServerListScreen.cmdUpdateServer            = new Command();
        ServerListScreen.cmdUpdateServer.actionChat = delegate(string str)
        {
            string text  = str;
            string text2 = str;
            if (text == null)
            {
                text = ServerListScreen.linkDefault;
                return;
            }
            if (text == null && text2 != null)
            {
                if (text2.Equals(string.Empty) || text2.Length < 20)
                {
                    text2 = ServerListScreen.linkDefault;
                }
                ServerListScreen.getServerList(text2);
            }
            if (text != null && text2 == null)
            {
                if (text.Equals(string.Empty) || text.Length < 20)
                {
                    text = ServerListScreen.linkDefault;
                }
                ServerListScreen.getServerList(text);
            }
            if (text != null && text2 != null)
            {
                if (text.Length > text2.Length)
                {
                    ServerListScreen.getServerList(text);
                    return;
                }
                ServerListScreen.getServerList(text2);
            }
        };
        if (mSystem.clientType == 1)
        {
            ServerListScreen.linkDefault = "Vũ trụ 1:112.213.94.23:14445:0,Vũ trụ 2:210.211.109.199:14445:0,Vũ trụ 3:112.213.85.88:14445:0,Vũ trụ 4:27.0.12.164:14445:0,Vũ trụ 5:27.0.12.16:14445:0,Vũ trụ 6:27.0.12.173:14445:0,Vũ trụ 7:112.213.94.223:14445:0,Vũ trụ 8:112.213.94.223:14445:0,Võ đài liên vũ trụ:27.0.12.173:20000:0,Universe 1:54.179.255.27:14445:1,0,5";
            return;
        }
        ServerListScreen.linkDefault = "Vũ trụ 1:dragon1.teamobi.com:14445:0,Vũ trụ 2:dragon2.teamobi.com:14445:0,Vũ trụ 3:dragon3.teamobi.com:14445:0,Vũ trụ 4:dragon4.teamobi.com:14445:0,Vũ trụ 5:dragon5.teamobi.com:14445:0,Vũ trụ 6:dragon6.teamobi.com:14445:0,Vũ trụ 7:dragon7.teamobi.com:14445:0,Vũ trụ 8:dragon8.teamobi.com:14445:0,Võ đài liên vũ trụ:dragonwar.teamobi.com:20000:0,Universe 1:dragon.indonaga.com:14445:1,0,5";
    }
コード例 #7
0
 // Token: 0x06000892 RID: 2194 RVA: 0x0000711A File Offset: 0x0000531A
 public static void loadIP()
 {
     ServerListScreen.getServerList(ServerListScreen.linkDefault);
 }
コード例 #8
0
        // Token: 0x0600085A RID: 2138 RVA: 0x0007B670 File Offset: 0x00079870
        public void perform(int idAction, object p)
        {
            switch (idAction)
            {
            case 2000:
                break;

            case 2001:
                if (this.isCheck)
                {
                    this.isCheck = false;
                }
                else
                {
                    this.isCheck = true;
                }
                break;

            case 2002:
                this.doRegister();
                break;

            case 2003:
                this.doMenu();
                break;

            case 2004:
                this.actRegister();
                break;

            default:
                switch (idAction)
                {
                case 1000:
                    try
                    {
                        GameMidlet.instance.platformRequest((string)p);
                    }
                    catch (Exception ex)
                    {
                        ex.StackTrace.ToString();
                    }
                    GameCanvas.endDlg();
                    break;

                case 1001:
                    GameCanvas.endDlg();
                    this.isRes = false;
                    break;

                case 1002:
                    break;

                case 1003:
                    Session_ME.gI().close();
                    GameCanvas.serverScreen.switchToMe();
                    break;

                case 1004:
                    ServerListScreen.doUpdateServer();
                    GameCanvas.serverScreen.switchToMe();
                    break;

                case 1005:
                    try
                    {
                        GameMidlet.instance.platformRequest("http://ngocrongonline.com");
                    }
                    catch (Exception ex2)
                    {
                        ex2.StackTrace.ToString();
                    }
                    break;

                default:
                    if (idAction != 10041)
                    {
                        if (idAction != 10042)
                        {
                            if (idAction != 4000)
                            {
                                if (idAction == 10021)
                                {
                                    this.actRegisterLeft();
                                }
                            }
                            else
                            {
                                this.doRegister(this.tfUser.getText());
                            }
                        }
                    }
                    break;
                }
                break;

            case 2008:
                if (this.tfNgay.getText().Equals(string.Empty) || this.tfThang.getText().Equals(string.Empty) || this.tfNam.getText().Equals(string.Empty) || this.tfDiachi.getText().Equals(string.Empty) || this.tfCMND.getText().Equals(string.Empty) || this.tfNgayCap.getText().Equals(string.Empty) || this.tfNoiCap.getText().Equals(string.Empty) || this.tfSodt.getText().Equals(string.Empty) || this.tfUser.getText().Equals(string.Empty))
                {
                    GameCanvas.startOKDlg("Vui lòng điền đầy đủ thông tin");
                }
                else
                {
                    GameCanvas.startOKDlg(mResources.PLEASEWAIT);
                    Service.gI().charInfo(this.tfNgay.getText(), this.tfThang.getText(), this.tfNam.getText(), this.tfDiachi.getText(), this.tfCMND.getText(), this.tfNgayCap.getText(), this.tfNoiCap.getText(), this.tfSodt.getText(), this.tfUser.getText());
                }
                break;
            }
        }
コード例 #9
0
    // Token: 0x0600071B RID: 1819 RVA: 0x0005EA54 File Offset: 0x0005CC54
    public void perform(int idAction, object p)
    {
        switch (idAction)
        {
        case 2000:
            break;

        case 2001:
            if (this.isCheck)
            {
                this.isCheck = false;
            }
            else
            {
                this.isCheck = true;
            }
            break;

        case 2002:
            this.doRegister();
            break;

        case 2003:
            this.doMenu();
            break;

        case 2004:
            this.actRegister();
            break;

        default:
            switch (idAction)
            {
            case 1000:
                try
                {
                    GameMidlet.instance.platformRequest((string)p);
                }
                catch (Exception ex)
                {
                }
                GameCanvas.endDlg();
                break;

            case 1001:
                GameCanvas.endDlg();
                this.isRes = false;
                break;

            case 1002:
            {
                GameCanvas.startWaitDlg();
                string text = Rms.loadRMSString("userAo" + ServerListScreen.ipSelect);
                if (text == null || text.Equals(string.Empty))
                {
                    Service.gI().login2(string.Empty);
                }
                else
                {
                    GameCanvas.loginScr.isLogin2 = true;
                    GameCanvas.connect();
                    Service.gI().setClientType();
                    Service.gI().login(text, string.Empty, GameMidlet.VERSION, 1);
                }
                break;
            }

            case 1003:
                GameCanvas.startOKDlg(mResources.goToWebForPassword);
                break;

            case 1004:
                ServerListScreen.doUpdateServer();
                GameCanvas.serverScreen.switchToMe();
                break;

            case 1005:
                try
                {
                    GameMidlet.instance.platformRequest("http://ngocrongonline.com");
                }
                catch (Exception ex2)
                {
                }
                break;

            default:
                if (idAction != 10041)
                {
                    if (idAction != 10042)
                    {
                        if (idAction != 13)
                        {
                            if (idAction != 4000)
                            {
                                if (idAction == 10021)
                                {
                                    this.actRegisterLeft();
                                }
                            }
                            else
                            {
                                this.doRegister(this.tfUser.getText());
                            }
                        }
                        else
                        {
                            switch (mSystem.clientType)
                            {
                            case 1:
                                mSystem.callHotlineJava();
                                break;

                            case 3:
                            case 5:
                                mSystem.callHotlineIphone();
                                break;

                            case 4:
                                mSystem.callHotlinePC();
                                break;

                            case 6:
                                mSystem.callHotlineWindowsPhone();
                                break;
                            }
                        }
                    }
                    else
                    {
                        Rms.saveRMSInt("lowGraphic", 1);
                        GameCanvas.startOK(mResources.plsRestartGame, 8885, null);
                    }
                }
                else
                {
                    Rms.saveRMSInt("lowGraphic", 0);
                    GameCanvas.startOK(mResources.plsRestartGame, 8885, null);
                }
                break;
            }
            break;

        case 2008:
            Rms.saveRMSString("acc", this.tfUser.getText().Trim());
            Rms.saveRMSString("pass", this.tfPass.getText().Trim());
            if (ServerListScreen.loadScreen)
            {
                GameCanvas.serverScreen.switchToMe();
            }
            else
            {
                GameCanvas.serverScreen.show2();
            }
            break;
        }
    }