import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import java.util.*;
/**
* This class is a visual component. The entry point for class execution
* is the constructor.
*/
public class file extends UserControl
{
public FileImg myFileImg;
main _main;
public file()
{
super();
// Required for Visual J++ Form Designer support
//
initForm();
myFileImg=new FileImg();
// TODO: Add any constructor code after initForm call
}
public void setmaincontrol(main mymain)
{
_main=mymain;
}
private void label1_click(Object source, Event e)
{
}
private void groupBox2_enter(Object source, Event e)
{
}
private void button1_click(Object source, Event e)
{
myFileImg.openFile();
labelfile.setText(myFileImg.getFileNmae());
editfilelength.setText(myFileImg.getLength()+"");
}
private void button5_click(Object source, Event e)
{
int [] AddArray=serial0add.exportint();
if(AddArray[AddArray.length-1]>=myFileImg.getLength())
{
if(MessageBox.show ("超出文件长度,修改文件长度吗?", "警告!", MessageBox.ICONINFORMATION | MessageBox.OKCANCEL)==MessageBox.IDOK)
{
myFileImg.setLength(AddArray[AddArray.length-1]+1);
}
return;
}
int [] ValArray=new int[0];
if(rbt8bit.getChecked())ValArray=myFileImg.getValues(AddArray,FileImg.BYTE);
if(rbt16bit.getChecked())ValArray=myFileImg.getValues(AddArray,FileImg.WORD);
if(rbt32bit.getChecked())ValArray=myFileImg.getValues(AddArray,FileImg.DWORD);
serial0val.importintpoint(ValArray);
_main.serialadd.importint(AddArray);
_main.serialval.importint(ValArray);
}
private void button10_click(Object source, Event e)
{
int index=0;
StringTokenizer LineNumA=new StringTokenizer(editadd.getText(),",");
int [] AddArray=new int[LineNumA.countTokens()];
while(LineNumA.hasMoreTokens()){AddArray[index]=Integer.parseInt(LineNumA.nextToken());index++;}
index=0;
LineNumA=new StringTokenizer(editValue.getText(),",");
int [] ValArray=new int[LineNumA.countTokens()];
while(LineNumA.hasMoreTokens()){ValArray[index]=Integer.parseInt(LineNumA.nextToken());index++;}
serial0add.importint(AddArray);
serial0val.importint(ValArray);
button11_click(source, e);
}
private void button6_click(Object source, Event e)
{
serial0add.importint(_main.serialadd.exportint());
}
private void button7_click(Object source, Event e)
{
serial0val.importint(_main.serialval.exportint());
}
private void button11_click(Object source, Event e)
{
int [] AddArray=serial0add.exportint();
if(AddArray[AddArray.length-1]>=myFileImg.getLength())
{
if(MessageBox.show ("超出文件长度,修改文件长度吗?", "警告!", MessageBox.ICONINFORMATION | MessageBox.OKCANCEL)==MessageBox.IDOK)
{
myFileImg.setLength(AddArray[AddArray.length-1]+1);
}
return;
}
int [] ValArray=serial0val.exportint();
if(rbt8bit.getChecked())myFileImg.setValues(AddArray,ValArray, FileImg.BYTE);
if(rbt16bit.getChecked())
{myFileImg.setValues(AddArray,ValArray,FileImg.WORD);
int sf=0;
}
if(rbt32bit.getChecked())myFileImg.setValues(AddArray,ValArray,FileImg.DWORD);
serial0val.importintpoint(ValArray);
_main.serialadd.importint(AddArray);
_main.serialval.importint(ValArray);
}
private void button3_click(Object source, Event e)
{
//Vector vInt=new Vector();
int index=0;
StringTokenizer LineNumA=new StringTokenizer(editadd.getText(),",");
int [] AddArray=new int[LineNumA.countTokens()];
while(LineNumA.hasMoreTokens())
{AddArray[index]=Integer.parseInt(LineNumA.nextToken());index++;}
serial0add.importint(AddArray);
button5_click(source, e);
editValue.setText(serial0val.mydynintarray.toString());
}
private void button8_click(Object source, Event e)
{
myFileImg.setLength(Integer.parseInt(editfilelength.getText()));
}
private void button9_click(Object source, Event e)
{
myFileImg.saveFile();
}
private void button2_click(Object source, Event e)
{
int [] AddArray=new int[0];
int [] AddArray1=new int[0];
int [] AddArray2=new int[0];
int [] ValArray=new int[0];
int [] temp;
int val=Integer.parseInt(editsheachvalue.getText());
if(rbt8bit.getChecked())
{if(cbxeq.getChecked())AddArray1=myFileImg.search(val,FileImg.BYTE);
if(cbxneq.getChecked())
{
temp=new int[myFileImg.getLength()];
for(int i=0;i<temp.length;i++)temp[i]=i;
AddArray2=jihe.jian(temp,myFileImg.search(val,FileImg.BYTE));
}
AddArray=jihe.bing(AddArray1,AddArray2);
ValArray=myFileImg.getValues(AddArray,FileImg.BYTE);
}
if(rbt16bit.getChecked())
{if(cbxeq.getChecked())AddArray1=myFileImg.search(val,FileImg.WORD);
if(cbxneq.getChecked())
{
temp=new int[myFileImg.getLength()-1];
for(int i=0;i<temp.length;i++)temp[i]=i;
AddArray2=jihe.jian(temp,myFileImg.search(val,FileImg.WORD));
}
AddArray=jihe.bing(AddArray1,AddArray2);
ValArray=myFileImg.getValues(AddArray,FileImg.WORD);
}
if(rbt32bit.getChecked())
{if(cbxeq.getChecked())AddArray1=myFileImg.search(val,FileImg.DWORD);
if(cbxneq.getChecked())
{
temp=new int[myFileImg.getLength()-3];
for(int i=0;i<temp.length;i++)temp[i]=i;
AddArray2=jihe.jian(temp,myFileImg.search(val,FileImg.DWORD));
}
AddArray=jihe.bing(AddArray1,AddArray2);
ValArray=myFileImg.getValues(AddArray,FileImg.DWORD);
}
serial0add.importintpoint(AddArray);
serial0val.importintpoint(ValArray);
_main.serialadd.importint(AddArray);
_main.serialval.importint(ValArray);
}
private void button4_click(Object source, Event e)
{
int i=0;
int temp;
String stradd=editbytesn.getText();
String nextnum;
StringTokenizer GroupLine=new StringTokenizer(stradd,",");
byte [] AddArray=new byte[GroupLine.countTokens()];
while(GroupLine.hasMoreTokens())
{
nextnum=GroupLine.nextToken();
temp=Integer.parseInt(nextnum)&0xff;
AddArray[i]=new Integer(temp).byteValue();
i++;
}
int [] _AddArray=myFileImg.searchByte(AddArray);
int [] _ValArray=myFileImg.getValues(_AddArray,FileImg.BYTE);
serial0add.importintpoint(_AddArray);
serial0val.importintpoint(_ValArray);
_main.serialadd.importint(_AddArray);
_main.serialval.importint(_ValArray);
}
private void editfilelength_textChanged(Object source, Event e)
{
}
private void button12_click(Object source, Event e)
{
labelfile.setText(myFileImg.saveFileAs());
}
private void editfilelength_enter(Object source, Event e)
{
editfilelength.setText(Integer.toString(myFileImg.getLength()));
}
/**
* NOTE: The following code is required by the Visual J++ form
* designer. It can be modified using the form editor. Do not
* modify it using the code editor.
*/
Container components = new Container();
Button button1 = new Button();
Label labelfile = new Label();
Edit editadd = new Edit();
Label label3 = new Label();
Label label2 = new Label();
GroupBox groupBox2 = new GroupBox();
Button button3 = new Button();
Edit editValue = new Edit();
GroupBox groupBox1 = new GroupBox();
GroupBox groupBox3 = new GroupBox();
RadioButton rbt8bit = new RadioButton();
RadioButton rbt16bit = new RadioButton();
RadioButton rbt32bit = new RadioButton();
Label label4 = new Label();
Label label5 = new Label();
serial serial0val = new serial();
serial serial0add = new serial();
Button button5 = new Button();
Button button6 = new Button();
Button button7 = new Button();
Edit editfilelength = new Edit();
Button button8 = new Button();
Button button9 = new Button();
Button button10 = new Button();
Button button11 = new Button();
G
没有合适的资源?快使用搜索试试~ 我知道了~
游戏文档编辑器源码(1.0)
共58个文件
class:34个
java:17个
resources:1个
需积分: 50 3.1k 下载量 75 浏览量
2002-09-01
00:00:00
上传
评论
收藏 150KB ZIP 举报
温馨提示
文件(游戏文档)编辑器,可进行文件比较,搜索,设值,编辑,集合运算,进制转换,求ASCII码等功能 ;;.灵活运用还可实现文件切割与合并,字符替换(尤其是普通字处理软件不能识别的字符,如回车键),加密解密等功能.
资源推荐
资源详情
资源评论
收起资源包目录
20029181243.zip (58个子文件)
god hand 1.0
MyEdit.class 2KB
about.class 2KB
addressproduce.java 9KB
filecamp.java 12KB
godhand1.0.exe 92KB
addressproduce$ClassInfo.class 332B
codebase.dat 31B
file$ClassInfo.class 302B
jzzh$ClassInfo.class 302B
serial0$ClassInfo.class 311B
deditor.java 12KB
heditor.class 6KB
H2DConver.class 5KB
MyEdit$ClassInfo.class 308B
FileImg.class 4KB
jihe.class 1KB
about.resources 8KB
dynbytearray.java 3KB
jzzh.class 5KB
filecamp$ClassInfo.class 314B
Project3.vjp 8KB
dynbytearray.class 2KB
deditor.class 8KB
jihecon.java 4KB
FileImg.java 8KB
jz.java 2KB
main.class 8KB
about$ClassInfo.class 305B
serial$ClassInfo.class 308B
main.java 12KB
dynintarray.class 2KB
FixStr.java 404B
serial.class 2KB
jzzh.java 8KB
AsciiConver.class 1KB
jz.class 2KB
deditor$ClassInfo.class 311B
FixStr.class 785B
serial0.class 1KB
MyEdit.java 2KB
file.class 9KB
about.java 2KB
godhand.gif 8KB
jihecon$ClassInfo.class 311B
jihe.java 2KB
serial.java 2KB
AsciiConver.java 1KB
heditor$ClassInfo.class 311B
filecamp.class 7KB
Project3.suo 8KB
Project3.sln 513B
jihecon.class 3KB
Project3.class 16KB
addressproduce.class 6KB
UEditor.class 17KB
Camp.class 17KB
dynintarray.java 2KB
file.java 16KB
共 58 条
- 1
资源评论
普通网友
- 粉丝: 882
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ctf web解题 找flag夺旗赛概述、原理及应用.pdf
- 2024%E5%B7%A5%E4%BD%9C%E7%BB%A9%E6%95%88%E8%A1%A8-%E4%BA%A7%E5%93%81%E4%B8%AD%E5%BF%83-%E7%A0%94%E5%8F%91%E4%BA%BA%E5%91%98-%E4%BF%A1%E9%98%B3.xlsx
- windows64位上运动的SSH代理
- 基于stm32f407vet6的智能小车
- 卡方数据.sav
- Python实现基于Django框架的二手物品购物网站设计源码+数据库.zip
- 基于Python和Django的二手物品购物网站设计源码+数据库脚本.zip
- 【计算机毕业设计】基于h5的移动网赚项目小程序【源码+lw+部署文档+讲解】
- 【计算机毕业设计】基于ssm-vue的oa系统设计与实现【源码+lw+部署文档+讲解】
- 基于pytorch实现的YOLOV5+SORT的车辆行人目标识别及追踪系统源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功