Advertisement
parabola949

Untitled

Jun 10th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. new Task(() =>
  2.                 {
  3.                     for (var x = 0;x<4;x++)
  4.                     {
  5.                         for (var i = 0; i < themes.Count; i++)
  6.                         {
  7.                             Application.Current.Dispatcher.BeginInvoke(
  8.                                 DispatcherPriority.Background,
  9.                                 new System.Action(
  10.                                     () =>
  11.                                         ThemeManager.ChangeTheme(this, new Accent(themes[i < themes.Count ? i : 19].Name, themes[i < themes.Count ? i : 19].URI),
  12.                                             Theme.Light)));
  13.  
  14.                             Thread.Sleep(30);
  15.                            
  16.                         }
  17.                     }
  18.  
  19.                     Application.Current.Dispatcher.BeginInvoke(
  20.                                 DispatcherPriority.Background,
  21.                                 new System.Action(
  22.                                     () =>
  23.                                         ThemeManager.ChangeTheme(this, new Accent(themes[11].Name, themes[11].URI),
  24.                                             Theme.Dark)));
  25.                 }).Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement