public MainWindow() { InitializeComponent(); Settings.stream.attachTextBox(tb_Status); Settings.stream.attachProgressBar(pg_Status); Settings.initializeSettings(Environment.GetCommandLineArgs()); oglPreviewWindow = new OpenGLPreview(); settingsWindow = new SettingsWindow(); Settings.stream.WriteLine(Verbosity.TESTING, "Command line arguments:"); foreach (String s in Environment.GetCommandLineArgs()) { Settings.stream.WriteText(Verbosity.TESTING, s + " "); } Settings.stream.WriteLine(Verbosity.TESTING); Settings.stream.WriteText(Verbosity.Medium, "Adding scenes from the command line . . . "); foreach (String s in Settings.scenes) { lb_Files.Items.Add(s); } Settings.stream.WriteLine(Verbosity.Medium, "Done"); try { if (!Directory.Exists(Settings.tempDirectory)) { Directory.CreateDirectory(Settings.tempDirectory); } } catch (UnauthorizedAccessException) { Settings.stream.WriteLine("The temp directory (\"{0}\") could not be accessed due to permissions.", Settings.tempDirectory); Settings.stream.indent++; Settings.stream.WriteLine("Please change the permissions of the parent directory."); Settings.stream.indent--; } catch (Exception e) { Settings.stream.WriteLine("There was an error accessing the temp directory (\"{0}\"), {1}", Settings.tempDirectory, e.Message); } }