internal void LoadData(List <Library.Model.Test_Table> tables, double time) { Index = 0; lc.Clear(); lg.Clear(); ntime = time; foreach (Library.Model.Test_Table t in tables) { Test_Table_Templete tabletemplete = SystemManager.Instance.Services.Test_Table_TempleteService.GetModel(t.F_TempleteID.Value); Color c = tabletemplete.ShowBackColor; DataGridShow grid = new DataGridShow(); grid.MouseLeftButtonDown += new MouseButtonEventHandler(grid_MouseLeftButtonDown); grid.LoadData(t.F_TempleteID.Value, t.F_ID); lc.Add(c); lg.Add(grid); } Timer.Interval = TimeSpan.FromSeconds(time); Timer.Tick += new EventHandler(Timer_Tick); Timer.Start(); this.Frame1.Source = lg[Index]; this.Background = new SolidColorBrush(lc[Index]); Index++; }
public void LoadData(int templeteid, int id) { Test_Table_Templete tabletemplete = SystemManager.Instance.Services.Test_Table_TempleteService.GetModel(templeteid); scrolls.Background = new SolidColorBrush(tabletemplete.ShowBackColor); DataGridShow grid = new DataGridShow(); grid.LoadData(templeteid, id); scrolls.Content = grid; }