コード例 #1
0
ファイル: ui.py プロジェクト: Klotz95/EPR_Phone_Book
 def save_file(self):
     """This method will opene a file dialog and save the phonebook in the
        given position
     """
     path = filedialog.asksaveasfilename()
     cur_manager = IO.FileManager()
     cur_manager.save(path, self.phone_book.phonebook)
コード例 #2
0
ファイル: ui.py プロジェクト: Klotz95/EPR_Phone_Book
    def load_file(self):
        """ This method will open a file dialog and load the content of the
            selected file

        """
        path = filedialog.askopenfilename()
        cur_manager = IO.FileManager()
        cur_entries = cur_manager.load(path)
        self.phone_book = logic.PhoneBook(cur_entries)