import os
import tkinter as tk
from tkinter import filedialog, messagebox
def browse_file():
filename = filedialog.askopenfilename(
title="اختر ملف الـ ECU Original",
filetypes=(("Bin Files", "*.bin"), ("All Files", "*.*"))
)
if filename:
entry_path.delete(0, tk.END)
entry_path.insert(0, filename)
def process_ecu():
file_path = entry_path.get()
if not file_path or not os.path.exists(file_path):
messagebox.showerror("خطأ", "الرجاء اختيار ملف ECU صالح أولاً!")
return
# جمع العمليات المختارة
selected_mods = []
if var_stage1.get(): selected_mods.append("Stage 1")
if var_egr.get(): selected_mods.append("EGR Off")
if var_fap.get(): selected_mods.append("FAP / DPF Off")
if var_adblue.get(): selected_mods.append("AdBlue Off")
if var_immo.get(): selected_mods.append("Immo Off")
if not selected_mods:
messagebox.showwarning("تنبيه", "الرجاء اختيار تعديل واحد على الأقل!")
return
mods_str = " + ".join(selected_mods)
messagebox.showinfo("نجاح", f"تمت معالجة الملف بنجاح!\nالتعديلات: {mods_str}\n\nالملف جاهز الآن.")
# تصميم واجهة البرنامج
root = tk.Tk()
root.title("Seddik Chip Tuning - Pro Suite")
root.geometry("480x420")
root.config(bg="#1e1e1e")
title_label = tk.Label(root, text="🚗 SEDDIK CHIP TUNING 🚗", font=("Arial", 14, "bold"), fg="#00ffcc", bg="#1e1e1e")
title_label.pack(pady=15)
# اختيار الملف
frame_file = tk.Frame(root, bg="#1e1e1e")
frame_file.pack(pady=10)
btn_browse = tk.Button(frame_file, text="📂 اختر ملف Original", command=browse_file, bg="#333", fg="white", font=("Arial", 10, "bold"))
btn_browse.pack(side=tk.LEFT, padx=5)
entry_path = tk.Entry(frame_file, width=32, font=("Arial", 10))
entry_path.pack(side=tk.LEFT, padx=5)
# خيارات التعديل
frame_mods = tk.LabelFrame(root, text=" اختر التعديلات المطلوبة ", font=("Arial", 10, "bold"), fg="white", bg="#1e1e1e", padx=15, pady=10)
frame_mods.pack(pady=10, fill="x", padx=25)
var_stage1 = tk.BooleanVar()
var_egr = tk.BooleanVar()
var_fap = tk.BooleanVar()
var_adblue = tk.BooleanVar()
var_immo = tk.BooleanVar()
tk.Checkbutton(frame_mods, text="🚀 Stage 1 (تحسين الأداء)", variable=var_stage1, fg="white", bg="#1e1e1e", selectcolor="#333", font=("Arial", 10)).pack(anchor="w", pady=2)
tk.Checkbutton(frame_mods, text="🛑 EGR Off (إلغاء صمام EGR)", variable=var_egr, fg="white", bg="#1e1e1e", selectcolor="#333", font=("Arial", 10)).pack(anchor="w", pady=2)
tk.Checkbutton(frame_mods, text="💨 FAP / DPF Off (إلغاء فلتر الجسيمات)", variable=var_fap, fg="white", bg="#1e1e1e", selectcolor="#333", font=("Arial", 10)).pack(anchor="w", pady=2)
tk.Checkbutton(frame_mods, text="💧 AdBlue Off (إلغاء نظام اليوريا)", variable=var_adblue, fg="white", bg="#1e1e1e", selectcolor="#333", font=("Arial", 10)).pack(anchor="w", pady=2)
tk.Checkbutton(frame_mods, text="🔑 Immo Off (إلغاء مانع التشغيل)", variable=var_immo, fg="white", bg="#1e1e1e", selectcolor="#333", font=("Arial", 10)).pack(anchor="w", pady=2)
# زر التنفيذ
btn_process = tk.Button(root, text="⚡ معالجة وحفظ الملف", command=process_ecu, bg="#00aa55", fg="white", font=("Arial", 11, "bold"), width=22, height=2)
btn_process.pack(pady=15)
root.mainloop()print('Hello world!')
To embed this project on your website, copy the following code and paste it into your website's HTML: