예제 #1
0
파일: secfacUI.py 프로젝트: Raveline/Secfac
 def append_char(self, char):
     submenu = self.pane.shortcuts.get(char, None)
     if submenu is not None:
         self.change_menu_action(submenu)
         if submenu.children or submenu.explaining_text:
             self.pane.enter_branch(submenu)
         else:
             messages.receive(Message(self.currentAction, self.currentComplement))
예제 #2
0
def handle_arguments():
    no_commands = len(argv) > 1 and argv[1] == "noc"
    if not no_commands:
        commands = read_command_file()
        for command in commands:
            # Remove the \n and make upper caps
            command = command[:-1].upper()
            messages.receive(message_parser(command))
예제 #3
0
파일: secfac.py 프로젝트: Raveline/Secfac
def handle_arguments():
    no_commands = len(argv) > 1 and argv[1] == "noc"
    if not no_commands:
        commands = read_command_file()
        for command in commands:
            # Remove the \n and make upper caps
            command = command[:-1].upper()
            messages.receive(message_parser(command))
예제 #4
0
파일: secfacUI.py 프로젝트: Raveline/Secfac
 def enter(self):
     # Call to global. We'd like to avoid that.
     messages.clean()
     messages.receive(message_parser(self.content.upper()))
     self.content = ""
예제 #5
0
파일: secfacUI.py 프로젝트: Raveline/Secfac
 def escape(self):
     if self.pane.can_go_back():
         self.pane.go_back()
         self.change_menu_action(self.pane.current_branch)
     else:
         messages.receive(Message(Message.QUIT))
예제 #6
0
파일: secfacUI.py 프로젝트: Raveline/Secfac
 def sendAreaMessage(self):
     if self.currentAction is not Message.VIEW:
         for x in range(self.selection.x, self.selection.x2 + 1):
             for y in range(self.selection.y, self.selection.y2 + 1):
                 messages.receive(Message(self.currentAction, (x,y)))