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

📄 initialform.java

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

import java.util.Calendar;
import java.util.Date;
import javax.microedition.lcdui.*;
import javax.microedition.media.Manager;
import javax.microedition.rms.RecordStore;

public final class InitialForm extends Form
    implements Runnable, CommandListener, an
{

    public InitialForm(Displayable displayable, RecordStore recordstore)
    {
        super("");
        a_javax_microedition_lcdui_Displayable_fld = displayable;
        a_javax_microedition_rms_RecordStore_fld = recordstore;
        a_javax_microedition_lcdui_TextField_fld = new TextField("Registration Key : ", null, 30, 0);
        append(UltraIMPro.a_javax_microedition_lcdui_Image_static_fld);
        get(0).setLayout(512);
        append(a_javax_microedition_lcdui_TextField_fld);
        addCommand(UltraIMPro.b_CommandOk);
        addCommand(UltraIMPro.t_CommandAbout);
        if(displayable != null)
            addCommand(UltraIMPro.f_CommandBack);
        else
            addCommand(UltraIMPro.a_CommandExit);
        setCommandListener(this);
    }

    public final void a_InitRecordstore(boolean flag)
    {
        int i = 0;
        i = GetMobileCapability();
        if(flag && i == 0)
        {
            Form form;
            (form = new Form("")).append("UltraIM Pro is not compatible with this device! Please install UltraIM Standard version.");
            form.addCommand(UltraIMPro.a_CommandExit);
            form.setCommandListener(this);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(form);
            return;
        }
        try
        {
            if(a_javax_microedition_rms_RecordStore_fld.getNumRecords() == 0)
            {
                //byte abyte0[] = "trial".getBytes();
                byte abyte0[] = "test".getBytes();
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, abyte0.length); // 1 : trial
                abyte0 = "*".getBytes();
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, abyte0.length); // 2 : *
                abyte0 = String.valueOf(Calendar.getInstance().getTime().getTime() / 0x5265c00L).getBytes();
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, abyte0.length); // 3 : setup time
                int j = (abyte0 = "*".getBytes()).length;
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 4 : *
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 5 : *
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 6 : *
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 7 : *
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 8 : *
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 9 : *
                abyte0 = (String.valueOf(i) + ";" + "1.10.001p").getBytes();
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, abyte0.length); // 10 : capability;1.10.001p
                j = (abyte0 = "0".getBytes()).length;
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 11 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 12 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 13 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 14 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 15 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 16 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 17 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 18 : 0
                a_javax_microedition_rms_RecordStore_fld.addRecord(abyte0, 0, j); // 19 : 0
                a_long_fld_TrialDays = 7L;
                append("Input registration key that is case sensitive. Leave blank for trial.");
                b_Alert("Trial remains 7 days");
            } else
            {
                String s;
                //if(!(s = new String(a_javax_microedition_rms_RecordStore_fld.getRecord(1))).equals("trial"))
                if (true)
                {
                    //byte abyte1[] = "trial".getBytes();
                    byte abyte1[] = "test".getBytes();
                    a_javax_microedition_rms_RecordStore_fld.setRecord(1, abyte1, 0, abyte1.length);
                }
                a_javax_microedition_lcdui_TextField_fld.setString("");
                long l = Integer.parseInt(new String(a_javax_microedition_rms_RecordStore_fld.getRecord(3))); // get setup date
                long l1 = Calendar.getInstance().getTime().getTime() / 0x5265c00L;
                a_long_fld_TrialDays = l1 - l;
                if(a_long_fld_TrialDays > 7L)
                {
                    a_long_fld_TrialDays = -1L;
                    append("Input registration key that is case sensitive.");
                    b_Alert("Trial expired, please buy a license at http://www.mobisophy.com.");
                } else
                {
                    append("Input registration key that is case sensitive. Leave blank for trial.");
                    b_Alert("Trial remains " + (7L - a_long_fld_TrialDays) + " day(s)");
                }
            }
            return;
        }
        catch(Exception _ex)
        {
            return;
        }
    }

    public final void commandAction(Command command, Displayable displayable)
    {
        if(command == UltraIMPro.b_CommandOk)
        {
            String s;
            if((s = a_javax_microedition_lcdui_TextField_fld.getString()) == null || s.length() == 0)
                if(a_long_fld_TrialDays == -1L)
                {
                    a();
                    return;
                } else
                {
                    b();
                    return;
                }
            if((s = s.trim()).length() != 16)
            {
                Alert alert;
                (alert = new Alert("", "Key format invalid.", null, null)).setTimeout(-2);
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
                return;
            } else
            {
                a_java_lang_String_fld = s;
                b = a_mod_tos(s);
                c();
                a("Registration is processing, please wait...");
                return;
            }
        }
        if(command == UltraIMPro.t_CommandAbout)
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(new bk(this, null, 2));
            return;
        }
        if(command == UltraIMPro.a_CommandExit)
        {
            MainMenuList.Close(a_javax_microedition_rms_RecordStore_fld);
            UltraIMPro.a_UltraIMPro_static_fld.notifyDestroyed();
            return;
        }
        if(command == UltraIMPro.f_CommandBack && a_javax_microedition_lcdui_Displayable_fld != null)
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(a_javax_microedition_lcdui_Displayable_fld);
    }

    public final void a()
    {
        Alert alert;
        (alert = new Alert("", "Trial expired, please buy a license at http://www.mobisophy.com.", null, AlertType.ALARM)).setTimeout(-2);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
    }

    public final void b()
    {
        MainMenuList.Destroy();
        MainMenuList ap1;
        (ap1 = MainMenuList.GetObject()).ShowMenuBeforeLogin(this);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(ap1);
    }

    public final String a_mod_tos(String s)
    {
        String s1 = s;
        String s2;
        return s2 = (new g()).a_mod_tos(s1);
    }

    public final void run()
    {
        Alert alert;
        try
        {
            //n.Close(null, a_java_lang_String_fld, b, "1.10.001p", true);
            b = "hello :)";
            byte abyte0[] = b.getBytes();
            a_javax_microedition_rms_RecordStore_fld.setRecord(1, abyte0, 0, abyte0.length);
            int i = 0;
            try
            {
                int j = getWidth();
                int k = getHeight();
                int l = UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.numColors();
                int i1 = 0;
                do
                {
                    l >>= 1;
                    i1++;
                } while(l > 1);
                String s;
                i = Integer.parseInt(s = "" + j + k + i1);
            }
            catch(Exception _ex) { }
            /*
            if(i > 0)
                n.b((i - 0x15f90) * 11, b, null);
            */
             b();
            return;
        }
        /*
        catch(bq bq1)
        {
            (alert = new Alert("", bq1.getMessage(), null, null)).setTimeout(-2);
        }*/
        catch(Exception _ex)
        {
            return;
        }
        /*
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(this);
        try
        {
            for(; !isShown(); Thread.sleep(200L));
        }
        catch(Exception _ex) { }
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
        */
  }

    private void c()
    {
        Thread thread;
        (thread = new Thread(this)).start();
    }

    public final void a(String s)
    {
        Form form;
        (form = new Form("")).append(s);
        form.addCommand(UltraIMPro.a_CommandExit);
        setCommandListener(this);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(form);
    }

    public final void b_Alert(String s)
    {
        if(UltraIMPro.a_boolean_static_fld)
        {
            UltraIMPro.a_boolean_static_fld = false;
            Alert alert;
            (alert = new Alert("", s, null, AlertType.INFO)).setTimeout(-2);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(this);
            try
            {
                for(; !isShown(); Thread.sleep(200L));
            }
            catch(Exception _ex) { }
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
            return;
        } else
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(this);
            return;
        }
    }

    public final void a(int i, boolean flag)
    {
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(this);
    }

    public final void b(int i, boolean flag)
    {
    }

    public static final int GetMobileCapability()
    {
        int i = 0;
        try
        {
            Manager.createPlayer("capture://video");
            i = 1;
        }
        catch(Exception _ex) { }
        try
        {
            Class.forName("javax.microedition.io.file.FileSystemRegistry");
            i |= 2;
        }
        catch(Exception _ex) { }
        return i;
    }

    public Displayable a_javax_microedition_lcdui_Displayable_fld;
    public String a_java_lang_String_fld;
    public String b;
    public RecordStore a_javax_microedition_rms_RecordStore_fld;
    private TextField a_javax_microedition_lcdui_TextField_fld;
    private long a_long_fld_TrialDays;
}

⌨️ 快捷键说明

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