Пример #1
0
 def newRace(self):
     self.race = emptyRace()
     self.setColumnMaps()
     self.reset()
     self.updateOdds()
     self.filename = None
     self.dirty = False
Пример #2
0
 def newRace(self):
     self.race = emptyRace()
     self.setColumnMaps()
     self.reset()
     self.updateOdds()
     self.filename = None
     self.dirty = False
Пример #3
0
 def load(self, filename=None):
     oldfile = self.filename
     oldrace = self.race
     if filename is not None:
         self.filename = filename
     if self.filename is not None:
         self.race = Race()
         if not self.race.load(self.filename):
             self.race = oldrace
             self.filename = oldfile
             if oldrace is None:
                 self.race = emptyRace()
             return False
         self.setColumnMaps()
         self.reset()
         self.updateOdds()
         self.dirty = False
         return True
     else:
         self.race = emptyRace()
         self.reset()
         self.updateOdds()
         self.dirty = False
         return False
Пример #4
0
 def load(self, filename = None):
     oldfile = self.filename
     oldrace = self.race
     if filename is not None:
         self.filename = filename
     if self.filename is not None:
         self.race = Race()
         if not self.race.load(self.filename):
             self.race = oldrace
             self.filename = oldfile
             if oldrace is None:
                 self.race = emptyRace()
             return False
         self.setColumnMaps()
         self.reset()
         self.updateOdds()
         self.dirty = False
         return True
     else:
         self.race = emptyRace()
         self.reset()
         self.updateOdds()
         self.dirty = False
         return False