1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using System.Collections.Generic;
7
namespace ICSharpCode.SharpDevelop.Sda
10
/// This class contains properties you can use to control how SharpDevelop is launched.
13
public sealed class StartupSettings
15
bool useSharpDevelopErrorHandler = true;
16
string applicationName = "SharpDevelop";
17
string applicationRootPath;
18
bool allowAddInConfigurationAndExternalAddIns = true;
20
string propertiesName;
21
string configDirectory;
23
string domPersistencePath;
24
string resourceAssemblyName = "SharpDevelop";
25
internal List<string> addInDirectories = new List<string>();
26
internal List<string> addInFiles = new List<string>();
29
/// Gets/Sets the name of the assembly to load the BitmapResources
30
/// and English StringResources from.
32
public string ResourceAssemblyName {
33
get { return resourceAssemblyName; }
36
throw new ArgumentNullException("value");
37
resourceAssemblyName = value;
42
/// Gets/Sets whether the SharpDevelop exception box should be used for
43
/// unhandled exceptions. The default is true.
45
public bool UseSharpDevelopErrorHandler {
46
get { return useSharpDevelopErrorHandler; }
47
set { useSharpDevelopErrorHandler = value; }
51
/// Use the file <see cref="ConfigDirectory"/>\AddIns.xml to maintain
52
/// a list of deactivated AddIns and list of AddIns to load from
53
/// external locations.
54
/// The default value is true.
56
public bool AllowAddInConfigurationAndExternalAddIns {
57
get { return allowAddInConfigurationAndExternalAddIns; }
58
set { allowAddInConfigurationAndExternalAddIns = value; }
62
/// Allow user AddIns stored in the "application data" directory.
63
/// The default is false.
65
public bool AllowUserAddIns {
66
get { return allowUserAddIns; }
67
set { allowUserAddIns = value; }
71
/// Gets/Sets the application name used by the MessageService and some
72
/// SharpDevelop windows. The default is "SharpDevelop".
74
public string ApplicationName {
75
get { return applicationName; }
78
throw new ArgumentNullException("value");
79
applicationName = value;
84
/// Gets/Sets the application root path to use.
85
/// Use null (default) to use the base directory of the SharpDevelop AppDomain.
87
public string ApplicationRootPath {
88
get { return applicationRootPath; }
89
set { applicationRootPath = value; }
93
/// Gets/Sets the directory used to store SharpDevelop properties,
94
/// settings and user AddIns.
95
/// Use null (default) to use "ApplicationData\ApplicationName"
97
public string ConfigDirectory {
98
get { return configDirectory; }
99
set { configDirectory = value; }
103
/// Sets the data directory used to load resources.
104
/// Use null (default) to use the default path "ApplicationRootPath\data".
106
public string DataDirectory {
107
get { return dataDirectory; }
108
set { dataDirectory = value; }
112
/// Sets the name used for the properties file (without path or extension).
113
/// Use null (default) to use the default name.
115
public string PropertiesName {
116
get { return propertiesName; }
117
set { propertiesName = value; }
121
/// Sets the directory used to store the code completion cache.
122
/// Use null (default) to disable the code completion cache.
124
public string DomPersistencePath {
125
get { return domPersistencePath; }
126
set { domPersistencePath = value; }
130
/// Find AddIns by searching all .addin files recursively in <paramref name="addInDir"/>.
132
public void AddAddInsFromDirectory(string addInDir)
134
if (addInDir == null)
135
throw new ArgumentNullException("addInDir");
136
addInDirectories.Add(addInDir);
140
/// Add the specified .addin file.
142
public void AddAddInFile(string addInFile)
144
if (addInFile == null)
145
throw new ArgumentNullException("addInFile");
146
addInFiles.Add(addInFile);