protected void Timer1_Tick(object sender, EventArgs e) { lblChistmansLightsStatus.Text = christmas_lights ? "Lights on" : "Lights off"; lblChistmansLightsStatus.ForeColor = christmas_lights ? Color.DarkGreen : Color.DarkRed; lock (frames) { CanGrid.DataSource = frames; CanGrid.DataBind(); } }
protected void Timer1_Tick(object sender, EventArgs e) { Label1.Text = "Panel refreshed at: " + DateTime.Now.ToLongTimeString(); lblOperationalState.Text = String.Format("Node operational state: {0}", s_state.ToString()); lock (frames) { CanGrid.DataSource = frames; CanGrid.DataBind(); } }
public void UpdateLabel(string text) { CanGrid.DataBind(); }