Parcourir la Source

removed soundboard since it wasn't really necessary

Bryan Allred 10 ans auparavant
Parent
Commettre
c5bbf44109
1 fichiers modifiés avec 6 ajouts et 25 suppressions
  1. 6 25
      Program.cs

+ 6 - 25
Program.cs

@ -34,23 +34,6 @@ namespace pulse
34 34
			var configurationServer = TfsConfigurationServerFactory.GetConfigurationServer(uri, new UICredentialsProvider());
35 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 37
			// Start the TFS worker.
55 38
			var worker = new BackgroundWorker();
56 39
			worker.DoWork += (o, a) =>
@ -136,6 +119,12 @@ namespace pulse
136 119
				dashboard.Cache();
137 120
				dashboard.Update();
138 121
122
				// Play any queued sounds.
123
				while (Sound.Queue.Count > 0)
124
				{
125
					Sound.Queue.Dequeue()();
126
				}
127
139 128
				var pause = new AutoResetEvent(false);
140 129
				if (pause.WaitOne(new TimeSpan(0, 15, 0)))
141 130
				{
@ -211,14 +200,6 @@ namespace pulse
211 200
				catch
212 201
				{
213 202
				}
214
215
				try
216
				{
217
					soundBoard.CancelAsync();
218
				}
219
				catch
220
				{
221
				}
222 203
			}
223 204
		}
224 205
	}