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. }
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(); }
public StandAloneIntegrationTestFixture() { try { StandAlone = new StandAlone(); } catch (Exception) { Dispose(); throw; } }
protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { //Dispose managed state (managed objects). StandAlone?.Dispose(); StandAlone?.UpdateCertificate(Pkcs12); } _disposed = true; }
public StandAloneIntegrationTestFixture() { if (!BoltkitHelper.IsBoltkitAvailable()) { return; } try { StandAlone = new StandAlone(); } catch (Exception) { Dispose(); throw; } }
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(); }
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; } }
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; }
public static void GlobalBeforeTestRun() { Server = new StandAlone(); }
public SUT(StandAlone dependency) { this.dependency = dependency; }
public void Dispose() { StandAlone?.Dispose(); StandAlone?.UpdateCertificate(Pkcs12); }
public void Dispose() { StandAlone?.Dispose(); StandAlone?.UpdateCertificate(null); }
public void Draw() { Tile.Draw(Color.White); StandAlone.DrawString(MJCode, Tile.Center, Color.Red); }
//[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(); } }