-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOptionPageForceLineFeedCode.cs
67 lines (59 loc) · 1.94 KB
/
OptionPageForceLineFeedCode.cs
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
using System;
using System.ComponentModel;
using System.Xml;
namespace ForceLineFeedCode
{
public class OptionPageForceLineFeedCode : Microsoft.VisualStudio.Shell.DialogPage
{
public enum TypeLineFeed
{
LF =0,
CR,
CRLF,
};
public enum TypeLanguage
{
[Description("C/C++")]
C_Cpp =0,
[Description("CSharp")]
CSharp,
[Description("Others")]
Others,
};
public const int NumLanguages = 3;
private TypeLineFeed[] lineFeeds_ = new TypeLineFeed[NumLanguages] { TypeLineFeed.LF, TypeLineFeed.LF, TypeLineFeed.LF};
private bool loadSettingFile_;
[Category("General")]
[DisplayName("C/C++")]
[Description("Line feed for C/C++")]
public TypeLineFeed LineFeedCpp
{
get { return lineFeeds_[(int)TypeLanguage.C_Cpp]; }
set { lineFeeds_[(int)TypeLanguage.C_Cpp] = value; }
}
[Category("General")]
[DisplayName("CSharp")]
[Description("Line feed for CSharp")]
public TypeLineFeed LineFeedCSharp
{
get { return lineFeeds_[(int)TypeLanguage.CSharp]; }
set { lineFeeds_[(int)TypeLanguage.CSharp] = value; }
}
[Category("General")]
[DisplayName("Others")]
[Description("Line feed for Others")]
public TypeLineFeed LineFeedOthers
{
get { return lineFeeds_[(int)TypeLanguage.Others]; }
set { lineFeeds_[(int)TypeLanguage.Others] = value; }
}
[Category("General")]
[DisplayName("Load Setting File")]
[Description("Load \"_forcelinefeedcode.xml\".")]
public bool LoadSettingFile
{
get { return loadSettingFile_; }
set { loadSettingFile_ = value; }
}
}
}