|
8 | 8 | using SoundCenSeGTK; |
9 | 9 | using System.Linq; |
10 | 10 | using System.Reflection; |
| 11 | +using NLog; |
11 | 12 |
|
12 | 13 | namespace SoundCenSeGTK |
13 | 14 | { |
14 | 15 | public partial class MainWindow: Gtk.Window |
15 | 16 | { |
16 | 17 | private Dictionary<string,SoundPanelEntry> panelEntries = new Dictionary<string, SoundPanelEntry>(); |
17 | 18 | private static PackDownloader PD = null; |
18 | | - |
| 19 | + private static Logger logger = LogManager.GetCurrentClassLogger(); |
19 | 20 | public MainWindow() |
20 | 21 | : base(Gtk.WindowType.Toplevel) |
21 | 22 | { |
@@ -59,7 +60,7 @@ public MainWindow() |
59 | 60 |
|
60 | 61 | cbThreshold.Active = (int)Config.Instance.playbackThreshold; |
61 | 62 |
|
62 | | - List<string> temp = new List<string>() { "SFX", "Music", "Weather", "Swords", "Trading" }; |
| 63 | + List<string> temp = new List<string>() { "SFX", "Music", "Weather", "Swords", "Trade" }; |
63 | 64 | AddSoundPanelEntries(temp); |
64 | 65 | // ShowAll(); |
65 | 66 |
|
@@ -113,8 +114,8 @@ private void StartListening(object sender, DwarfFortressRunningEventArgs e) |
113 | 114 | image1.Pixbuf = Image.LoadFromResource("SoundCenSeGTK.SignalGreen.png").Pixbuf; |
114 | 115 |
|
115 | 116 | runState = RunState.PlayingDF; |
116 | | - SP = new SoundProcessor(allSounds); |
117 | 117 | Dictionary<string, Sound> oldMusic = GetOldMusic(allSounds); |
| 118 | + SP = new SoundProcessor(allSounds); |
118 | 119 | LL = new LogFileListener(Config.Instance.gamelogPath, true); |
119 | 120 |
|
120 | 121 | LL.GamelogEvent += SP.ProcessLine; |
@@ -344,8 +345,9 @@ private void DFRunCheck() |
344 | 345 | return; |
345 | 346 | } |
346 | 347 | } |
347 | | - catch |
| 348 | + catch (Exception ex) |
348 | 349 | { |
| 350 | + logger.Info(ex.StackTrace); |
349 | 351 | } |
350 | 352 | } |
351 | 353 | } |
|
0 commit comments