forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileNameHelper.cs
More file actions
158 lines (143 loc) · 3.83 KB
/
Copy pathFileNameHelper.cs
File metadata and controls
158 lines (143 loc) · 3.83 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Windows.Forms;
using PluginCore.Helpers;
namespace FlashDevelop.Helpers
{
class FileNameHelper
{
/// <summary>
/// Path to the system image file
/// </summary>
public static String Images
{
get
{
return GetSettingFile("Images.png");
}
}
/// <summary>
/// Path to the toolbar file
/// </summary>
public static String ToolBar
{
get
{
return GetSettingFile("ToolBar.xml");
}
}
/// <summary>
/// Path to the main menu file
/// </summary>
public static String MainMenu
{
get
{
return GetSettingFile("MainMenu.xml");
}
}
/// <summary>
/// Path to the scintilla menu file
/// </summary>
public static String ScintillaMenu
{
get
{
return GetSettingFile("ScintillaMenu.xml");
}
}
/// <summary>
/// Path to the tab menu file
/// </summary>
public static String TabMenu
{
get
{
return GetSettingFile("TabMenu.xml");
}
}
/// <summary>
/// Path to the session file
/// </summary>
public static String SessionData
{
get
{
return Path.Combine(PathHelper.SettingDir, "SessionData.fdb");
}
}
/// <summary>
/// Path to the panel layout file
/// </summary>
public static String LayoutData
{
get
{
return Path.Combine(PathHelper.SettingDir, "LayoutData.fdl");
}
}
/// <summary>
/// Path to the setting file
/// </summary>
public static String SettingData
{
get
{
return Path.Combine(PathHelper.SettingDir, "SettingData.fdb");
}
}
/// <summary>
/// Path to the shortcut file
/// </summary>
public static String ShortcutData
{
get
{
return Path.Combine(PathHelper.SettingDir, "ShortcutData.fda");
}
}
/// <summary>
/// Path to the argument file
/// </summary>
public static String UserArgData
{
get
{
return Path.Combine(PathHelper.SettingDir, "UserArgData.fda");
}
}
/// <summary>
/// Path to the recovery directory
/// </summary>
public static String RecoveryDir
{
get
{
return Path.Combine(PathHelper.SettingDir, "Recovery");
}
}
/// <summary>
/// Path to the file state directory
/// </summary>
public static String FileStateDir
{
get
{
return Path.Combine(PathHelper.SettingDir, "FileStates");
}
}
/// <summary>
/// Selects correct setting file from user dir or app dir.
/// </summary>
public static String GetSettingFile(String file)
{
Boolean standalone = Globals.MainForm.StandaloneMode;
String appDirSettingFile = Path.Combine(Path.Combine(PathHelper.AppDir, "Settings"), file);
String userDirSettingFile = Path.Combine(Path.Combine(PathHelper.UserAppDir, "Settings"), file);
if (!standalone && File.Exists(userDirSettingFile)) return userDirSettingFile;
else return appDirSettingFile;
}
}
}