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

📄 x.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.rms.RecordStore;

public final class x
    implements CommandListener
{

    public static final void a(boolean flag)
    {
        a_boolean_static_fld = flag;
    }

    public static final boolean a()
    {
        return a_boolean_static_fld;
    }

    public x(Displayable displayable, int i)
    {
        a_javax_microedition_lcdui_Displayable_fld = displayable;
        a_int_fld = i;
    }

    public final void a(byte abyte0[])
    {
        Image image = null;
        String s = null;
        byte byte0 = 2;
        if(a_int_fld == 0)
        {
            byte0 = 0;
            if(abyte0 == null || abyte0.length == 0)
                abyte0 = a_mod_tob();
            s = MainMenuList.GetObject().e_java_lang_String_fld;
            if(abyte0 != null)
                image = Image.createImage(abyte0, 0, abyte0.length);
        }
        int i = MainMenuList.GetObject().f_int_fld;
        Command command = null;
        if(i == 0 || (i & 1) == 1)
            command = UltraIMPro.l_CommandCapture;
        else
            command = UltraIMPro.p_CommandSelectFile;
        a_ad_fld = new ad(byte0, null, this, command, image);
        if(a_int_fld == 0)
            a_ad_fld.a_java_lang_String_fld = "My Pic. : " + s.substring(s.indexOf('/') + 1);
        a_ad_fld.addCommand(command);
        if(command == UltraIMPro.l_CommandCapture)
            a_ad_fld.addCommand(UltraIMPro.m_CommandFromAlbum);
        if((i & 3) == 3)
            a_ad_fld.addCommand(UltraIMPro.p_CommandSelectFile);
        if(a_int_fld == 0)
            a_ad_fld.addCommand(UltraIMPro.q_CommandRestoreDefault);
        a_ad_fld.addCommand(UltraIMPro.f_CommandBack);
        a_ad_fld.setCommandListener(this);
        UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(a_ad_fld);
    }

    public final void commandAction(Command command, Displayable displayable)
    {
        if(command == UltraIMPro.f_CommandBack)
        {
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(a_javax_microedition_lcdui_Displayable_fld);
            return;
        }
        if(a_int_fld == 0 && !h.b_mod_tob())
        {
            Alert alert;
            (alert = new Alert("", "Picture transfering now, change it later", null, AlertType.INFO)).setTimeout(-2);
            UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert);
            return;
        }
        bd bd1 = null;
        if(command == UltraIMPro.p_CommandSelectFile)
        {
            if(a_int_fld == 0)
                bd1 = (bd)a_javax_microedition_lcdui_Displayable_fld;
            (new r(a_int_fld, 5, a_ad_fld, bd1)).a();
            return;
        }
        if(command == UltraIMPro.l_CommandCapture)
        {
            if(a_int_fld == 0)
                bd1 = (bd)a_javax_microedition_lcdui_Displayable_fld;
            bg bg1;
            boolean flag;
            if(flag = (bg1 = new bg(a_ad_fld, bd1, a_int_fld)).a_mod_tob())
            {
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(bg1);
                return;
            } else
            {
                Alert alert1;
                (alert1 = new Alert("", "Fail to initialize video", null, AlertType.INFO)).setTimeout(-2);
                UltraIMPro.a_javax_microedition_lcdui_Display_static_fld.setCurrent(alert1);
                return;
            }
        }
        if(command == UltraIMPro.q_CommandRestoreDefault)
        {
            if(!MainMenuList.GetObject().e_java_lang_String_fld.equals("-1/default"))
            {
                r r1;
                (r1 = new r(0, 4, a_ad_fld, (bd)a_javax_microedition_lcdui_Displayable_fld)).a_java_lang_String_fld= "-1/default";
                r1.c();
                return;
            }
        } else
        if(command == UltraIMPro.m_CommandFromAlbum)
        {
            if(a_int_fld == 0)
            {
                MainMenuList.GetObject().a(a_ad_fld, 3, (bd)a_javax_microedition_lcdui_Displayable_fld);
                return;
            }
            MainMenuList.GetObject().a(a_ad_fld, 4, null);
        }
    }

    public static final byte[] a_mod_tob()
    {
        byte abyte0[];
label0:
        {
            RecordStore recordstore = null;
            abyte0 = null;
            try
            {
                while(a_boolean_static_fld) 
                    Thread.sleep(100L);
            }
            catch(Exception _ex) { }
            a_boolean_static_fld = true;
            try
            {
                abyte0 = (recordstore = RecordStore.openRecordStore("UltraIMP1", false)).getRecord(4);
            }
            catch(Exception _ex)
            {
                MainMenuList.Close(recordstore);
                break label0;
            }
            finally
            {
                MainMenuList.Close(recordstore);
                //throw exception;
            }
            MainMenuList.Close(recordstore);
            break label0;
        }
        a_boolean_static_fld = false;
        return abyte0;
    }

    public static final Image a(Image image, int i, int j, int k)
    {
        if(i <= k && j <= k)
            if(k == 160 && (i * 3 + 1) * j >= 65535)
                k = 140;
            else
                return image;
        int l;
        int i1;
        if(i >= j)
        {
            l = k;
            if((i1 = (j * k) / i) < 25)
                i1 = 25;
        } else
        {
            i1 = k;
            if((l = (i * k) / j) < 25)
                l = 25;
        }
        if(k == 160 && (l * 3 + 1) * i1 >= 65535)
            if(i >= j)
            {
                l = 140;
                if((i1 = (j * 140) / i) < 25)
                    i1 = 25;
            } else
            {
                i1 = 140;
                if((l = (i * 140) / j) < 25)
                    l = 25;
            }
        Image image1 = null;
        try
        {
            Image image2;
            Graphics g = (image2 = Image.createImage(l, j)).getGraphics();
            for(int j1 = 0; j1 < l; j1++)
            {
                g.setClip(j1, 0, 1, j);
                g.drawImage(image, j1 - (j1 * i) / l, 0, 20);
            }

            g = (image1 = Image.createImage(l, i1)).getGraphics();
            for(int k1 = 0; k1 < i1; k1++)
            {
                g.setClip(0, k1, l, 1);
                g.drawImage(image2, 0, k1 - (k1 * j) / i1, 20);
            }

        }
        catch(Throwable _ex)
        {
            return null;
        }
        return image1;
    }

    public static final byte[] a_mod_tob(String s)
    {
        byte abyte0[];
label0:
        {
            abyte0 = null;
            RecordStore recordstore = null;
            try
            {
                while(b) 
                    Thread.sleep(100L);
            }
            catch(Exception _ex) { }
            b = true;
            try
            {
                int i;
                if((i = (recordstore = RecordStore.openRecordStore("UltraIMP2", true)).getNumRecords()) > 3)
                {
                    for(int j = 3; j < i; j++)
                    {
                        recordstore.deleteRecord(j + 1);
                        RecordStore.deleteRecordStore(a_java_lang_String_array1d_static_fld[j]);
                    }

                    i = 3;
                }
                int k = 0;
                do
                {
                    if(k >= i)
                        break;
                    String s1;
                    String s2;
                    if((s2 = (s1 = new String(recordstore.getRecord(k + 1))).substring(0, s1.indexOf(';'))).equals(s))
                    {
                        RecordStore recordstore1;
                        abyte0 = (recordstore1 = RecordStore.openRecordStore(a_java_lang_String_array1d_static_fld[k], false)).getRecord(1);
                        MainMenuList.Close(recordstore1);
                        break;
                    }
                    k++;
                } while(true);
            }
            catch(Exception _ex)
            {
                MainMenuList.Close(recordstore);
                break label0;
            }
            finally
            {
                MainMenuList.Close(recordstore);
                //throw exception;
            }
            MainMenuList.Close(recordstore);
            break label0;
        }
        b = false;
        return abyte0;
    }

    public static final void a(byte abyte0[], String s)
    {
label0:
        {
            RecordStore recordstore = null;
            String s1 = String.valueOf(Calendar.getInstance().getTime().getTime() / 0x36ee80L);
            byte abyte1[] = (s1 = s + ';' + s1).getBytes();
            try
            {
                while(b) 
                    Thread.sleep(100L);
            }
            catch(Exception _ex) { }
            b = true;
            int i;
            try
            {
                if((i = (recordstore = RecordStore.openRecordStore("UltraIMP2", true)).getNumRecords()) < 3)
                {
                    recordstore.addRecord(abyte1, 0, abyte1.length);
                    RecordStore recordstore1;
                    (recordstore1 = RecordStore.openRecordStore(a_java_lang_String_array1d_static_fld[i], true)).addRecord(abyte0, 0, abyte0.length);
                    MainMenuList.Close(recordstore1);
                } else
                {
                    int j = 0;
                    long l = 0L;
                    for(int k = 0; k < 3; k++)
                    {
                        String s2;
                        long l1 = Long.parseLong((s2 = new String(recordstore.getRecord(k + 1))).substring(s2.indexOf(';') + 1));
                        if(l == 0L)
                        {
                            l = l1;
                            continue;
                        }
                        if(l1 < l)
                        {
                            l = l1;
                            j = k;
                        }
                    }

                    recordstore.setRecord(j + 1, abyte1, 0, abyte1.length);
                    RecordStore.deleteRecordStore(a_java_lang_String_array1d_static_fld[j]);
                    RecordStore recordstore2;
                    (recordstore2 = RecordStore.openRecordStore(a_java_lang_String_array1d_static_fld[j], true)).addRecord(abyte0, 0, abyte0.length);
                    MainMenuList.Close(recordstore2);
                }
            }
            catch(Exception _ex)
            {
                MainMenuList.Close(recordstore);
                break label0;
            }
            finally
            {
                MainMenuList.Close(recordstore);
                //throw exception;
            }
            MainMenuList.Close(recordstore);
            break label0;
        }
        b = false;
    }

    public static final String a_mod_tos(String s)
    {
        String s1 = null;
        int i;
        if((i = s.indexOf("SHA1D=")) > 0)
        {
            i = i + 1 + "SHA1D=".length();
            s1 = s.substring(i, s.indexOf('"', i));
        }
        return s1;
    }

    public static final String a_java_lang_String_array1d_static_fld[] = {
        "UltraIMfp1", "UltraIMfp2", "UltraIMfp3", "UltraIMfp4", "UltraIMfp5"
    };
    public static boolean a_boolean_static_fld = false;
    public static boolean b = false;
    public Displayable a_javax_microedition_lcdui_Displayable_fld;
    public ad a_ad_fld;
    public int a_int_fld;

}

⌨️ 快捷键说明

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