From 8b4aced4c537d97f9591d3fe75df2a99752f407c Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 15 Nov 2018 12:16:56 +0200 Subject: [PATCH] Initial --- build.xml | 83 ++ nbproject/build-impl.xml | 1368 ++++++++++++++++++++++++++ nbproject/genfiles.properties | 8 + nbproject/private/private.properties | 7 + nbproject/private/private.xml | 4 + nbproject/project.properties | 140 +++ nbproject/project.xml | 10 + src/About.java | 31 + src/Main.java | 172 ++++ src/NativeUI.java | 49 + src/Reader.java | 80 ++ src/Rms.java | 68 ++ src/data/1 | 59 ++ src/data/2 | 35 + src/data/3 | 41 + src/data/4 | 21 + src/data/5 | 25 + src/data/about | 10 + src/data/type | 5 + src/icons/1.png | Bin 0 -> 526 bytes src/icons/2.png | Bin 0 -> 457 bytes src/icons/3.png | Bin 0 -> 424 bytes src/icons/4.png | Bin 0 -> 497 bytes src/icons/5.png | Bin 0 -> 465 bytes 24 files changed, 2216 insertions(+) create mode 100644 build.xml create mode 100644 nbproject/build-impl.xml create mode 100644 nbproject/genfiles.properties create mode 100644 nbproject/private/private.properties create mode 100644 nbproject/private/private.xml create mode 100644 nbproject/project.properties create mode 100644 nbproject/project.xml create mode 100644 src/About.java create mode 100644 src/Main.java create mode 100644 src/NativeUI.java create mode 100644 src/Reader.java create mode 100644 src/Rms.java create mode 100644 src/data/1 create mode 100644 src/data/2 create mode 100644 src/data/3 create mode 100644 src/data/4 create mode 100644 src/data/5 create mode 100644 src/data/about create mode 100644 src/data/type create mode 100644 src/icons/1.png create mode 100644 src/icons/2.png create mode 100644 src/icons/3.png create mode 100644 src/icons/4.png create mode 100644 src/icons/5.png diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..19fa54b --- /dev/null +++ b/build.xml @@ -0,0 +1,83 @@ + + + + + + Builds, tests, and runs the project . + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..946a6b6 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1368 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-mobility-antext.jar file in the IDE installation directory. + Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location. + Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator. + Must set src.dir + Must set build.dir + Must set dist.dir + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set preprocessed.dir + + + + + + + + + + + + + + + + + + Must set build.classes.dir + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must set obfuscated.classes.dir + + + + Must set obfuscated.classes.dir + Must set obfuscator.srcjar + Must set obfuscator.destjar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set preverify.classes.dir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MicroEdition-Configuration: ${platform.configuration} + + MicroEdition-Configuration: ${platform.configuration} + + + + MicroEdition-Profile: ${platform.profile} + + MicroEdition-Profile: ${platform.profile} + + + + Must set dist.jad + + + + + + + + + + + + + + + + + + + + + + + + ${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad} + ${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Starting emulator with port number ${active.debug.port} + + + + + + + + + + + + Starting emulator with port number ${active.debug.port} + + + + + + + + + + + + + + + + + Must set dist.javadoc.dir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${all.configurations} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment. + + + + + + + + Classpath to Ant Contrib library (libs.ant-contrib.classpath property) is not set. + + + + + + + + + Active project configuration: @{cfg} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property build.root.dir is not set. By default its value should be \"build\". + Property dist.root.dir is not set. By default its value should be \"dist\". + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..329a805 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +build.xml.data.CRC32=1f1288af +build.xml.script.CRC32=67d25359 +build.xml.stylesheet.CRC32=03eab09b +nbproject/build-impl.xml.data.CRC32=1f1288af +nbproject/build-impl.xml.script.CRC32=9aa6b4ea +nbproject/build-impl.xml.stylesheet.CRC32=a4fc63f1 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 0000000..56c68b2 --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,7 @@ +#Wed Jun 23 19:30:10 EEST 2010 +netbeans.user=C\:\\Users\\aNNiMON\\.netbeans\\6.9m1 +javadoc.preview=true +deployment.counter=19 +config.active= +deployment.number=0.0.18 +app-version.autoincrement=true diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..c1f155a --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..6b1447e --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,140 @@ +abilities=MMAPI=1.1,SATSAJCRMI=1.0,SATSACRYPTO=1.0,JSR82=1.1,NOKIAUI=1.0,JSR226=1.0,capuchin=1.0,MIDP=2.1,JSR229=1.1.0,SATSAAPDU=1.0,CLDC=1.1,JSR177=1.0,JSR179=1.0.1,eSWT=1.1,J2MEWS=1.0,VSCL=2.1,WMA=2.0,JSR172=1.0,JSR256=1.1,SEMC_EXT_JP8=1.0,ColorScreen,NokiaUI=1.0,OBEX=1.0,JSR238=1.0,JSR239=1.0,JSR211=1.0,JSR234=1.0,ScreenWidth=240,MascotV3=1.0,JSR75=1.0,IAPInfo=1.0,SATSAPKI=1.0,JSR184=1.1,ScreenHeight=321,ScreenColorDepth=8,JSR180=1.0.1,J2MEXMLRPC=1.0, +all.configurations=\ +application.args= +application.description= +application.description.detail= +application.name= +application.vendor=Vendor +build.classes.dir=${build.dir}/compiled +build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.mvd,**/*.wsclient,**/*.vmd +build.dir=build/${config.active} +build.root.dir=build +debug.level=debug +deployment.copy.target=deploy +deployment.instance=default +deployment.jarurl=${dist.jar} +deployment.method=NONE +deployment.override.jarurl=false +dist.dir=dist/${config.active} +dist.jad=Praiser.jad +dist.jar=Praiser.jar +dist.javadoc.dir=${dist.dir}/doc +dist.root.dir=dist +extra.classpath= +filter.exclude.tests=false +filter.excludes= +filter.more.excludes=**/overview.html,**/package.html +filter.use.standard=true +jar.compress=true +javac.debug=true +javac.deprecation=false +javac.encoding=UTF-8 +javac.optimize=false +javac.source=1.3 +javac.target=1.3 +javadoc.author=false +javadoc.encoding= +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +libs.classpath= +main.class= +main.class.class=applet +manifest.apipermissions= +manifest.file=manifest.mf +manifest.jad= +manifest.manifest= +manifest.midlets=MIDlet-1: Praiser,/icons/1.png,Main\n +manifest.others=MIDlet-Vendor: aNNiMON\nMIDlet-Name: Praiser\nMIDlet-Version: 1.0\n +manifest.pushregistry= +name=Praiser +no.dependencies=false +nokiaS80.application.icon= +nsicom.application.monitorhost= +nsicom.application.runremote= +nsicom.application.runverbose= +nsicom.remoteapp.location=\\My Documents\\NetBeans Applications +nsicom.remotevm.location=\\Windows\\creme\\bin\\CrEme.exe +obfuscated.classes.dir=${build.dir}/obfuscated +obfuscation.custom=-keep public class * extends javax.microedition.midlet.MIDlet \n-obfuscationdictionary compact.txt\n-dontusemixedcaseclassnames +obfuscation.level=1 +obfuscator.destjar=${build.dir}/obfuscated.jar +obfuscator.srcjar=${build.dir}/before-obfuscation.jar +platform.active=Sony_Ericsson_SDK_2_5_0_4_for_the_Java_TM__ME_Platform_Emulator_ +platform.active.description=Sony Ericsson SDK 2.5.0.4 for the Java(TM) ME Platform(Emulator) +platform.apis=JSR234-1.0,SATSA-APDU-1.0,capuchin-1.0,JSR211-1.0,JSR75-1.0,J2ME-WS-1.0,J2ME-XMLRPC-1.0,JSR82-1.1,SATSA-JCRMI-1.0,SATSA-CRYPTO-1.0,JSR239-1.0,JSR179-1.0.1,MascotV3-1.0,JSR184-1.1,JSR238-1.0,MMAPI-1.1,JSR256-1.1,NokiaUI-1.0,IAPInfo-1.0,JSR229-1.1.0,SATSA-PKI-1.0,JSR180-1.0.1,JSR226-1.0,JSR177-1.0,SEMC_EXT_JP8-1.0,VSCL-2.0,VSCL-2.1,WMA-2.0,eSWT-1.1 +platform.bootclasspath=${platform.home}/lib/eswt.jar:${platform.home}/lib/mascotv3.jar:${platform.home}/lib/jsr226.jar:${platform.home}/lib/jsr256.jar:${platform.home}/lib/satsa-crypto.jar:${platform.home}/lib/jsr229.jar:${platform.home}/lib/jsr238.jar:${platform.home}/lib/j2me-xmlrpc.jar:${platform.home}/lib/jsr211.jar:${platform.home}/lib/vscl21.jar:${platform.home}/lib/satsa-jcrmi.jar:${platform.home}/lib/jsr082.jar:${platform.home}/lib/satsa-apdu.jar:${platform.home}/lib/jsr184.jar:${platform.home}/lib/nokiaext.jar:${platform.home}/lib/capuchin.jar:${platform.home}/lib/jsr239.jar:${platform.home}/lib/jsr75.jar:${platform.home}/lib/satsa-pki.jar:${platform.home}/lib/jsr179.jar:${platform.home}/lib/jsr180.jar:${platform.home}/lib/iapinfo.jar:${platform.home}/lib/vscl.jar:${platform.home}/lib/mmapi.jar:${platform.home}/lib/j2me-ws.jar:${platform.home}/lib/wma20.jar:${platform.home}/lib/jsr234.jar:${platform.home}/lib/semc_ext_jp8.jar:${platform.home}/lib/cldcapi11.jar:${platform.home}/lib/midpapi20.jar +platform.configuration=CLDC-1.1 +platform.device=SonyEricsson_JP8_240x320_Emu +platform.fat.jar=true +platform.profile=MIDP-2.0 +platform.trigger=CLDC +platform.type=UEI-1.0.1 +preprocessed.dir=${build.dir}/preprocessed +preverify.classes.dir=${build.dir}/preverified +preverify.sources.dir=${build.dir}/preverifysrc +resources.dir=resources +ricoh.application.email= +ricoh.application.fax= +ricoh.application.icon= +ricoh.application.target-jar= +ricoh.application.telephone= +ricoh.application.uid=68313297 +ricoh.application.version= +ricoh.dalp.application-desc.auto-run=false +ricoh.dalp.application-desc.energy-save= +ricoh.dalp.application-desc.exec-auth= +ricoh.dalp.application-desc.visible=true +ricoh.dalp.argument= +ricoh.dalp.codebase= +ricoh.dalp.display-mode.color=true +ricoh.dalp.display-mode.is-4line-support=false +ricoh.dalp.display-mode.is-hvga-support=true +ricoh.dalp.display-mode.is-vga-support=false +ricoh.dalp.display-mode.is-wvga-support=false +ricoh.dalp.information.abbreviation= +ricoh.dalp.information.icon.basepath= +ricoh.dalp.information.icon.location= +ricoh.dalp.information.is-icon-used=true +ricoh.dalp.install.destination=hdd +ricoh.dalp.install.mode.auto=true +ricoh.dalp.install.work-dir=hdd +ricoh.dalp.is-managed=true +ricoh.dalp.resources.dsdk.version=2.0 +ricoh.dalp.resources.jar.basepath= +ricoh.dalp.resources.jar.version= +ricoh.dalp.version= +ricoh.icon.invert=false +ricoh.platform.target.version= +run.cmd.options= +run.jvmargs= +run.method=STANDARD +run.security.domain=trusted +run.use.security.domain=false +savaje.application.icon= +savaje.application.icon.focused= +savaje.application.icon.small= +savaje.application.uid=TBD +savaje.bundle.base= +savaje.bundle.debug=false +savaje.bundle.debug.port= +semc.application.caps= +semc.application.icon= +semc.application.icon.count= +semc.application.icon.splash= +semc.application.icon.splash.installonly=false +semc.application.uid=E5591813 +semc.certificate.path= +semc.private.key.password= +semc.private.key.path= +sign.alias= +sign.enabled=false +sign.keystore= +src.dir=src +use.emptyapis=true +use.preprocessor=true diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..980b3c7 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,10 @@ + + + org.netbeans.modules.kjava.j2meproject + + + Praiser + 1.6 + + + diff --git a/src/About.java b/src/About.java new file mode 100644 index 0000000..838fe89 --- /dev/null +++ b/src/About.java @@ -0,0 +1,31 @@ + +import javax.microedition.lcdui.*; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author aNNiMON + */ +public class About extends Form implements CommandListener { + + private Command back; + private Displayable prev; + + public About(Displayable prev) { + super("О программе"); + this.prev = prev; + back = new Command("Назад", Command.SCREEN, 1); + append(new Reader().readText("about")); + addCommand(back); + setCommandListener(this); + } + + public void commandAction(Command c, Displayable d) { + if(c==back) Main.midlet.dsp.setCurrent(prev); + } + +} diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..f0c5d87 --- /dev/null +++ b/src/Main.java @@ -0,0 +1,172 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +import java.util.*; +import javax.microedition.lcdui.*; +import javax.microedition.midlet.*; + +/** + * @author aNNiMON + * JP-7.3 + */ +public class Main extends MIDlet implements CommandListener, ItemStateListener { + + public static Main midlet; + public Display dsp; + private NativeUI nui; + private Reader rdr; + private Form f; + private Timer timer; + private Random rnd; + private TextField user, ttime; + private ChoiceGroup type, out, time; + private Command ok, exit, about; + private String[] msgtype, all; + private int[] delay = new int[] {2,5,10,15,20,30,45,60,90}; + + public Main() { + midlet=this; + rdr = new Reader(); + timer = new Timer(); + rnd = new Random(); + ok = new Command("Ok", Command.OK, 1); + exit = new Command("Выход", Command.EXIT, 2); + about = new Command("О программе", Command.SCREEN, 3); + dsp = Display.getDisplay(this); + } + public void startApp() { + Rms.restoreOptions(); + if(Rms.firstStart) { + Rms.isUIActivity = NativeUI.hasUIActivity(); + } + f = new Form("Хвалитель 1.0"); + //Имя пользователя + user = new TextField("Имя пользователя", Rms.userName, 40, TextField.ANY); + //Время вывода сообщения + time = new ChoiceGroup("Время вывода", Choice.POPUP); + time.append("2 минуты", null); + for(int i=1; i0) Rms.userName = str; + //Время + Rms.tilbl = time.getSelectedIndex(); + if(Rms.tilbl>> 1)%all.length; + String msg = Rms.userName + ", " + all[idx]; + if(Rms.isUIActivity && out.getSelectedIndex()==0) { + if(msg.length()<=9) nui.setMessage(msg); + else if(msg.length()<=24) nui.setMessage(msg.substring(0, 9), msg.substring(9)); + else nui.setMessage(msg.substring(0, msg.length()-15), msg.substring(msg.length()-15)); + + /*if(msg.length()<=9) nui.setMessage(msg); + else if(msg.length()<=25) nui.setMessage(msg.substring(0, 9), msg.substring(9)); + else nui.setMessage(msg.substring(0, 9), msg.substring(9,25)+"\n"+msg.substring(25));*/ + f.deleteAll(); + f.append(msg); + }else{ + f.deleteAll(); + f.append(msg); + dsp.setCurrent(f); + } + } + }, sheduletime, sheduletime); + }else if(c==exit) destroyApp(true); + else if(c==about) dsp.setCurrent(new About(f)); + } + } + + public void itemStateChanged(Item item) { + if (item == time) { + f.deleteAll(); + f.append(user); + f.append(type); + f.append(time); + if(time.getSelectedIndex() >= delay.length) f.append(ttime); + f.append(out); + } + } +} diff --git a/src/NativeUI.java b/src/NativeUI.java new file mode 100644 index 0000000..0048f12 --- /dev/null +++ b/src/NativeUI.java @@ -0,0 +1,49 @@ + +import com.sonyericsson.ui.UIActivityMenu; +import javax.microedition.lcdui.*; +import javax.microedition.midlet.MIDlet; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author aNNiMON + */ +public class NativeUI { + + private UIActivityMenu uam; + private Image icon; + + public NativeUI(MIDlet m) { + uam = UIActivityMenu.getInstance(m); + } + + public static boolean hasUIActivity() { + try { + Class.forName("com.sonyericsson.ui.UIActivityMenu"); + return true; + } catch (ClassNotFoundException ex) { + return false; + } + } + + public void setIcon(String path) { + icon = null; + try { + icon = Image.createImage("/icons/" + path + ".png"); + } catch (Exception ex) { + icon = null; + } + } + + public void setMessage(String message) { + uam.addEvent(message, icon); + } + + public void setMessage(String title, String message) { + uam.addEvent(title, message, icon, null); + } +} diff --git a/src/Reader.java b/src/Reader.java new file mode 100644 index 0000000..141cd10 --- /dev/null +++ b/src/Reader.java @@ -0,0 +1,80 @@ + +import java.io.InputStream; +import java.util.Vector; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author aNNiMON + */ +public class Reader { + + private char[] win1251; + + public Reader() { + win1251 = new char[] { + '\u0410', '\u0411', '\u0412', '\u0413', '\u0414', '\u0415', '\u0416', + '\u0417', '\u0418', '\u0419', '\u041A', '\u041B', '\u041C', '\u041D', + '\u041E', '\u041F', '\u0420', '\u0421', '\u0422', '\u0423', '\u0424', + '\u0425', '\u0426', '\u0427', '\u0428', '\u0429', '\u042A', '\u042B', + '\u042C', '\u042D', '\u042E', '\u042F', '\u0430', '\u0431', '\u0432', + '\u0433', '\u0434', '\u0435', '\u0436', '\u0437', '\u0438', '\u0439', + '\u043A', '\u043B', '\u043C', '\u043D', '\u043E', '\u043F', '\u0440', + '\u0441', '\u0442', '\u0443', '\u0444', '\u0445', '\u0446', '\u0447', + '\u0448', '\u0449', '\u044A', '\u044B', '\u044C', '\u044D', '\u044E', + '\u044F' + }; + } + + public String[] read(String path) { + return threshold(getText(getClass().getResourceAsStream("/data/"+path))); + } + + public String readText(String path) { + return getText(getClass().getResourceAsStream("/data/"+path)); + } + + private String[] threshold(String s) + { + Vector ml = new Vector(); + int len = s.length(); + StringBuffer sb = new StringBuffer(); + for(int i = 0; i < len; i++) { + int c = s.charAt(i); + if(c == '\n') { + if(sb.length() > 0) { + ml.addElement(sb.toString().trim()); + sb = new StringBuffer(); + } + }else{ + sb.append((char)c); + } + } + if(sb.length() > 0) ml.addElement(sb.toString().trim()); + String[] m; + m = new String[ml.size()]; + ml.copyInto(m); + return m; + } + + private String getText(InputStream is) { + StringBuffer sb = new StringBuffer(); + int ch = 0; + try { + while ((ch = is.read()) != -1) sb.append(decodeWinChar((byte)ch)); + } catch (Exception e) {e.printStackTrace();} + return sb.toString(); + } + + private char decodeWinChar(byte b) { + int ich = b & 0xff; + if (ich == 0xb8) return 0x0451;// ё + else if (ich == 0xa8) return 0x0401;// Ё + else if (ich >= 0xc0) return win1251[ich-192]; + return (char)ich; + } +} diff --git a/src/Rms.java b/src/Rms.java new file mode 100644 index 0000000..31af777 --- /dev/null +++ b/src/Rms.java @@ -0,0 +1,68 @@ + +import java.io.*; +import javax.microedition.rms.*; + +/** + * + * @author aNNiMON + */ +public class Rms { + + private static final String rmsName = "Praiser"; + private static RecordStore rmsStore; + public static boolean firstStart = true; + public static boolean isUIActivity = true; + public static boolean[] selectedArray; + public static String userName = "Пользователь"; + public static int ttime = 10; + public static int tilbl = 2; + + public static void saveOptions() { + if (rmsStore != null) { + byte[] options = null; + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(baos); + dos.writeBoolean(firstStart); + dos.writeBoolean(isUIActivity); + dos.writeUTF(userName); + dos.flush(); + options = baos.toByteArray(); + dos.close(); + rmsStore.setRecord(1, options, 0, options.length); + } catch (InvalidRecordIDException ridex) { + try { + rmsStore.addRecord(options, 0, options.length); + } catch (RecordStoreException ex) { + } + } catch (Exception ex) { + } + } + if (rmsStore != null) { + try { + rmsStore.closeRecordStore(); + rmsStore = null; + } catch (RecordStoreException ex) { + } + } + } + + public static void restoreOptions() { + try { + rmsStore = RecordStore.openRecordStore(rmsName, true); + } catch (RecordStoreException ex) { + rmsStore = null; + } + if (rmsStore != null) { + try { + DataInputStream dis = new DataInputStream(new ByteArrayInputStream(rmsStore.getRecord(1))); + firstStart = dis.readBoolean(); + isUIActivity = dis.readBoolean(); + userName = dis.readUTF(); + dis.close(); + } catch (Exception ex) { + } + } + } +} + diff --git a/src/data/1 b/src/data/1 new file mode 100644 index 0000000..49d3540 --- /dev/null +++ b/src/data/1 @@ -0,0 +1,59 @@ + ! + ... + ! + ! + ! + ++ + + :) + :) + ? ... +, ... ) + - ! + ... + ))) + ... + +) + +! + +! + +! +! + + + + + ! + , ! + :) + +! + ! + + ! + +! + ... + ! +, , ? + ! + ! +! + ! + +!!! + + + + ! + ! + ! +! +- ! + ! + !! + ! \ No newline at end of file diff --git a/src/data/2 b/src/data/2 new file mode 100644 index 0000000..a05faa0 --- /dev/null +++ b/src/data/2 @@ -0,0 +1,35 @@ + +, ??? +, ...:(( + ?? + + + ! + + + , ... + ??? +, - + 1953 ;) + !!! + , + ... + ?? +, + ... + + - ? + - ? . + - ?? + ! + ! + + ! ! + ! + ... + ! + ... + ... + ! + ! + good! \ No newline at end of file diff --git a/src/data/3 b/src/data/3 new file mode 100644 index 0000000..bf88db0 --- /dev/null +++ b/src/data/3 @@ -0,0 +1,41 @@ + ! +<3 + . + +-, ! +, + + +, + - )) + - ) + + + - + + , + + , , , ... + ! + +, ! + ! + ? + ! +14 ! + ! + ! + , ! + ? +, !! + ! + =) + !!!! + ! + , . + . + ! + <3 + ... :) + + ... ... \ No newline at end of file diff --git a/src/data/4 b/src/data/4 new file mode 100644 index 0000000..16548d8 --- /dev/null +++ b/src/data/4 @@ -0,0 +1,21 @@ + ! + ! +---!!! + ???((( + + - ! + - ! + ???? + ? + ! + ! + ! + ! . + , ! + ! + ... + - + + ... + + ... \ No newline at end of file diff --git a/src/data/5 b/src/data/5 new file mode 100644 index 0000000..f8f7d78 --- /dev/null +++ b/src/data/5 @@ -0,0 +1,25 @@ + + + + +50 50 + + + ? + ? + ??? + + . +! ... +... +, ... +, + + ... + + , ! + , ... + .. + + , ! + \ No newline at end of file diff --git a/src/data/about b/src/data/about new file mode 100644 index 0000000..4080467 --- /dev/null +++ b/src/data/about @@ -0,0 +1,10 @@ +Praiser 1.0 23.06.2010 + +: aNNiMON + : Devey + : miha + : http://annimon.z83.ru/ + : http://magazine-user.narod.ru/ + +-, , . + , data . \ No newline at end of file diff --git a/src/data/type b/src/data/type new file mode 100644 index 0000000..d4636dd --- /dev/null +++ b/src/data/type @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/icons/1.png b/src/icons/1.png new file mode 100644 index 0000000000000000000000000000000000000000..85d93780ca80c6180fd8b3f66c98102d3adf7696 GIT binary patch literal 526 zcmeAS@N?(olHy`uVBq!ia0vp^@<1%f!3-q-X|jp|smTF8A+G=b|4$E+g`k{3&b9qQ zw>JvCJ1uo;r6^G9{Y9Ct*JMAOlX|*aW zJ=!jGZ7~nrod55gf$W)S3=okYx8;7_l?Sq49TC5~K>#ASqM7&SZTXpnoG%ZH0Yz?a z5?)--vwH&1x!GK|9O0RX zLs_S2zUH)h+w|dpCBJrI?n&mpx$6ZOcGyi#NX_|V#nIT`q)?PwY_9&iyU1VbvDmcL zKVNIi;a{3UkhB*T|#ciX2X zok;K7`(<@)UiMWr&(&|<`^xkGtlPFE%1Z7ZyX3$2XVs1?uUISivF+G*;fkGf%1!3y zH5v1tCAXE!{Je9|UGVI?TkOocY!0j~di!BU^|E;LYDMAhC)138A;{qA>gTe~DWM4f D)RFHq literal 0 HcmV?d00001 diff --git a/src/icons/2.png b/src/icons/2.png new file mode 100644 index 0000000000000000000000000000000000000000..f868b3861fe70aa04919d8077945bd5cfa3e773e GIT binary patch literal 457 zcmV;)0XF`LP)P000>X0{{R3^EY)-0001oP)t-s0000$ z6cGRBAXz{N|Kc3~+7$ZQ5cbXl|K1q($^dm;4D!AJu89QhvH<$l2>R9x?z#Z-#sKQ7 z0M@Pm|E?VJwg8=d1kQ;7;*kL6od9i21g?Pu!i@mxp#Y_61f_8V-nIblt^nql0F_|` zx^)27r2yWp0QSNF%B29AX#~oJ0P?~B=A{5DuvEIjV34(TXyl#;sO zDz;fA(U?SOf6heFUSWeE){jYgZTKx%J$Ez>zBZt7SCD9n-9gak+t!VR5PDiHy3w(_ zhz;0EAwp#fKkY>lCbqt9t+nmq^zcOICt>3C!!H`&?Z!vy0LNXT^Wc_|QE=7h!i97LIIAsYDb$A1L#!|wS6>uU-xQFLG800000NkvXXu0mjfW>3oy literal 0 HcmV?d00001 diff --git a/src/icons/3.png b/src/icons/3.png new file mode 100644 index 0000000000000000000000000000000000000000..76b41f0c539c54e37164ed43329245ebc46910c1 GIT binary patch literal 424 zcmV;Z0ayNsP)--Z2(z7 z2yILR|K1qxssQEy0C80W-jx96odEK_0HtvR&W!-FjR5-62&w=8^1=Z2#sKP}0HtXJ z!ifOpnE;t-1kQy3=A{7Ql>qwA1g?Dmu7v>Br2yWx01$UsssI200d!JMQvg8b*k%9# z0Le*2K~!kog^`I4f-n$7SxQ@Ii&7Bq#{1U)|2(@}G#ZEw&5(VWG@EG<{FCUJMNi6o z9W1&iB7GwOSg-HSKUo-tFeHDm949w>Z*vQZ03P@E7uOdL!NbA_hbc{rJey%OdZ?7S z6l3U8&j}9HfVD~zsmC4~V_KXj$UJPSrg|kUlt+R$V^SbyIoBIYJJnOEMzj%+d3i4U z^4FkQ#Xdr>i)Pxc5qC3hgI7Y3aFc>gCy2?=VG S13&Ws0000X0{{R3o5c5N0001xP)t-s00010 zKnOq-5dY>N<^bv#5CHlB`uf@s_R0YN;vD+Y2>;#~`qm8c!T|sO|Nq()^0old1lD<3 z1n#;3+O7cZssP%N0HtjJ;+X)AVGQ!V0FiA3&V>N(vH-q?0BuYJSwIM~fdHL-1lFMd z&H&P`fdI;l0Lq;JvULFV#sKD_0P3Lt>Z$aL9%v5D>&hDQLwi_VE61*AU87rVaJVe`aqs-|XR^ zjpsc|a32K*ge5izepvXGn-oIm1yM9{6B1fTwqx1sIQ6>i0%7|qIA@G;iu%;rls6;olDoL&Wl} zaXYye229AHgkW7cO@)HqlIr9pKP{OgHc+kIq%_^9IVsi)WD#@!Td9!c&P{emN0WS( zqPn^_@^X!IFqCnIy4*Ai2iIwgX=ml nO||PcA5{bQ{0;zs$NbkXIyVkC<8V~!00000NkvXXu0mjf<_p`i literal 0 HcmV?d00001 diff --git a/src/icons/5.png b/src/icons/5.png new file mode 100644 index 0000000000000000000000000000000000000000..75d989e51c0285c4ada28c5f1be026a0a5588e25 GIT binary patch literal 465 zcmV;?0WSWDP)N|Kc3>$^iP>5T$7Z|K1q?|Nr{d4Dz-B^1c9BKnQJ21aVaa^1=Y_vHN1m>Lp`qBjY&IIbA0P@BF&W!-}#sIE?1j3B~vW)=Fg#hlZ0RP$) z%7p;#x&YR$0IGEa%B296VFbE$0IrDyu7v=deFWaF0GV+F)};WMX$0Q305#;d)&Kwi z0d!JMQvg8b*k%9#0Om?|aNtt>4Ry0CQl|39uV?V$%d zFw;YyM<;*tqb*OBa^exy9?m&^B6*@I=LnGneocW+55f0iw4 z%`E8GdBW#j7ywjPi0&!wRn8c!wU?5rEfPi=ECg8~9FAjF*(d#m+#(9ykybx55u+Q$ zA<