OK
This commit is contained in:
@@ -3,13 +3,14 @@ import tkinter as tk
|
||||
from tkinter import filedialog, messagebox, ttk
|
||||
|
||||
from core.Function.ip_conflict_fun import ALL_ADAPTERS, MODE_BOTH, MODE_LOCAL, MODE_SUBNET, IpConflictDetector
|
||||
from core.ui.components import Console, Page, action_bar, button, combo, field
|
||||
from core.ui.components import Page, action_bar, button, combo, field
|
||||
|
||||
|
||||
class IpConflictTab(Page):
|
||||
def __init__(self, parent):
|
||||
def __init__(self, parent, console):
|
||||
super().__init__(parent, "IP 冲突", "检测本机 IP 是否被占用,并安全扫描网段内 IP/MAC 异常。")
|
||||
self.body.rowconfigure(3, weight=1)
|
||||
self.console = console
|
||||
self.body.rowconfigure(2, weight=1)
|
||||
|
||||
status = self.section("实时状态", 0, columns=6)
|
||||
self.state = field(status, "状态", 1, 0, "等待", 10)
|
||||
@@ -74,12 +75,6 @@ class IpConflictTab(Page):
|
||||
result_scroll.grid(row=1, column=1, sticky="ns", pady=(0, 18))
|
||||
self.results_tree.configure(yscrollcommand=result_scroll.set)
|
||||
|
||||
output = self.section("诊断控制台", 3, columns=1)
|
||||
output.rowconfigure(1, weight=1)
|
||||
output.columnconfigure(0, weight=1)
|
||||
self.console = Console(output, height=12)
|
||||
self.console.grid(row=1, column=0, sticky="nsew", padx=18, pady=(0, 18))
|
||||
|
||||
self.detector = IpConflictDetector(self.write, self.on_task_done, self.update_status, self.add_result)
|
||||
self.after(350, self.load_adapters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user