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

📄 mainmenulist.java

📁 经过反编译和部分代码修改后的ultraimpro java源代码。可在netbean环境下成功编译。供学习和分析用。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov  Date: 2006-5-1 19:31:40
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 

import java.io.InputStream;
import java.util.Hashtable;
import java.util.Vector;
import javax.microedition.lcdui.*;
import javax.microedition.media.Manager;
import javax.microedition.media.Player;
import javax.microedition.rms.*;

public final class MainMenuList extends List
    implements CommandListener, an
{

    public MainMenuList()
    {
        super("UltraIM Pro", 3);
        strSoftLicense = null;
        strAccntName = null;
        strAccntPswd = null;
        h_java_lang_String_fld = null;
        strMsnServerDomainName = null;
        strMsnServerPort = null;
        iSignStateIndex = 0;
        a_int_fld = 0;
        b_int_fld = 0;
        i_int_fld = 0;
        c_int_fld = 0;
        d_int_fld = 0;
        e_int_fld = 0;
        f_int_fld = 0;
        strSignPara = null;
        strLastAccntName = null;
        e_java_lang_String_fld = null;
        f_java_lang_String_fld = null;
        addCommand(UltraIMPro.i_CommandOpen);
        addCommand(UltraIMPro.s_CommandHelp);
        addCommand(UltraIMPro.t_CommandAbout);
        addCommand(UltraIMPro.a_CommandExit);
        setCommandListener(this);
        setSelectCommand(UltraIMPro.i_CommandOpen);
        setFitPolicy(2);
        bj.j = 0;
    }

    public static final MainMenuList GetObject()
    {
        if(a_ap_static_fld == null)
            a_ap_static_fld = new MainMenuList();
        return a_ap_static_fld;
    }

    public static final void Destroy()
    {
        if(a_ap_static_fld != null)
            a_ap_static_fld = null;
        a_java_util_Vector_static_fld = null;
    }

    public final void ShowMenuBeforeLogin(InitialForm a1)
    {
        RecordStore recordstore;
        g_int_static_fld = 0;
        recordstore = null;
        Object obj = null;
        try
        {
        recordstore = RecordStore.openRecordStore("UltraIMP", false);
        strSoftLicense = new String(recordstore.getRecord(1));
        //if(strSoftLicense.equals("trial"))
        if(false)
            a_java_util_Vector_static_fld = new Vector();
        else
            a_java_util_Vector_static_fld = null;
        byte abyte0[];
        String s1;
        if((abyte0 = recordstore.getRecord(4)) != null && abyte0.length > 0 && !(s1 = new String(abyte0)).equals("*"))
            strAccntName = s1;
        if((abyte0 = recordstore.getRecord(5)) != null && abyte0.length > 0 && !(s1 = new String(abyte0)).equals("*"))
            strAccntPswd = s1;
        if((abyte0 = recordstore.getRecord(6)) != null && abyte0.length > 0 && !(s1 = new String(abyte0)).equals("*"))
            h_java_lang_String_fld = s1;
        if((abyte0 = recordstore.getRecord(7)) != null && abyte0.length > 0 && !(s1 = new String(abyte0)).equals("*"))
            strMsnServerDomainName = s1;
        if((abyte0 = recordstore.getRecord(8)) != null && abyte0.length > 0 && !(s1 = new String(abyte0)).equals("*"))
            strMsnServerPort = s1;
        if((abyte0 = recordstore.getRecord(10)) != null && abyte0.length > 0 && !(s1 = new String(abyte0)).equals("*"))
            f_int_fld = Integer.parseInt(s1.substring(0, s1.indexOf(';')));
        if((abyte0 = recordstore.getRecord(11)) != null && abyte0.length > 0)
        {
            i_int_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            i_int_fld = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(11, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(12)) != null && abyte0.length > 0)
        {
            iSignStateIndex = Integer.parseInt(new String(abyte0));
        } else
        {
            iSignStateIndex = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(12, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(13)) != null && abyte0.length > 0)
        {
            a_int_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            a_int_fld = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(13, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(14)) != null && abyte0.length > 0)
        {
            b_int_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            b_int_fld = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(14, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(15)) != null && abyte0.length > 0)
        {
            bj.j = Integer.parseInt(new String(abyte0));
        } else
        {
            bj.j = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(15, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(16)) != null && abyte0.length > 0)
        {
            ConnectionManage_ag.a_int_static_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            ConnectionManage_ag.a_int_static_fld = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(16, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(17)) != null && abyte0.length > 0)
        {
            c_int_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            c_int_fld = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(17, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(18)) != null && abyte0.length > 0)
        {
            d_int_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            d_int_fld = 0;
            abyte0 = "0".getBytes();
            recordstore.setRecord(18, abyte0, 0, abyte0.length);
        }
        if((abyte0 = recordstore.getRecord(19)) != null && abyte0.length > 0)
        {
            e_int_fld = Integer.parseInt(new String(abyte0));
        } else
        {
            e_int_fld = 0;
            byte abyte1[] = "0".getBytes();
            recordstore.setRecord(19, abyte1, 0, abyte1.length);
        }
        Close(recordstore);
        }
        catch (Exception _ex)
        {
        //break MISSING_BLOCK_LABEL_843;
        //JVM INSTR pop ;
        strAccntName = null;
        strAccntPswd = null;
        Close(recordstore);
        }
        //break MISSING_BLOCK_LABEL_843;
        //Exception exception;
        //exception;
        //Close(recordstore);
        //throw exception;
        
        
        InitRecordData();
        append("Connect", w.a_javax_microedition_lcdui_Image_static_fld);
        append(AddAcntPrompt(strAccntName), w.b);
        Object aobj[] = GetSignInStatePrompt(iSignStateIndex);
        append((String)aobj[0], (Image)aobj[1]);
        append("Configurations", w.c);
        append("Chat History", w.j);
        if((f_int_fld & 1) == 1)
            append("Photo Album", w.m);
        //if(strSoftLicense.equals("trial"))
        if(false)
            append("Register", w.d);

        return;
    }

    public final String AddAcntPrompt(String s1)
    {
        String s2;
        if((s2 = s1) == null || s2.length() == 0)
            s2 = "none";
        return "Acnt.: " + s2;
    }

    public final Object[] GetSignInStatePrompt(int l)
    {
        Object aobj[] = new Object[2];
        String s1;
        String s2 = PresenceStringHash_az.GetUserStateDescriptor(s1 = PresenceStringHash_az.GetUserStateTypeStringArray()[l]);
        aobj[0] = "Sign in as: " + s2;
        aobj[1] = w.a_java_util_Hashtable_static_fld.get(s1); // get icon
        return aobj;
    }

    public final int a_mod_toi()
    {
        return ConnectionManage_ag.a_int_static_fld;
    }

    public final void commandAction(Command command, Displayable displayable)
    {
        if(command == UltraIMPro.a_CommandExit)
        {
            i();
            return;
        }
        if(command == UltraIMPro.i_CommandOpen)
        {
            int l;
            switch(l = getSelectedIndex())
            {
            case 0: // '\0' // connect
                MenuConnect();
                break;

            case 1: // '\001'
                d();
                break;

            case 2: // '\002'
                e();
                break;

            case 3: // '\003'
                f();
                break;

            case 4: // '\004'
                a(this, 1, ((bd) (null)));
                break;

            case 5: // '\005'
                a(this, 2, ((bd) (null)));
                break;

            case 6: // '\006'
                a_Resetup(this);
                break;
            }
            return;
        }
        if(command == UltraIMPro.s_CommandHelp)
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, null, 1));
            return;
        }
        if(command == UltraIMPro.t_CommandAbout)
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, null, 2));
    }

    public final void MenuConnect()
    {
        if(strAccntName == null || strAccntName.length() == 0 || strAccntPswd == null || strAccntPswd.length() == 0)
        {
            SignAddrAndPswdForm bh1 = new SignAddrAndPswdForm(this, 0);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(bh1);
            return;
        }
        if(h_java_lang_String_fld == null)
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, null, 3));
            return;
        } else
        {
            SignInWithAccnt();
            return;
        }
    }

    public final void SignInWithAccnt()
    {
        ConnGaugeDisplay_au au1;
        (au1 = new ConnGaugeDisplay_au()).StartMonit();
        String s1 = PresenceStringHash_az.GetUserStateTypeStringArray()[iSignStateIndex];
        a_bd_fld = null;
        a_bd_fld = new bd(strAccntName.toLowerCase(), strAccntPswd, strSoftLicense, strMsnServerDomainName, strMsnServerPort, i_int_fld, s1, a_int_fld, au1);
        a_bd_fld.StartRun();
    }

    public final void d()
    {
        SignAddrAndPswdForm bh1 = new SignAddrAndPswdForm(this, 3);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(bh1);
    }

    public final void e()
    {
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new SignInOptionForm(null, null, 0, 0, iSignStateIndex));
    }

    public final void f()
    {
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new k(null, 0));
    }

    public final void a(Displayable displayable, int l, bd bd1)
    {
        boolean flag;
label0:
        {
            RecordStore recordstore = null;
            flag = false;
            String s1;
            if(l == 1)
                s1 = "UltraIMP3";
            else
                s1 = "UltraIMP4";
            int i1;
            try
            {
                if((i1 = (recordstore = RecordStore.openRecordStore(s1, false)).getNumRecords()) > 0)
                {
                    String as[] = new String[i1];
                    RecordEnumeration recordenumeration = recordstore.enumerateRecords(null, null, false);
                    for(int j1 = 0; recordenumeration.hasNextElement(); j1++)
                    {
                        byte abyte0[] = recordenumeration.nextRecord();
                        String s2;
                        if(l == 1)
                            s2 = Utf8Util_ao.Decode(abyte0, 0, abyte0.length);
                        else
                            s2 = new String(abyte0);
                        as[j1] = s2;
                    }

                    recordenumeration.destroy();
                    ba ba2 = new ba(null, displayable, as, l, bd1);
                    flag = true;
                    UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(ba2);
                } else
                {
                    Close(recordstore);
                    RecordStore.deleteRecordStore(s1);
                }
            }
            catch(Exception _ex)
            {
                Close(recordstore);
                break label0;
            }
            finally
            {
                Close(recordstore);
                //throw exception;
            }
            Close(recordstore);
            break label0;
        }
        if(!flag)
        {
            if(l == 2)
            {
                ba ba1 = new ba(null, displayable, null, l, bd1);
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(ba1);
                return;
            }
            Alert alert;
            (alert = new Alert("", "No content", null, AlertType.INFO)).setTimeout(-2);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
        }
    }

    public final boolean a(int l, String s1, int i1)
    {
        boolean flag;
label0:
        {
            flag = false;
            RecordStore recordstore = null;
            String s2;
            if(i1 == 1)
                s2 = "UltraIMP3";
            else
                s2 = "UltraIMP4";
            try
            {
                RecordStore.deleteRecordStore(s1);
                RecordEnumeration recordenumeration = (recordstore = RecordStore.openRecordStore(s2, false)).enumerateRecords(null, null, false);
                int j1 = 0;
                do
                {
                    if(!recordenumeration.hasNextElement())
                        break;
                    int k1 = recordenumeration.nextRecordId();
                    if(j1 == l)
                    {
                        recordstore.deleteRecord(k1);
                        flag = true;
                        break;
                    }
                    j1++;
                } while(true);
                recordenumeration.destroy();
                if(recordstore.getNumRecords() <= 0)
                {
                    Close(recordstore);
                    RecordStore.deleteRecordStore(s2);
                }
            }
            catch(Exception _ex)
            {
                Close(recordstore);
                break label0;
            }
            finally
            {
                Close(recordstore);
                //throw exception;
            }
            Close(recordstore);
            break label0;
        }
        return flag;
    }

    public final void a_Resetup(Displayable displayable)
    {
        try
        {
            RecordStore recordstore = RecordStore.openRecordStore("UltraIMP", false);
            InitialForm a1;
            (a1 = new InitialForm(displayable, recordstore)).a_InitRecordstore(false);
            return;
        }
        catch(Exception _ex)
        {
            return;
        }
    }

    public final void a(String s1, String s2)

⌨️ 快捷键说明

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