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

📄 m_duty.java

📁 超精典手机版Call of Duty(使命的召唤)
💻 JAVA
字号:

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

public abstract class M_Duty extends MIDlet
    implements CommandListener
{
  public Display display;
  public String appName;
    public static M_Duty midlet;
    protected boolean verifyLicence;
    
    
    static final int UNLOCK_CODE_KEY = 1;
    static final int USER_ID_KEY = 2;
    static final int PASSWORD_KEY = 3;
    private String unlockCode;
    public static final Command cmdExit = new Command("Exit", 7, 1);
    public static final Command cmdFatalExit = new Command("Exit", 7, 1);
    public static final Command cmdFinalExit = new Command("Exit", 7, 1);
    public M_Duty()
    {
     	verifyLicence = true;
        display = Display.getDisplay(this);
    }

    protected final void startApp()
     throws MIDletStateChangeException
    {
     startRegisteredApp();
    }

  protected abstract void startRegisteredApp()
      throws MIDletStateChangeException;

    public void pauseApp()
    {
    }

    public void destroyApp(boolean flag)
    {
    }

    public void exit()
    {
  finalExit();
    }

    private void finalExit()
    {
        destroyApp(true);
        notifyDestroyed();
    }

    private void registerApp()
    {
    }

    private void getUnlockCode()
    {
    }

    private void confirmedGetUnlockCode()
    {
    }

    private void checkUnlockCode(String s)
        throws MIDletStateChangeException
    {
        startRegisteredApp();
    }

    public void errorAlert(String s)
    {
    }

    public void fatalErrorAlert(String s)
    {
        Form form = new Form("Fatal Error!", new Item[] {
            new StringItem(null, s)
        });
        form.addCommand(cmdFinalExit);
        form.setCommandListener(this);
        display.setCurrent(form);
    }

    public void billingEvent(String s, String s1)
    {
    }

    public void postUserData(String s, String s1)
    {
    }

    public void commandAction(Command command, Displayable displayable)
    {
     if(command == cmdExit)
          exit();
    }

}

⌨️ 快捷键说明

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