⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mobiledict.java

📁 MobileDict
💻 JAVA
字号:
// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 

package mobiledict;

import com.siemens.mp.io.File;
import java.io.IOException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

// Referenced classes of package mobiledict:
//            a, b, e

public class MobileDict extends MIDlet
    implements CommandListener
{

    public MobileDict()
    {
        a = false;
        f = 0;
        _fldcase = 1;
    }

    public static void a(String as[])
    {
        MobileDict mobiledict = new MobileDict();
        mobiledict.startApp();
    }

    protected void startApp()
    {
        _mthfor();
        j.a(f);
        c = Display.getDisplay(this);
        _fldfor = new Form(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(j.m)))).append(" ").append(j._fldnull))));
        _fldfor.append(j._fldfor);
        c.setCurrent(_fldfor);
        a();
        _fldif = new a();
        _mthdo();
    }

    protected void pauseApp()
    {
    }

    protected void destroyApp(boolean flag)
    {
        c.setCurrent(null);
        notifyDestroyed();
    }

    public void _mthif()
    {
        destroyApp(true);
    }

    public void commandAction(Command command, Displayable displayable)
    {
        if(command == _fldelse)
        {
            if(!b)
            {
                f = (byte)_fldnew.getSelectedIndex();
                _fldcase = (byte)(_fldint.isSelected(0) ? 1 : 0);
                File file = new File();
                try
                {
                    int k1 = file.open("language");
                    byte abyte0[] = new byte[2];
                    abyte0[0] = f;
                    abyte0[1] = _fldcase;
                    file.write(k1, abyte0, 0, 2);
                    file.close(k1);
                }
                catch(IOException ioexception) { }
                j.a(f);
            }
            _mthdo();
        } else
        if(command == _fldbyte[0])
        {
            _fldif.a(h, g, _fldvoid, _fldtry, _fldnull, _fldlong, _fldchar, e);
            _fldif.a(c, this);
        } else
        if(command == _fldbyte[1])
            _mthif();
        else
        if(command == _fldbyte[2])
        {
            b = true;
            for(int k = _fldfor.size() - 1; k >= 0; k--)
                _fldfor.delete(k);

            _fldfor.setTitle(j._flddo);
            _fldfor.append(j._fldgoto);
            for(int l = 0; l < _fldbyte.length; l++)
                _fldfor.removeCommand(_fldbyte[l]);

            _fldelse = new Command(j._fldchar, 4, 0);
            _fldfor.addCommand(_fldelse);
        } else
        {
            b = false;
            for(int i1 = _fldfor.size() - 1; i1 >= 0; i1--)
                _fldfor.delete(i1);

            String as[] = {
                j._fldlong
            };
            String as1[] = {
                "\u7B80\u4F53\u4E2D\u6587", "\u7E41\u9AD4\u4E2D\u6587", "English"
            };
            _fldnew = new ChoiceGroup(j._fldvoid, 1, as1, null);
            _fldint = new ChoiceGroup(j._fldif, 2, as, null);
            _fldnew.setSelectedIndex(f, true);
            _fldint.setSelectedIndex(0, _fldcase == 1);
            _fldfor.setTitle(j.d);
            _fldfor.append(_fldint);
            _fldfor.append(_fldnew);
            for(int j1 = 0; j1 < _fldbyte.length; j1++)
                _fldfor.removeCommand(_fldbyte[j1]);

            _fldelse = new Command(j._fldchar, 4, 0);
            _fldfor.addCommand(_fldelse);
        }
    }

    private void _mthdo()
    {
        for(int k = _fldfor.size() - 1; k >= 0; k--)
            _fldfor.delete(k);

        String s;
        if(d.equals(""))
            s = j.e;
        else
            s = d;
        String s1;
        if(_flddo.equals(""))
            s1 = j.e;
        else
            s1 = _flddo;
        _fldfor.setTitle(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(j.m)))).append(" ").append(j._fldnull))));
        _fldfor.append(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(j.h)))).append(s).append(" (").append(j.i).append(_fldgoto).append(")\n").append(j.q).append(s1).append(" (").append(j.i).append(i).append(")\n").append(j._fldbyte))));
        _fldfor.removeCommand(_fldelse);
        _fldbyte[0] = new Command(j.f, 4, 0);
        _fldbyte[1] = new Command(j.a, 6, 1);
        _fldbyte[2] = new Command(j._flddo, 4, 2);
        _fldbyte[3] = new Command(j.d, 4, 3);
        for(int l = 0; l < _fldbyte.length; l++)
            _fldfor.addCommand(_fldbyte[l]);

        c.setCurrent(_fldfor);
        _fldfor.setCommandListener(this);
    }

    private void _mthfor()
    {
        File file = new File();
        try
        {
            int k = file.open("language");
            byte abyte0[] = new byte[2];
            int l = file.read(k, abyte0, 0, 2);
            if(l >= 1)
                f = abyte0[0];
            if(l >= 2)
                _fldcase = abyte0[1];
            file.close(k);
        }
        catch(IOException ioexception) { }
    }

    private void a()
    {
        d = "";
        _fldgoto = 0;
        _flddo = "";
        i = 0;
        byte abyte0[] = new byte[48];
        File file = new File();
        try
        {
            if(File.exists("dict") >= 0)
            {
                int k2 = file.open("dict");
                file.read(k2, abyte0, 0, 16);
                h = abyte0[0];
                if(h < 0)
                    h += 256;
                int k = abyte0[1];
                if(k < 0)
                    k += 256;
                h += k * 256;
                k = abyte0[2];
                if(k < 0)
                    k += 256;
                h += k * 0x10000;
                k = abyte0[3];
                if(k < 0)
                    k += 256;
                h += k * 0x1000000;
                g = abyte0[4];
                if(g < 0)
                    g += 256;
                k = abyte0[5];
                if(k < 0)
                    k += 256;
                g += k * 256;
                k = abyte0[6];
                if(k < 0)
                    k += 256;
                g += k * 0x10000;
                k = abyte0[7];
                if(k < 0)
                    k += 256;
                g += k * 0x1000000;
                _fldvoid = abyte0[8];
                if(_fldvoid < 0)
                {
                    _fldvoid += 128;
                    a = true;
                    j._fldcase = "Big5";
                }
                int i3 = _fldvoid & 0x40;
                _fldvoid &= 0x3f;
                _fldtry = (g - h) / _fldvoid;
                _fldgoto = abyte0[9];
                if(_fldgoto < 0)
                    _fldgoto += 256;
                k = abyte0[10];
                if(k < 0)
                    k += 256;
                _fldgoto += k * 256;
                k = abyte0[11];
                if(k < 0)
                    k += 256;
                _fldgoto += k * 0x10000;
                k = abyte0[12];
                if(k < 0)
                    k += 256;
                _fldgoto += k * 0x1000000;
                file.read(k2, abyte0, 0, 48);
                int i1;
                if(i3 == 0)
                    for(i1 = 0; i1 < 48 && abyte0[i1] != 0; i1++);
                else
                    for(i1 = 0; i1 < 48 && (abyte0[i1] != 0 || abyte0[i1 + 1] != 0); i1 += 2);
                int i2 = i1;
                byte abyte1[] = new byte[i2];
                for(int j1 = 0; j1 < i2; j1++)
                    abyte1[j1] = abyte0[j1];

                if(i3 == 0)
                    d = new String(abyte1, j._fldcase);
                else
                    d = e.a(abyte1);
                d.trim();
                d = e._mthfor(d);
                file.close(k2);
            }
            if(File.exists("cdict") >= 0)
            {
                int l2 = file.open("cdict");
                file.read(l2, abyte0, 0, 16);
                _fldnull = abyte0[0];
                if(_fldnull < 0)
                    _fldnull += 256;
                int l = abyte0[1];
                if(l < 0)
                    l += 256;
                _fldnull += l * 256;
                l = abyte0[2];
                if(l < 0)
                    l += 256;
                _fldnull += l * 0x10000;
                l = abyte0[3];
                if(l < 0)
                    l += 256;
                _fldnull += l * 0x1000000;
                _fldlong = abyte0[4];
                if(_fldlong < 0)
                    _fldlong += 256;
                l = abyte0[5];
                if(l < 0)
                    l += 256;
                _fldlong += l * 256;
                l = abyte0[6];
                if(l < 0)
                    l += 256;
                _fldlong += l * 0x10000;
                l = abyte0[7];
                if(l < 0)
                    l += 256;
                _fldlong += l * 0x1000000;
                _fldchar = abyte0[8];
                int j3 = _fldchar & 0x40;
                _fldchar &= 0x3f;
                e = (_fldlong - _fldnull) / _fldchar;
                i = abyte0[9];
                if(i < 0)
                    i += 256;
                l = abyte0[10];
                if(l < 0)
                    l += 256;
                i += l * 256;
                l = abyte0[11];
                if(l < 0)
                    l += 256;
                i += l * 0x10000;
                l = abyte0[12];
                if(l < 0)
                    l += 256;
                i += l * 0x1000000;
                file.read(l2, abyte0, 0, 48);
                int k1;
                if(j3 == 0)
                    for(k1 = 0; k1 < 48 && abyte0[k1] != 0; k1++);
                else
                    for(k1 = 0; k1 < 48 && (abyte0[k1] != 0 || abyte0[k1 + 1] != 0); k1 += 2);
                int j2 = k1;
                byte abyte2[] = new byte[j2];
                for(int l1 = 0; l1 < j2; l1++)
                    abyte2[l1] = abyte0[l1];

                if(j3 == 0)
                    _flddo = new String(abyte2, "GB2312");
                else
                    _flddo = e.a(abyte2);
                _flddo.trim();
                _flddo = e._mthfor(_flddo);
                file.close(l2);
            }
        }
        catch(IOException ioexception) { }
    }

    static b j = new b();
    public static boolean a;
    public static byte _fldcase;
    private static a _fldif;
    private static Display c;
    private static byte f;
    private static String d;
    private static String _flddo;
    private static int _fldgoto;
    private static int i;
    private static int h;
    private static int g;
    private static int _fldvoid;
    private static int _fldtry;
    private static int _fldnull;
    private static int _fldlong;
    private static int _fldchar;
    private static int e;
    private static Form _fldfor;
    private static ChoiceGroup _fldint;
    private static ChoiceGroup _fldnew;
    private static Command _fldbyte[] = new Command[4];
    private static Command _fldelse;
    private static boolean b;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -