Exemplo n.º 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();
                    }
                }
            }
        }
Exemplo n.º 2
0
        public static void CreateNewPool(string teamA, string teamB, string caption, string ownerName)
        {
            Pool p = new Pool()
            {
                TeamA = teamA,
                TeamB = teamB,
                Description = caption,
                AdminAlias = ownerName
            };

            Pool.Instance = p;
        }