单元测试和改进
This commit is contained in:
23
src/heurams/interface/__main__.py
Normal file
23
src/heurams/interface/__main__.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Button, Header, Label, Footer
|
||||
|
||||
class HeurAMSApp(App):
|
||||
TITLE = "潜进"
|
||||
SUB_TITLE = "启发式辅助记忆调度器"
|
||||
BINDINGS = [("q", "quit", "退出"), ("d", "toggle_dark", "改变色调")]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header(show_clock = True)
|
||||
|
||||
yield Footer(show_command_palette = True)
|
||||
|
||||
def on_mount(self) -> None:
|
||||
pass
|
||||
|
||||
def on_button_pressed(self, event: Button.Pressed) -> None:
|
||||
self.exit(event.button.id)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = HeurAMSApp()
|
||||
app.run()
|
||||
Reference in New Issue
Block a user