All pastes #1648378 Raw Edit

Unnamed

public text v1 · immutable
#1648378 ·published 2009-10-29 21:05 UTC
rendered paste body
        private void InitializeLoggingAndConfig()
        {
            try
            {
                userDir = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), Properties.Resources.ProgramName);
                if (!Directory.Exists(userDir))
                {
                    Directory.CreateDirectory(userDir);
                }
            }
            catch (Exception)
            {
                userDir = System.Environment.CurrentDirectory;
            };

            animCacheDir = Path.Combine(userDir, @"anim_cache");
            globalLogFile = Path.Combine(userDir, Properties.Resources.ProgramName + ".log");
            globalSettings = new Settings(Path.Combine(userDir, "settings.xml"));
        }