Ejemplo n.º 1
0
        // Token: 0x060006E0 RID: 1760 RVA: 0x0005C1C4 File Offset: 0x0005A3C4
        public static void checkRMS()
        {
            MyVector myVector = new MyVector();

            sbyte[] array = Rms.loadRMS("ImageSource");
            if (array == null)
            {
                Service.gI().imageSource(myVector);
                return;
            }
            ImageSource.vRms = new MyVector();
            DataInputStream dataInputStream = new DataInputStream(array);

            if (dataInputStream == null)
            {
                return;
            }
            try
            {
                short    num    = dataInputStream.readShort();
                string[] array2 = new string[(int)num];
                sbyte[]  array3 = new sbyte[(int)num];
                for (int i = 0; i < (int)num; i++)
                {
                    array2[i] = dataInputStream.readUTF();
                    array3[i] = dataInputStream.readByte();
                    ImageSource.vRms.addElement(new ImageSource(array2[i], array3[i]));
                }
                dataInputStream.close();
            }
            catch (Exception ex)
            {
                ex.StackTrace.ToString();
            }
            Res.outz(string.Concat(new object[]
            {
                "vS size= ",
                ImageSource.vSource.size(),
                " vRMS size= ",
                ImageSource.vRms.size()
            }));
            for (int j = 0; j < ImageSource.vSource.size(); j++)
            {
                ImageSource imageSource = (ImageSource)ImageSource.vSource.elementAt(j);
                if (!ImageSource.isExistID(imageSource.id))
                {
                    myVector.addElement(imageSource);
                }
            }
            for (int k = 0; k < ImageSource.vRms.size(); k++)
            {
                ImageSource imageSource2 = (ImageSource)ImageSource.vRms.elementAt(k);
                if ((int)ImageSource.getVersionRMSByID(imageSource2.id) != (int)ImageSource.getCurrVersionByID(imageSource2.id))
                {
                    myVector.addElement(imageSource2);
                }
            }
            Service.gI().imageSource(myVector);
        }
Ejemplo n.º 2
0
        // Token: 0x0600084B RID: 2123 RVA: 0x0007A554 File Offset: 0x00078754
        protected void doSelectServer()
        {
            MyVector myVector = new MyVector("vServer");

            if (RegisterScreen.isLocal)
            {
                myVector.addElement(new Command("Server LOCAL", this, 20004, null));
            }
            myVector.addElement(new Command("Server Bokken", this, 20001, null));
            myVector.addElement(new Command("Server Shuriken", this, 20002, null));
            myVector.addElement(new Command("Server Tessen (mới)", this, 20003, null));
            GameCanvas.menu.startAt(myVector, 0);
            if (this.loadIndexServer() != -1 && !GameCanvas.isTouch)
            {
                GameCanvas.menu.menuSelectedItem = this.loadIndexServer();
            }
        }
Ejemplo n.º 3
0
    // Token: 0x0600070A RID: 1802 RVA: 0x0005D6A0 File Offset: 0x0005B8A0
    protected void doMenu()
    {
        MyVector myVector = new MyVector();

        myVector.addElement(new Command(mResources.registerNewAcc, this, 2004, null));
        if (!this.isLogin2)
        {
            myVector.addElement(new Command(mResources.selectServer, this, 1004, null));
        }
        myVector.addElement(new Command(mResources.forgetPass, this, 1003, null));
        myVector.addElement(new Command(mResources.website, this, 1005, null));
        if (Main.isPC)
        {
            myVector.addElement(new Command(mResources.EXIT, GameCanvas.instance, 8885, null));
        }
        GameCanvas.menu.startAt(myVector, 0);
    }
Ejemplo n.º 4
0
    // Token: 0x060001C9 RID: 457 RVA: 0x00010E54 File Offset: 0x0000F054
    public void drawLine(mGraphics g, int x, int y, int xTo, int yTo, int nLine, int color)
    {
        MyVector myVector = new MyVector();

        for (int i = 0; i < nLine; i++)
        {
            myVector.addElement(new mLine(x, y, xTo + i, yTo + i, color));
        }
        g.drawlineGL(myVector);
    }
Ejemplo n.º 5
0
    // Token: 0x0600045B RID: 1115 RVA: 0x00036214 File Offset: 0x00034414
    public static string[] split(string original, string separator)
    {
        MyVector myVector = new MyVector();

        for (int i = original.IndexOf(separator); i >= 0; i = original.IndexOf(separator))
        {
            myVector.addElement(original.Substring(0, i));
            original = original.Substring(i + separator.Length);
        }
        myVector.addElement(original);
        string[] array = new string[myVector.size()];
        if (myVector.size() > 0)
        {
            for (int j = 0; j < myVector.size(); j++)
            {
                array[j] = (string)myVector.elementAt(j);
            }
        }
        return(array);
    }
Ejemplo n.º 6
0
    // Token: 0x06000183 RID: 387 RVA: 0x0000E654 File Offset: 0x0000C854
    public MyVector splitFontVector(string src, int lineWidth)
    {
        MyVector myVector = new MyVector();
        string   text     = string.Empty;

        for (int i = 0; i < src.Length; i++)
        {
            if (src[i] == '\n' || src[i] == '\b')
            {
                myVector.addElement(text);
                text = string.Empty;
            }
            else
            {
                text += src[i];
                if (this.getWidth(text) > lineWidth)
                {
                    int j;
                    for (j = text.Length - 1; j >= 0; j--)
                    {
                        if (text[j] == ' ')
                        {
                            break;
                        }
                    }
                    if (j < 0)
                    {
                        j = text.Length - 1;
                    }
                    myVector.addElement(text.Substring(0, j));
                    i    = i - (text.Length - j) + 1;
                    text = string.Empty;
                }
                if (i == src.Length - 1 && !text.Trim().Equals(string.Empty))
                {
                    myVector.addElement(text);
                }
            }
        }
        return(myVector);
    }
Ejemplo n.º 7
0
        // Token: 0x06000847 RID: 2119 RVA: 0x0007A1A4 File Offset: 0x000783A4
        protected void doMenu()
        {
            MyVector myVector = new MyVector("vMenu Login");

            myVector.addElement(new Command(mResources.registerNewAcc, this, 2004, null));
            if (!this.isLogin2)
            {
                myVector.addElement(new Command(mResources.selectServer, this, 1004, null));
            }
            myVector.addElement(new Command(mResources.forgetPass, this, 1003, null));
            myVector.addElement(new Command(mResources.website, this, 1005, null));
            int num = Rms.loadRMSInt("lowGraphic");

            if (num == 1)
            {
                myVector.addElement(new Command(mResources.increase_vga, this, 10041, null));
            }
            else
            {
                myVector.addElement(new Command(mResources.decrease_vga, this, 10042, null));
            }
            myVector.addElement(new Command(mResources.EXIT, GameCanvas.instance, 8885, null));
            GameCanvas.menu.startAt(myVector, 0);
        }
Ejemplo n.º 8
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;
        }
    }