Mercurial > repos > IBBoard
diff Constants.cs @ 37:cc7fae81afec
* Fix line terminators
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 27 Jun 2009 19:03:58 +0000 |
parents | 0352fa33ee8f |
children | 0f88d32b22cc |
line wrap: on
line diff
--- a/Constants.cs Tue May 19 19:55:21 2009 +0000 +++ b/Constants.cs Sat Jun 27 19:03:58 2009 +0000 @@ -2,35 +2,35 @@ // // The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license. -using System; -using System.IO; - -namespace IBBoard -{ - /// <summary> - /// Summary description for Constants. - /// </summary> - public class Constants - { - public static readonly char DirectoryChar = Path.DirectorySeparatorChar; +using System; +using System.IO; + +namespace IBBoard +{ + /// <summary> + /// Summary description for Constants. + /// </summary> + public class Constants + { + public static readonly char DirectoryChar = Path.DirectorySeparatorChar; public static readonly string DirectoryString = Path.DirectorySeparatorChar.ToString(); private static string executablePath = AppDomain.CurrentDomain.BaseDirectory.TrimEnd(DirectoryChar); static Constants() - { - string exe = Environment.GetCommandLineArgs()[0]; - int slash = exe.LastIndexOf(DirectoryChar) + 1; - int dot = exe.LastIndexOf('.'); - - if (dot > slash) - { - exe = exe.Substring(slash, dot - slash); - } - else - { - exe = exe.Substring(slash); - } - + { + string exe = Environment.GetCommandLineArgs()[0]; + int slash = exe.LastIndexOf(DirectoryChar) + 1; + int dot = exe.LastIndexOf('.'); + + if (dot > slash) + { + exe = exe.Substring(slash, dot - slash); + } + else + { + exe = exe.Substring(slash); + } + userDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).TrimEnd(DirectoryChar) + DirectoryChar + "IBBoard" + DirectoryChar + exe; } @@ -52,6 +52,6 @@ { userDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)+DirectoryChar+path.Trim(DirectoryChar); } - }*/ - } -} + }*/ + } +}