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

📄 cmdui.java

📁 Java编写个人日程管理工具, 具有添加编辑日程和自动适应功能, 程序包含完整的Document和测试运行环境
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package ui;import java.io.*;import java.util.StringTokenizer;import logical.AgendaService;/** * 基于命令行的用户交互界面 * @author zouhao */public class CmdUi {    Show show;    AgendaService agenda;    String input;    boolean success;    BufferedReader keybaord = new BufferedReader(new InputStreamReader(System.in));    public CmdUi()    {        try{            show = Show.getInstance();            show.Introduce();            success =false;            CommandHead();            input = keybaord.readLine();            while(!input.equalsIgnoreCase("quit"))            {                   input.toLowerCase();                StringTokenizer stringtoken = new StringTokenizer(input);                String temp=stringtoken.nextToken();                Command command = CommandFactory.factory(temp);                if(command==null)                {                    CommandHead();                    input = keybaord.readLine();                    continue;                }                command.parse(input);                success = command.Execute();                if(success)                {                    System.out.println("Success to "+temp+"!");                }                else {System.out.println("Fail to "+temp+"!");}                show.ToShow(command.ToString());                CommandHead();                input = keybaord.readLine();            }            System.exit(0);        }        catch (Exception e){}    }    void CommandHead()    {        System.out.print("$");    }    }

⌨️ 快捷键说明

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