def on_c2_info_apply(self, e):
self.c2_info = self.grid.GetCellValue(0, 1), self.grid.GetCellValue(1, 1)
if any(map(lambda x: len(x) < 3, self.c2_info)):
self.status("Your data seems to be invalid...")
return
with open(self.c2_info_filename, 'w') as f:
f.write(' '.join(self.c2_info))
if not self.read_c2_info():
self.status("Something went wrong T_T")
return
self.menu_c2_info.Enable(True)
self.grid.ClearGrid()
self.grid_set_shape(1, 1, self.grid_no_data_width)
self.grid_column_readonly(0)
self.grid.SetCellValue(0, 0, self.grid_no_data_text)
self.actions_panel.Clear()
self.Layout()
self.status("Default credentials saved at " + self.c2_info_filename)
评论列表
文章目录