示例#1
0
    def add_cable(self):
        top = ToplevelBase(self)
        top.title('Add Connector')

        def on_save(connector):
            self._harness.connectors[connector.name] = connector
            top.destroy()

        AddCableFrame(top, on_save_callback=on_save).grid()
示例#2
0
    def add_connector(self):
        top = ToplevelBase(self)
        top.title('Add Connector')

        def on_save():
            top.destroy()
            self.refresh_view()

        AddConnectorFrame(top, harness=self._harness, on_save_callback=on_save)\
            .grid()
示例#3
0
    def _load_connector_dialog(self, connector: Connector):
        top = ToplevelBase(self)
        top.title('Add Connector')

        def on_save():
            top.destroy()
            self.refresh(True)

        AddConnectorFrame(top,
                          harness=self._harness,
                          connector_name=str(connector),
                          on_save_callback=on_save).grid()
示例#4
0
 def _about(self):
     top = ToplevelBase(self)
     top.title('About')
     AboutFrame(top).grid()