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

📄 gotext.java

📁 goText is a program for mobile phones that allows you to send text messages over GPRS/EDGE/UMTS. It
💻 JAVA
字号:
/**
 * Class : short description
 * @author Michele 'Miccar' Cardinale miccar@gmail.com
 * @author Natale Vinto ebballon@interfree.it
 * @version 1.0
 */

 /*
 *  goText : text messaging over GPRS
 *  Copyright (C) 2006  Natale Vinto <ebballon@interfree.it>
 *  OpenJLab Group www.openjlab.org
 *  Copyright (C) 2006  Michele Cardinale 'Miccar' <miccar@gmail.com>
 *  www.miccar.org
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;


public class goText extends MIDlet {
    
    public Display display;
    public MainCanvas mc;
    public static Service[] services;
    public static Message[] messages;
    public static Contact[] contacts;
    public static Options options;
    public static Message last_message;
    public static int lang;
    
    public void startApp() {
        start();
        display=Display.getDisplay(this);
        mc=new MainCanvas(this);
    }
    
    public void pauseApp() {
    }
    
    public void destroyApp(boolean unconditional) {
        notifyDestroyed();
    }
    
    private void start(){
        Service.generateServicesArray();
        Message.generateMessagesArray();
        Contact.generateContactsArray();
        this.options=new Options();
        Calendar old_cal= Calendar.getInstance();
        Calendar new_cal= Calendar.getInstance();
        old_cal.setTime(new Date(options.getTimestamp()));
        new_cal.setTime(new Date());
        if(old_cal.get(Calendar.DAY_OF_MONTH)!=new_cal.get(Calendar.DAY_OF_MONTH)){
            for (int i=0;i<services.length;i++)
                services[i].resetSentMsg();
        }
        options.setTimestamp((new Date()).getTime());
        last_message=null;
        this.lang=options.getLang();
        if (services.length==0){
            Service.insServiceConfig("SMS 190", "http://www.gotext.org/pub/sms190.php", "1", "1", "0", "4", "360", "10", "0", "1");
	    Service.insServiceConfig("SMS 190 email", "http://www.gotext.org/pub/sms190email.php", "1", "0", "2", "3", "360", "10", "0", "1");
	    Service.insServiceConfig("MMS 190", "http://www.gotext.org/pub/mms190.php", "0", "0", "1", "4", "600", "20", "0", "1");
	    Service.insServiceConfig("EMAIL", "http://www.gotext.org/pub/email.php", "1", "0", "2", "1", "1000", "20", "0", "0");
	    
            Service.insServiceConfig("RossoAlice", "http://www.gotext.org/cgi-bin/alicesmscgi.pl", "1", "1", "0", "1", "640", "10", "0", "1");
	    Service.insServiceConfig("SMS TIM", "http://www.gotext.org/cgi-bin/timsmscgi.pl", "1", "1", "2", "1", "640", "10", "0", "1");
	    Service.insServiceConfig("Tin", "http://www.gotext.org/cgi-bin/tinsmscgi.pl", "1", "1", "0", "1", "160", "10", "0", "1");
            Service.insServiceConfig("Personal AR", "http://www.gotext.org/pub/personal.php", "0", "0", "1", "1", "110", "30", "0", "1");
            
        }
        
    }
}

⌨️ 快捷键说明

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