cnmeysam
شنبه 11 شهریور 1396, 18:58 عصر
سلام
بالاخره تونستم کدی بنویسم که توی فایل متنی داخل هر خط که دلم میخواد متن مورد نظرمو رو بنویسه
فرض کردم 22 خط هستش فایل متنیم و پسوندش هم dll گذاشتم
گفتم توی 4 خط اول اگه تیک زده باشک چک باکسشون رو اون 4 خط عوض شن
فقط میخواستم نظرتونو راجع به کدی که نوشتم بدونم کارم تا چه حد درست یا غلطه همین
ممنون میشم اگه اشتباهه بهم توضیح بدین دلیلش رو
private void btnregisterActionPerformed(java.awt.event.ActionEv ent evt) {
// TODO add your handling code here:
//تنظیمات شهر
if(comboform.getSelectedItem()=="شهر"){
//تغییر مشخصات نام جستجو
if(checksearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -22;
String extraLine = "jPanel1.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات نام جستجو
//تغییر مشخصات متن جستجو
if(checktxtsearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -21;
String extraLine = "jLabel1.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات متن جستجو
//تغییر مشخصات کومبو جستجو
if(checkcombosearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -20;
String extraLine = "txtsearch.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات کومبو جستجو
//تغییر مشخصات باتن جستجو
if(checkbtnsearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -19;
String extraLine = "btnsearch.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات باتن جستجو
}
}
cnmeysam
یک شنبه 12 شهریور 1396, 05:52 صبح
یعنی کد من باید همچین چیزی بشه؟
private void cty() {
//تنظیمات شهر
if(comboform.getSelectedItem()=="شهر"){
//تغییر مشخصات نام جستجو
if(checksearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -1;
String extraLine = "jPanel1.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -2;
String extraLine2 = "jPanel1.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -3;
String extraLine3 = "jPanel1.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات نام جستجو
//تغییر مشخصات متن جستجو
if(checktxtsearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -4;
String extraLine = "jLabel1.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -5;
String extraLine2 = "jLabel1.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -6;
String extraLine3 = "jLabel1.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات متن جستجو
//تغییر مشخصات کومبو جستجو
if(checkcombosearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -7;
String extraLine = "txtsearch.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -8;
String extraLine2 = "txtsearch.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -9;
String extraLine3 = "txtsearch.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات کومبو جستجو
//تغییر مشخصات باتن جستجو
if(checkbtnsearch.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -10;
String extraLine = "btnsearch.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -11;
String extraLine2 = "btnsearch.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -12;
String extraLine3 = "btnsearch.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات باتن جستجو
//تغییر مشخصات نام اصلی
if(checknameasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -13;
String extraLine = "jPanel2.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -14;
String extraLine2 = "jPanel2.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -15;
String extraLine3 = "jPanel2.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات نام اصلی
//تغییر مشخصات لیبل استان اصلی
if(checkmatnasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -16;
String extraLine = "jLabel3.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -17;
String extraLine2 = "jLabel3.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -18;
String extraLine3 = "jLabel3.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات لیبل استان اصلی
//تغییر مشخصات لیبل شهر اصلی
if(checkmatnasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -19;
String extraLine = "jLabel2.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -20;
String extraLine2 = "jLabel2.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -21;
String extraLine3 = "jLabel2.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات لیبل شهر اصلی
//تغییر مشخصات لیبل ارور اصلی
if(checkmatnasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -22;
String extraLine = "lbl_error.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -23;
String extraLine2 = "lbl_error.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -24;
String extraLine3 = "lbl_error.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات لیبل ارور اصلی
//تغییر مشخصات کومبو اصلی
if(checkcomboasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -25;
String extraLine = "combostate.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -26;
String extraLine2 = "combostate.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -27;
String extraLine3 = "combostate.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات کومبو اصلی
//تغییر مشخصات تکست اصلی
if(checktozihatasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -28;
String extraLine = "txtcity.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -29;
String extraLine2 = "txtcity.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -30;
String extraLine3 = "txtcity.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات تکست اصلی
//تغییر مشخصات دکمه ثبت اصلی
if(checkbutonasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -31;
String extraLine = "btnregister.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -32;
String extraLine2 = "btnregister.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -33;
String extraLine3 = "btnregister.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات دکمه ثبت اصلی
//تغییر مشخصات دکمه ویرایش اصلی
if(checkbutonasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -34;
String extraLine = "btnedit.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -35;
String extraLine2 = "btnedit.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -36;
String extraLine3 = "btnedit.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات دکمه ویرایش اصلی
//تغییر مشخصات دکمه حذف اصلی
if(checkbutonasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -37;
String extraLine = "btndelete.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -38;
String extraLine2 = "btndelete.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -39;
String extraLine3 = "btndelete.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات دکمه حذف اصلی
//تغییر مشخصات دکمه حدید اصلی
if(checkbutonasli.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -40;
String extraLine = "btnnew.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -41;
String extraLine2 = "btnnew.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -42;
String extraLine3 = "btnnew.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات دکمه حدید اصلی
//تغییر مشخصات دکمه حدید اصلی
if(cheknamepage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -43;
String extraLine = "jPanel3.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -44;
String extraLine2 = "jPanel3.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -45;
String extraLine3 = "jPanel3.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات دکمه حدید اصلی
//تغییر مشخصات صفحه بندی لیبل صفحه
if(cheklblpage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -46;
String extraLine = "jLabel17.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -47;
String extraLine2 = "jLabel17.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -48;
String extraLine3 = "jLabel17.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات صفحه بندی لیبل صفحه
//تغییر مشخصات صفحه بندی لیبل شروع
if(cheklblpage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -49;
String extraLine = "jLabel19.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -50;
String extraLine2 = "jLabel19.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -51;
String extraLine3 = "jLabel19.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات صفحه بندی لیبل شروع
//تغییر مشخصات صفحه بندی لیبل تعداد
if(cheklblpage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -52;
String extraLine = "jLabel21.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -53;
String extraLine2 = "jLabel21.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -54;
String extraLine3 = "jLabel21.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات صفحه بندی لیبل تعداد
//تغییر مشخصات صفحه بندی دکمه اول
if(chekbtnpage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -55;
String extraLine = "btnfirst.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -56;
String extraLine2 = "btnfirst.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -57;
String extraLine3 = "btnfirst.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات صفحه بندی دکمه اول
//تغییر مشخصات صفحه بندی دکمه بعدی
if(chekbtnpage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -58;
String extraLine = "btnnext.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -59;
String extraLine2 = "btnnext.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -60;
String extraLine3 = "btnnext.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات صفحه بندی دکمه بعدی
//تغییر مشخصات صفحه بندی دکمه قبلی
if(chekbtnpage.isSelected()){
try {
Path path = Paths.get("city.dll");
List<String> lines = Files.readAllLines(path, StandardCharsets.UTF_8);
int position = lines.size() -61;
String extraLine = "btnprevious.setFont(new Font(""+combofont.getSelectedItem()+"", Font.PLAIN, "+combosize.getSelectedItem()+"));";
lines.remove(position);
lines.add(position, extraLine);
Files.write(path, lines, StandardCharsets.UTF_8);
int position2 = lines.size() -62;
String extraLine2 = "btnprevious.setForeground(Color."+fontcolor.getSelectedItem()+");";
lines.remove(position2);
lines.add(position2, extraLine2);
Files.write(path, lines, StandardCharsets.UTF_8);
int position3 = lines.size() -63;
String extraLine3 = "btnprevious.setBackground(Color."+backcolor.getSelectedItem()+");";
lines.remove(position3);
lines.add(position3, extraLine3);
Files.write(path, lines, StandardCharsets.UTF_8);
} catch (IOException ex) {
Logger.getLogger(settings.class.getName()).log(Lev el.SEVERE, null, ex);
}
}
//تغییر مشخصات صفحه بندی دکمه قبلی
}
}
//---------------------------------------------------------------------------------------------------
private void btnregisterActionPerformed(java.awt.event.ActionEv ent evt) {
// TODO add your handling code here:
cty();
}
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.