📄 cipclient.java
字号:
buttonOperationStopM =new Button("停止当前音乐");
buttonOperationCls =new Button("公共区清屏");
buttonOperationClsMe =new Button("个人区清屏");
buttonOperationPM =new Button("千里传音");
textChatMessageAD =new TextArea("",2,70,textChatMessageAD.SCROLLBARS_VERTICAL_ONLY);
textChatMessageTitle =new TextField(70);
textChatMessage =new TextArea("",16,70,textChatMessage.SCROLLBARS_VERTICAL_ONLY);
textChatMessageMe =new TextArea("",10,70,textChatMessageMe.SCROLLBARS_VERTICAL_ONLY);
list =new List(33);
gl =new GridBagLayout();
gbc =new GridBagConstraints();
choiceAdmin =new Choice();
choiceOperationXQ =new Choice();
choiceOperationCYGN =new Choice();
choiceOperationGLGN =new Choice();
choiceOperationMPGL =new Choice();
choiceOperationDDFW =new Choice();
calendar=new GregorianCalendar();
dateSystemTimeMusic=calendar.get(Calendar.SECOND);
System.out.println("dateSystemTimeMusic="+dateSystemTimeMusic);
try
{
cxajh_mid_1=new FileInputStream("./music/cxajh_1.mid");
cxajh_mid_2=new FileInputStream("./music/cxajh_2.mid");
cxajh_mid_3=new FileInputStream("./music/cxajh_3.mid");
cxajh_mid_4=new FileInputStream("./music/cxajh_4.mid");
cxajh_mid_5=new FileInputStream("./music/cxajh_5.mid");
cxajh_mid_6=new FileInputStream("./music/cxajh_6.mid");
cxajh_mid_7=new FileInputStream("./music/cxajh_7.mid");
cxajh_mid_8=new FileInputStream("./music/cxajh_8.mid");
cxajh_mid_9=new FileInputStream("./music/cxajh_9.mid");
cxajh_mid_10=new FileInputStream("./music/cxajh_10.mid");
cxajh_mid_cd=new FileInputStream("./dz/cd.mid");
cxajh_mid_ad=new FileInputStream("./dz/ad.mid");
cxajh_music_1=new AudioStream(cxajh_mid_1);
cxajh_music_2=new AudioStream(cxajh_mid_2);
cxajh_music_3=new AudioStream(cxajh_mid_3);
cxajh_music_4=new AudioStream(cxajh_mid_4);
cxajh_music_5=new AudioStream(cxajh_mid_5);
cxajh_music_6=new AudioStream(cxajh_mid_6);
cxajh_music_7=new AudioStream(cxajh_mid_7);
cxajh_music_8=new AudioStream(cxajh_mid_8);
cxajh_music_9=new AudioStream(cxajh_mid_9);
cxajh_music_10=new AudioStream(cxajh_mid_10);
cxajh_music_cd=new AudioStream(cxajh_mid_cd);
cxajh_music_ad=new AudioStream(cxajh_mid_ad);
}
catch(Exception ex)
{
ex.printStackTrace();
}
musics=dateSystemTimeMusic;
if (YNPlayMusic.equals("1"))
{
if (dateSystemTimeMusic<6)
AudioPlayer.player.start(cxajh_music_1);
else if (dateSystemTimeMusic<12)
AudioPlayer.player.start(cxajh_music_2);
else if (dateSystemTimeMusic<18)
AudioPlayer.player.start(cxajh_music_3);
else if (dateSystemTimeMusic<24)
AudioPlayer.player.start(cxajh_music_4);
else if (dateSystemTimeMusic<30)
AudioPlayer.player.start(cxajh_music_5);
else if (dateSystemTimeMusic<36)
AudioPlayer.player.start(cxajh_music_6);
else if (dateSystemTimeMusic<42)
AudioPlayer.player.start(cxajh_music_7);
else if (dateSystemTimeMusic<48)
AudioPlayer.player.start(cxajh_music_8);
else if (dateSystemTimeMusic<54)
AudioPlayer.player.start(cxajh_music_9);
else
AudioPlayer.player.start(cxajh_music_10);
}
choiceAdmin.add("【祝贺江湖网管列表】");
choiceOperationXQ.addItem("聊天心情");
choiceOperationXQ.addItem("高兴地");
choiceOperationXQ.addItem("悲伤地");
choiceOperationXQ.addItem("快乐地");
choiceOperationXQ.addItem("兴奋地");
choiceOperationXQ.addItem("痛苦地");
choiceOperationXQ.addItem("大声地");
choiceOperationXQ.addItem("偷偷地");
choiceOperationXQ.addItem("愉快地");
choiceOperationCYGN.addItem("江湖服务");
choiceOperationCYGN.addItem("千里传音");
choiceOperationCYGN.addItem("标题");
choiceOperationCYGN.addItem("送钱");
choiceOperationCYGN.addItem("偷钱");
choiceOperationCYGN.addItem("邀请");
choiceOperationCYGN.addItem("会见");
choiceOperationCYGN.addItem("送物品");
choiceOperationCYGN.addItem("狮子吼");
choiceOperationCYGN.addItem("使用物品");
choiceOperationCYGN.addItem("吸星大法");
choiceOperationCYGN.addItem("加入门派");
choiceOperationCYGN.addItem("离开门派");
choiceOperationMPGL.addItem("门派管理");
choiceOperationMPGL.addItem("册封");
choiceOperationMPGL.addItem("禅位");
choiceOperationMPGL.addItem("驱逐");
choiceOperationMPGL.addItem("传授内力");
choiceOperationMPGL.addItem("传授武功");
choiceOperationGLGN.addItem("江湖管理");
choiceOperationGLGN.addItem("原子弹");
choiceOperationGLGN.addItem("踢人");
choiceOperationGLGN.addItem("点穴");
choiceOperationGLGN.addItem("解穴");
choiceOperationGLGN.addItem("麻痹");
choiceOperationGLGN.addItem("治疗");
choiceOperationGLGN.addItem("清屏");
choiceOperationGLGN.addItem("警告");
choiceOperationGLGN.addItem("严重警告");
choiceOperationGLGN.addItem("系统公告");
choiceOperationGLGN.addItem("群千里传音");
choiceOperationGLGN.addItem("特大核能飞弹");
choiceOperationGLGN.addItem("五雷封顶");
choiceOperationGLGN.addItem("群踢人");
choiceOperationGLGN.addItem("强制踢人");
choiceOperationGLGN.addItem("奖励");
choiceOperationGLGN.addItem("天谴");
choiceOperationGLGN.addItem("升级");
choiceOperationGLGN.addItem("降级");
choiceOperationGLGN.addItem("调级");
choiceOperationGLGN.addItem("通缉");
choiceOperationGLGN.addItem("逮捕");
choiceOperationGLGN.addItem("释放");
choiceOperationGLGN.addItem("看IP");
choiceOperationGLGN.addItem("封IP");
choiceOperationGLGN.addItem("解IP");
choiceOperationGLGN.addItem("斩首");
choiceOperationGLGN.addItem("凌迟");
textOperationFromName.setText("未登陆");
textOperationToName.setText("大家");
calendar=new GregorianCalendar();
dateSystemTime=calendar.get(Calendar.HOUR)+":"+calendar.get(Calendar.MINUTE)+":"+calendar.get(Calendar.SECOND);
gbc.fill=GridBagConstraints.BOTH;
gbc.anchor=GridBagConstraints.NORTHWEST;
frameMain.getContentPane().add(panelMain);
panelLogin.add(labelLoginName);
panelLogin.add(textLoginName);
panelLogin.add(labelLoginPass);
panelLogin.add(textLoginPass);
panelLogin.add(buttonLoginOK);
panelLogin.add(buttonLoginReg);
panelLogin.add(buttonLoginCancel);
panelMain.add(panelLogin);
panelChat.setLayout(gl);
//panelOperation.setLayout(gl);
gbc.gridwidth=GridBagConstraints.REMAINDER;
gbc.gridheight=1;
gbc.weightx=0;
gbc.weighty=0.5;
gl.setConstraints(textChatMessageAD,gbc);
panelChat.add(textChatMessageAD);
gl.setConstraints(textChatMessageTitle,gbc);
panelChat.add(textChatMessageTitle);
gl.setConstraints(textChatMessage,gbc);
panelChat.add(textChatMessage);
gbc.gridwidth=GridBagConstraints.REMAINDER;
gbc.gridheight=1;
gl.setConstraints(textChatMessageMe,gbc);
panelChat.add(textChatMessageMe);
panelMain.add(panelChat);
gbc.weighty=1.0;
gbc.gridwidth=GridBagConstraints.REMAINDER;
gbc.gridheight=2;
gl.setConstraints(list,gbc);
panelOnlineUser.add(list);
panelMain.add(panelOnlineUser);
panelOperation.add(buttonOperationSL);
panelOperation.add(textOperationFromName);
panelOperation.add(choiceOperationXQ);
panelOperation.add(labelOperationTo);
panelOperation.add(textOperationToName);
panelOperation.add(textOperationMessageSend);
panelOperation.add(buttonOperationSend);
panelOperation.add(buttonOperationRe);
panelMain.add(panelOperation);
panelOperation2.add(buttonOperationCls);
panelOperation2.add(buttonOperationClsMe);
panelOperation2.add(choiceOperationCYGN);
panelOperation2.add(choiceOperationMPGL);
panelOperation2.add(choiceOperationGLGN);
panelOperation2.add(choiceAdmin);
//panelOperation2.add(textOperationMessagePM);
//panelOperation2.add(buttonOperationPM);
panelMain.add(panelOperation2);
panelOperation3.add(buttonOperationPlayM);
panelOperation3.add(buttonOperationStopM);
panelMain.add(panelOperation3);
panelMain.add(panelReg);
panelMain.add(panelAD);
panelMain.add(panelPM);
panelMain.add(panelChatMessage);
panelMain.setBackground(new Color(50,135,0));
panelLogin.setBackground(new Color(50,135,0));
panelReg.setBackground(new Color(50,135,0));
panelChat.setBackground(new Color(50,135,0));
panelOnlineUser.setBackground(new Color(50,135,0));
panelOperation.setBackground(new Color(50,135,0));
panelOperation2.setBackground(new Color(50,135,0));
panelOperation3.setBackground(new Color(50,135,0));
panelAD.setBackground(new Color(50,135,0));
panelPM.setBackground(new Color(50,135,0));
panelChatMessage.setBackground(new Color(50,135,0));
//Font myFont=new Font("宋体",Font.BOLD,12);
//textChatMessageAD.setFont(myFont);
textChatMessageAD.setBackground(Color.yellow);
textChatMessageAD.setForeground(Color.red);
textChatMessageTitle.setBackground(new Color(0,51,153));
textChatMessageTitle.setForeground(new Color(255,255,255));
textChatMessage.setBackground(new Color(250,235,220));
textChatMessage.setForeground(new Color(0,0,153));
textChatMessageMe.setBackground(new Color(254,255,204));
textChatMessageMe.setForeground(new Color(50,135,0));
textLoginName.setBackground(new Color(250,235,220));
textLoginPass.setBackground(new Color(250,235,220));
textOperationFromName.setBackground(new Color(250,235,220));
textOperationFromName.setForeground(new Color(0,0,153));
choiceOperationXQ.setBackground(new Color(250,235,220));
choiceOperationXQ.setForeground(new Color(0,0,153));
choiceOperationCYGN.setBackground(new Color(254,255,204));
choiceOperationCYGN.setForeground(new Color(50,135,0));
choiceOperationGLGN.setBackground(new Color(254,255,204));
choiceOperationGLGN.setForeground(Color.red);
choiceOperationMPGL.setBackground(new Color(254,255,204));
choiceOperationMPGL.setForeground(Color.red);
choiceAdmin.setBackground(new Color(254,255,204));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -