public PlayerScore(Framework framework) { InitializeComponent(); this.framework = framework; }
private void MainWindow_Load(object sender, EventArgs e) { // initialize engine GameFramework = new Framework(this); // restore windows using (RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Windward Studios\Windwardopolis\windows")) if (key != null) { // only restore if matches int cx = (int) key.GetValue("desktop-cx"); int cy = (int) key.GetValue("desktop-cy"); if ((cx == Screen.PrimaryScreen.WorkingArea.Width) && (cy == Screen.PrimaryScreen.WorkingArea.Height)) { RestoreWindow(this, "main"); FormWindowState state; Point location; Size size; RestoreWindow(key, "scoreboard", out state, out location, out size); if (state != FormWindowState.Minimized) CreateOrActivateScoreboard(); RestoreWindow(key, "status", out state, out location, out size); if (state != FormWindowState.Minimized) CreateOrActivateStatus(); } GameFramework.MovesPerSecond = (int) key.GetValue("game-speed", GameFramework.MovesPerSecond); toolStripMenuItemCoordinates.Checked = Convert.ToBoolean(key.GetValue("display-coordinates", "false")); toolStripMenuItemLimoShadow.Checked = Convert.ToBoolean(key.GetValue("display-shadow", "false")); toolStripMenuItemLimoShadowAll.Checked = Convert.ToBoolean(key.GetValue("display-shadow-all", "false")); GameFramework.DebugStartMode = Convert.ToBoolean(key.GetValue("run-debug", "false")); GameFramework.PlaySounds = Convert.ToBoolean(key.GetValue("play-sounds", "true")); } DebugCheckEnable(); MuteBitmap(); mapDisplay.DisplayCoordinates = toolStripMenuItemCoordinates.Checked; mapDisplay.DisplayShadows = toolStripMenuItemLimoShadow.Checked; mapDisplay.DisplayShadowsAll = toolStripMenuItemLimoShadowAll.Checked; PixelsPerTile = 24; toolStripMenuItemZoom100.Checked = true; mapDisplay.ZoomChanged(); UpdateMap(); UpdatePlayers(); UpdateMenu(); }
public RemoteAI(Framework framework, string guid) { this.framework = framework; TcpGuid = guid; }