private void UserControl_Initialized(object sender, EventArgs e) { tmr = new System.Windows.Threading.DispatcherTimer() { Interval = TimeSpan.FromSeconds(5) }; tmr.Tick += new EventHandler(tmr_Tick); trc.EditValueChanged += new DevExpress.Xpf.Editors.EditValueChangedEventHandler(trc_EditValueChanged); timespan = TimeSpan.FromMinutes(baseMinuteSpan * 4); paneldata = new PanelData(root); grdMain.DataContext = paneldata; }
private void UserControl_Initialized(object sender, EventArgs e) { paneldata = new PanelData(root); grdMain.DataContext = paneldata; paneldata.start(); DataGenerator.UpdateLineData = updatelinedata; DataGenerator.UpdateStationData = updatestationdata; DataGenerator.UpdateSwitchData = updateswitchdata; // if (!System.Windows.Application.Current.Resources.Contains("imgup")) { Application.Current.Resources.Add("imgup", this.Resources["imgup"]); Application.Current.Resources.Add("imgmid", this.Resources["imgmid"]); Application.Current.Resources.Add("imgdown", this.Resources["imgdown"]); } }