Пример #1
0
 // TODO: this should be removed once we have a setup wizard in place.
 public static void CreateSeedDataIfNeeded()
 {
     if (Instance == null)
     {
         lock (syncObj)
         {
             if (Instance == null)
             {
                 // TODO: don't hardcode values
                 Instance = new Pool()
                 {
                     AdminAlias  = "sample",
                     Description = "My test pool",
                     State       = PoolState.Locked,
                     TeamA       = "A",
                     TeamB       = "B",
                 };
                 Instance.Grid[0][0].Update("Jimmy");
                 Instance.Grid[3][7].Update("Van");
                 Instance.Grid[7][4].Update("Bala");
                 PoolRepository.WriteDataFile();
             }
         }
     }
 }
Пример #2
0
 static void Main(string[] args)
 {
     PoolRepository.DeleteDataFile();
     Pool.CreateNewPool("Team A", "Team B", "test", "balach");
     Pool.CreateSeedDataIfNeeded();
     PoolRepository.WriteDataFile();
 }