예제 #1
0
 public static void EatApple()
 {
     Score    += 10;
     speed    += 0.1f;
     apple.Pos = new REMOPoint(StandAlone.Random(0, StandAlone.FullScreen.Width), StandAlone.Random(0, StandAlone.FullScreen.Height));
     //The apple teleports to the random point.
 }
예제 #2
0
        public static void Build()
        {
            GetTiles("A", 9);
            GetTiles("B", 9);
            GetTiles("C", 9);
            GetTiles("D", 4);
            GetTiles("E", 3);

            //Shuffle
            for (int i = 0; i < 1000; i++)
            {
                int r = StandAlone.Random(0, MJStacks.Count - 1);
                Swap <String>(MJStacks, r, (2 * r) % MJStacks.Count);
            }


            //Get Hands
            for (int i = 0; i < 34; i++)
            {
                GetTiles();
            }


            for (int i = 0; i < 3; i++)
            {
                GetMarket();
            }

            MyHands.Sort();
        }
예제 #3
0
 public StandAloneIntegrationTestFixture()
 {
     try
     {
         StandAlone = new StandAlone();
     }
     catch (Exception)
     {
         Dispose();
         throw;
     }
 }
예제 #4
0
            protected virtual void Dispose(bool disposing)
            {
                if (_disposed)
                {
                    return;
                }

                if (disposing)
                {
                    //Dispose managed state (managed objects).
                    StandAlone?.Dispose();
                    StandAlone?.UpdateCertificate(Pkcs12);
                }

                _disposed = true;
            }
예제 #5
0
        public StandAloneIntegrationTestFixture()
        {
            if (!BoltkitHelper.IsBoltkitAvailable())
            {
                return;
            }

            try
            {
                StandAlone = new StandAlone();
            }
            catch (Exception)
            {
                Dispose();
                throw;
            }
        }
예제 #6
0
        public static void Add(String Code, Aligned <Gfx2D> tiles)
        {
            Gfx2D g = new Gfx2D(new Rectangle(0, 0, 50, 80));

            Codes.Add(g, Code);

            g.RegisterDrawAct(() =>
            {
                g.Draw(Color.White);
                if (g.ContainsCursor())
                {
                    g.Draw(Color.Blue);
                }
                StandAlone.DrawString(Code, g.Center - new REMOPoint(5, 5), Color.Red);
            });
            tiles.Add(g);
            tiles.Align();
        }
예제 #7
0
            public CertificateTrustIntegrationTestFixture()
            {
                if (!BoltkitHelper.IsBoltkitAvailable())
                {
                    return;
                }

                try
                {
                    Pkcs12 = CertificateUtils.CreateCert("localhost", DateTime.Now.AddYears(-1), DateTime.Now.AddYears(1),
                                                         null, null, null);
                    StandAlone = new StandAlone(Pkcs12);
                }
                catch (Exception)
                {
                    Dispose();
                    throw;
                }
            }
예제 #8
0
 public long IndepSQL()
 {
     Console.WriteLine("********************************* SQL LOAD STARTED ***********************");
     string connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=testHibernate;Integrated Security=True;";
     long start = DateTime.Now.Ticks;
     using (SqlConnection conn = new SqlConnection(connectionString)){
         conn.Open();
         SqlCommand command = new SqlCommand("select * from [testHibernate].[dbo].[StandAlone]", conn);
         SqlDataReader reader = command.ExecuteReader();
         while (reader.Read()) {
             //	Console.WriteLine();
             StandAlone sa = new StandAlone();
             sa.Id = (int)reader[0];
             sa.Name = (string)reader[1];
             //Console.Write(reader[i] + " , ");
         }
     }
     long end = DateTime.Now.Ticks;
     Console.WriteLine("********************************* SQL LOAD ENDED ***********************");
     return end-start;
 }
예제 #9
0
 public static void GlobalBeforeTestRun()
 {
     Server = new StandAlone();
 }
예제 #10
0
 public SUT(StandAlone dependency)
 {
     this.dependency = dependency;
 }
 public void Dispose()
 {
     StandAlone?.Dispose();
     StandAlone?.UpdateCertificate(Pkcs12);
 }
 public void Dispose()
 {
     StandAlone?.Dispose();
     StandAlone?.UpdateCertificate(null);
 }
예제 #13
0
 public void Draw()
 {
     Tile.Draw(Color.White);
     StandAlone.DrawString(MJCode, Tile.Center, Color.Red);
 }
예제 #14
0
        //[SetUp]
        public void setup()
        {
            using (var session = NHibernateSession.OpenSession()){
                using (var tran = session.BeginTransaction()){
                    for(int i=0;i <100000; i++){
                        var parent = new Parent();
                        parent.Name = CommonUtils.RandomString(10);

                        var child = new Child();
                        child.Name = CommonUtils.RandomString(5);
                        child.Weight = new Random().NextDouble();

                        child.Parent = parent;

                        var stand = new StandAlone();
                        stand.Name = CommonUtils.RandomString(5);
                        //parent.Children.Add(child);
                        //	session.SaveOrUpdate(parent);
                        session.SaveOrUpdate(stand);
                    }
                    tran.Commit();
                }
                session.Close();
            }
        }