private void bigToolStripMenuItem_Click(object sender, EventArgs e) { Game.squareDimension = 100; initializePoints(); Figura.gap = 4; game.reSize(); this.Height = 800; this.Width = 790; windowType = WindowTypeSize.big; timeRect = new Rectangle(6 * Game.squareDimension + 2 * Figura.paddingX, menuStrip1.Height, 2 * Game.squareDimension, Game.squareDimension); FontSize = 14; Invalidate(); }
private void mediumToolStripMenuItem_Click(object sender, EventArgs e) { Game.squareDimension = 60; initializePoints(); Figura.gap = 2; game.reSize(); this.Height = 513; this.Width = 508; windowType = WindowTypeSize.medium; timeRect = new Rectangle(6 * Game.squareDimension + 2 * Figura.paddingX, menuStrip1.Height, 2 * Game.squareDimension, Game.squareDimension); FontSize = 8; Invalidate(); }
public Form1() { InitializeComponent(); menuStrip1.Visible = false; using (var data = new SaveGameContext()) { var query = (from b in data.Levels select b); foreach (var item in query) { levels = item; data.Levels.Remove(item); } data.SaveChanges(); if (levels == null) { levels = new Levels(true); } } this.BackgroundImage = Resources.finkiman; levels = new Levels(true); windowType = WindowTypeSize.big; DoubleBuffered = true; animationFinish = new Timer(); animationFinish.Interval = 5; animationFinish.Tick += new EventHandler(animationFinish_Tick); levelTimer = new Timer(); levelTimer.Interval = 1000; levelTimer.Tick += new EventHandler(levelTimer_Tick); timeRect = new Rectangle(6 * Game.squareDimension + 2 * Figura.paddingX, menuStrip1.Height, 2 * Game.squareDimension, Game.squareDimension); FontSize = 14; this.FormBorderStyle = FormBorderStyle.FixedSingle; initializePoints(); paused = false; pauseMoves = pauseTime = 0; mainWindow = true; }