/// <summary> /// On change methode for when the players table changes /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void OnChange_Players(object sender, SqlNotificationEventArgs e) { SqlDependency dependency = sender as SqlDependency; dependency.OnChange -= OnChange_Players; // Need to update the correct field, not players in this class MainClient.ReadOtherPlayers(); localresources = MainClient.GetLocalResources(); DatabaseInterface.MonitorPlayers(OnChange_Players); }
protected void RenderLocalResources() { localresources = MainClient.GetLocalResources(); repLocalResources.DataSource = localresources; repLocalResources.DataBind(); missionGoals = MainClient.GetMissionGoals(); if (missionGoals.Count == 0) { MissionGoal mg = new MissionGoal(Construction.Farm); mg.ImageSrc = "Images/winscreen.jpg"; missionGoals.Add(mg); } repMission.DataSource = missionGoals; repMission.DataBind(); }
protected void RenderLocalResources() { localresources = MainClient.GetLocalResources(); repLocalResources.DataSource = localresources; repLocalResources.DataBind(); }