Browse Source

removed soundboard since it wasn't really necessary

Bryan Allred 10 years ago
parent
commit
c5bbf44109
1 changed files with 6 additions and 25 deletions
  1. 6 25
      Program.cs

+ 6 - 25
Program.cs

34
			var configurationServer = TfsConfigurationServerFactory.GetConfigurationServer(uri, new UICredentialsProvider());
34
			var configurationServer = TfsConfigurationServerFactory.GetConfigurationServer(uri, new UICredentialsProvider());
35
			configurationServer.EnsureAuthenticated();
35
			configurationServer.EnsureAuthenticated();
36
36
37
			// Start the sound board.
38
			var soundBoard = new BackgroundWorker();
39
			soundBoard.DoWork += (o, a) =>
40
			{
41
				while (!a.Cancel)
42
				{
43
					while (Sound.Queue.Count > 0)
44
					{
45
						Sound.Queue.Dequeue()();
46
					}
47
48
					// Pause.
49
					new AutoResetEvent(false).WaitOne(new TimeSpan(0, 1, 0));
50
				}
51
			};
52
			soundBoard.RunWorkerAsync();
53
54
			// Start the TFS worker.
37
			// Start the TFS worker.
55
			var worker = new BackgroundWorker();
38
			var worker = new BackgroundWorker();
56
			worker.DoWork += (o, a) =>
39
			worker.DoWork += (o, a) =>
136
				dashboard.Cache();
119
				dashboard.Cache();
137
				dashboard.Update();
120
				dashboard.Update();
138
121
122
				// Play any queued sounds.
123
				while (Sound.Queue.Count > 0)
124
				{
125
					Sound.Queue.Dequeue()();
126
				}
127
139
				var pause = new AutoResetEvent(false);
128
				var pause = new AutoResetEvent(false);
140
				if (pause.WaitOne(new TimeSpan(0, 15, 0)))
129
				if (pause.WaitOne(new TimeSpan(0, 15, 0)))
141
				{
130
				{
211
				catch
200
				catch
212
				{
201
				{
213
				}
202
				}
214
215
				try
216
				{
217
					soundBoard.CancelAsync();
218
				}
219
				catch
220
				{
221
				}
222
			}
203
			}
223
		}
204
		}
224
	}
205
	}