This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Defines.cs.in
106 lines (87 loc) · 2.38 KB
/
Defines.cs.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Defines.cs created with MonoDevelop
// User: buchan at 01:23 03/28/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
using System.IO;
namespace Monsoon
{
public class Defines
{
private static string applicationDirectory;
private static string applicationDataDirectory;
private static string version;
public static string InstallPrefix {
get {
return "@PREFIX@";
}
}
public static string ApplicationName
{
get { return "Monsoon"; }
}
public static string LogFile
{
get { return Path.Combine(ApplicationDataDirectory, "monsoon.log"); }
}
public static string ConfigDirectory
{
get { return ApplicationDataDirectory; }
}
public static string IconPath
{
get { return Path.Combine(ApplicationDirectory, "icons"); }
}
public static string SerializedTorrentSettings
{
get { return Path.Combine (ApplicationDataDirectory, "torrents.xml"); }
}
public static string SerializedFastResume
{
get { return Path.Combine (ApplicationDataDirectory, "fastresume.benc"); }
}
public static string SerializedLabels
{
get { return Path.Combine(ApplicationDataDirectory, "labels.xml"); }
}
public static string SerializedRssFeeds
{
get { return Path.Combine (ApplicationDataDirectory, "rssfeeds.xml"); }
}
public static string SerializedRssHistroy
{
get { return Path.Combine (ApplicationDataDirectory, "rsshistory.xml"); }
}
public static string SerializedRssFilters
{
get { return Path.Combine (ApplicationDataDirectory, "rssfilters.xml"); }
}
public static string TorrentFolder
{
get { return Path.Combine(ApplicationDataDirectory, "torrents"); }
}
public static string ApplicationDirectory {
get {
return applicationDirectory;
}
}
public static string ApplicationDataDirectory {
get {
return applicationDataDirectory;
}
}
public static string Version {
get {
return version;
}
}
static Defines()
{
applicationDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
applicationDataDirectory = Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "monsoon");
Version ver = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
version = String.Format("{0}.{1}", ver.Major, ver.Minor);
}
}
}