📄 mmidlet.java
字号:
{
notifyDestroyed();
}
return;
}
}
private void removeStranger(Buddy buddy)
{
ml_StrangerList.deleteItem(buddy.item);
ht_StrangerList.remove(buddy.uri);
if(ml_StrangerList.size() == 0)
canvas.strangerListEmpty();
}
private void getBuddyInfByUri(String s, boolean flag)
{
Transform.instance.getUserInfByUri(s);
if(flag)
viewBuddyUri = s;
else
viewBuddyUri = null;
}
private WpendingPair removeWpendingANDBackNextScreen(Displayable displayable)
{
WpendingPair wpendingpair = (WpendingPair)vec_Wpending.firstElement();
vec_Wpending.removeElementAt(0);
if(!vec_Wpending.isEmpty())
WpendingPair.displayable = showWpendingScreen((WpendingPair)vec_Wpending.firstElement(), null);
else
WpendingPair.displayable = popAndBackScreen(displayable);
return wpendingpair;
}
private void showInsertCommonWords()
{
List list = new List("常用短语", 3, commonWords, null);
list.setCommandListener(this);
list.addCommand(Setting.cmd_Back);
list.addCommand(Setting.cmd_Selected);
pushBackScreen(display.getCurrent());
display.setCurrent(list);
}
private boolean service_AddBuddy(String s, char c, int i)
{
if(c == 'U' && ht_BuddyList.containsKey(s))
{
return false;
} else
{
initServiceAction("AC" + '\002' + c + '\002' + s, (byte)i);
return true;
}
}
private synchronized void initServiceAction(String s, byte byte0)
{
ServiceAction serviceaction = new ServiceAction(s);
serviceaction.flag = byte0;
if(vec_UninitServiceQueue == null)
vec_UninitServiceQueue = new Vector(2);
if(!vec_UninitServiceQueue.contains(serviceaction))
vec_UninitServiceQueue.addElement(serviceaction);
if(as_CurrentServiceAction == null)
{
as_CurrentServiceAction = (ServiceAction)vec_UninitServiceQueue.firstElement();
Transform.instance.initServiceAction(as_CurrentServiceAction.commandString);
}
}
private void showAddBuddy()
{
Form form = new Form("直接添加好友");
form.append(new TextField("手机号码", "", 11, 3));
form.append(new TextField("飞信号", "", 9, 2));
form.append("\n只需并且只能输入一项。\n");
form.setCommandListener(this);
form.setItemStateListener(this);
form.addCommand(Setting.cmd_OK);
form.addCommand(Setting.cmd_Back);
pushBackScreen(display.getCurrent());
display.setCurrent(form);
}
private void service_UpdateUserProfile(User user1)
{
initServiceAction("UUP" + '\002' + user1.nickName + '\002' + user1.impresa + '\002' + user1.birthDate + '\002' + user1.getGender(true) + '\002' + user1.email, (byte)-1);
}
private void service_ChangeBuddyNickName(String s, Buddy buddy)
{
initServiceAction("CUBG" + '\002' + buddy.uri + '\002' + s, (byte)-1);
}
private void service_BlockBuddy(String s, char c, boolean flag)
{
initServiceAction("BC" + '\002' + c + '\002' + s + '\002' + (flag ? '1' : 48), (byte)-1);
}
private void service_PhoneState(String s)
{
initServiceAction("GMI" + '\002' + s, (byte)-1);
}
private boolean service_DeleteBuddy(Buddy buddy)
{
if(ht_BuddyList.containsKey(buddy.uri))
{
Enumeration enumeration = null;
enumeration = vec_CancelWpendingPair.elements();
do
{
if(!enumeration.hasMoreElements())
break;
WpendingPair wpendingpair = (WpendingPair)enumeration.nextElement();
if(wpendingpair.uri.compareTo(buddy.uri) == 0)
vec_CancelWpendingPair.removeElement(wpendingpair);
} while(true);
initServiceAction("DC" + '\002' + buddy.uri, (byte)-1);
return true;
} else
{
return false;
}
}
private void showDeleteBuddyConfirm()
{
Form form = new Form("删除");
form.setCommandListener(this);
form.addCommand(cmd_Yes);
form.addCommand(cmd_No);
form.append("删除此人将会将其\n从您的联系人名单\n中移除。但并不能\n阻止他/她可以看到\n您的联机状态或向\n您发送消息。\n");
form.append(new StringItem("昵称", selectedBuddy.nickName));
form.append(new StringItem("飞信号", selectedBuddy.sid));
ChoiceGroup choicegroup = new ChoiceGroup("", 2, new String[] {
"同时加入黑名单"
}, null);
choicegroup.setSelectedIndex(0, isBlock(selectedBuddy.uri));
form.append(choicegroup);
display.setCurrent(form);
}
public void showPhoneState(String s, String s1)
{
String s2;
if(s1.equals("01"))
s2 = "开机";
else
if(s1.equals("02"))
s2 = "通话中";
else
if(s1.equals("08"))
s2 = "不在服务区";
else
if(s1.equals("09"))
s2 = "关机";
else
if(s1.equals("10"))
s2 = "查不到";
else
s2 = "未知";
Form form = new Form("手机状态");
form.setCommandListener(this);
form.addCommand(Setting.cmd_Back);
StringBuffer stringbuffer = new StringBuffer(50);
stringbuffer.append("昵称").append('\uFF1A').append(getNickNameByUri(s)).append('\n');
stringbuffer.append("手机状态").append('\uFF1A').append(s2);
form.append(stringbuffer.toString());
pushBackScreen(display.getCurrent());
display.setCurrent(form);
}
public void showMyPresenceList()
{
List list = new List("我的状态", 3, ChineseString.myPresences, null);
list.setCommandListener(this);
list.addCommand(Setting.cmd_Back);
list.addCommand(Setting.cmd_Selected);
list.setSelectedIndex(currentPresenceIndex, true);
pushBackScreen(display.getCurrent());
display.setCurrent(list);
}
private void showEditWordsTextBox()
{
TextBox textbox = new TextBox("编辑常用语", commonWords[selectedWordsIndex], 400, 0);
textbox.setCommandListener(this);
textbox.addCommand(Setting.cmd_Back);
textbox.addCommand(Setting.cmd_OK);
pushBackScreen(display.getCurrent());
display.setCurrent(textbox);
}
private void showCommonWordsList()
{
List list = new List("编辑常用语", 3, commonWords, null);
list.setCommandListener(this);
list.addCommand(cmd_Save);
list.addCommand(Setting.cmd_Back);
list.setSelectedIndex(selectedWordsIndex, true);
pushBackScreen(optionList);
display.setCurrent(list);
}
public Displayable popAndBackScreen(Displayable displayable)
{
if(backScreens != null && !backScreens.empty())
{
Displayable displayable1 = (Displayable)backScreens.pop();
display.setCurrent(displayable1);
if(displayable1 != canvas && "请等待".equals(displayable.getTitle()))
cancelActionOnWaitingScreen(displayable1);
return displayable1;
} else
{
return null;
}
}
public void showSystemSetting()
{
cg_MessageNotify = new ChoiceGroup("新消息提示方式", 2, new String[] {
"响铃", "震动"
}, null);
cg_Authorization = new ChoiceGroup("是否允许别人加我为好友", 1, new String[] {
"无需验证", "需要验证", "全部拒绝"
}, null);
cg_Authorization.setSelectedIndex(User.addBuddyOption - 1, true);
cg_MessageNotify.setLayout(512);
cg_Authorization.setLayout(512);
cg_MessageNotify.setSelectedFlags(messageNotifyFlag);
Form form = new Form("系统设定");
form.append(cg_MessageNotify);
form.append(cg_Authorization);
form.setCommandListener(this);
form.addCommand(cmd_Save);
form.addCommand(Setting.cmd_Back);
pushBackScreen(display.getCurrent());
display.setCurrent(form);
}
private void showOptionList()
{
if(optionList == null)
{
optionList = new List("选项", 3, new String[] {
"系统设定", "编辑常用语"
}, null);
optionList.addCommand(Setting.cmd_Back);
optionList.addCommand(Setting.cmd_Selected);
optionList.setCommandListener(this);
}
pushBackScreen(mainList);
display.setCurrent(optionList);
}
private void logout()
{
isLogin = false;
byeAllChatSession();
Transform.instance.logout();
}
private void byeAllChatSession()
{
Enumeration enumeration = ht_AllChatSession.elements();
Vector vector = new Vector(3);
do
{
if(!enumeration.hasMoreElements())
break;
ChatSession chatsession = (ChatSession)enumeration.nextElement();
if(chatsession.getSessionName() != null)
vector.addElement(chatsession.getSessionName());
} while(true);
if(vector.size() > 0)
{
String as[] = new String[vector.size()];
vector.copyInto(as);
Transform.instance.byeChatSession(as);
}
}
private void showConfirmCancelService(Displayable displayable)
{
Form form = new Form("业务退订");
form.setCommandListener(this);
form.addCommand(Setting.cmd_Back);
form.addCommand(Setting.cmd_OK);
form.append("您是否确信停止“Fetion”服务,如果停止了该服务,您将不能再使用“Fetion”服务的所有功能。");
pushBackScreen(displayable);
display.setCurrent(form);
}
private void cancelActionOnWaitingScreen(Displayable displayable)
{
if(displayable == form_ServiceIntro)
cancelOpenService = true;
else
if(displayable == form_LoginState)
{
cancelLogin = true;
showWaitingScreen("正在取消...", null);
}
}
private void showLogoutScreen()
{
Form form = new Form("注销");
if(isDestroy)
{
form.setTitle("退出");
form.append("正在退出,请稍候...");
} else
{
form.append("正在注销,请稍候...");
}
Gauge gauge = new Gauge("", false, -1, 2);
form.append(gauge);
display.setCurrent(form);
logout();
}
void showHelpList()
{
List list = new List("帮助", 3);
list.append("资费说明", null);
list.append("操作技巧", null);
list.append("关于", null);
list.setCommandListener(this);
list.addCommand(Setting.cmd_Back);
list.addCommand(Setting.cmd_Selected);
pushBackScreen(display.getCurrent());
display.setCurrent(list);
}
private void ShowHelpManipulateForm()
{
Form form = new Form("操作技巧");
form.append(new StringItem("1", "请按照提示操作,否则您将无法正常使用。若设置错误,请删除后重新下载。"));
form.append(new StringItem("2", ChineseString.HELP_MANIPULATE_CONTENT));
form.setCommandListener(this);
form.addCommand(Setting.cmd_Back);
pushBackScreen(display.getCurrent());
display.setCurrent(form);
}
private void ShowHelpEmployeForm()
{
Form form = new Form("资费说明");
form.append(FEE_README);
form.setCommandListener(this);
form.addCommand(Setting.cmd_Back);
pushBackScreen(display.getCurrent());
display.setCurrent(form);
}
private void ShowHelpAboutForm()
{
Form form = new Form("关于");
int i = "程序名称:飞信通用版\n提供商:\n客服电话:10086\nVersion:\nBuild:".indexOf("客服电话");
StringBuffer stringbuffer = new StringBuffer("程序名称:飞信通用版\n提供商:\n客服电话:10086\nVersion:\nBuild:");
stringbuffer.insert(i - 1, "中国移动有限公司");
i = stringbuffer.toString().indexOf("Build");
stringbuffer.insert(i - 1, version);
String s = getAppProperty("clientVersion");
if(s == null)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -