-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathHelpCommon.cs
More file actions
247 lines (222 loc) · 5.53 KB
/
HelpCommon.cs
File metadata and controls
247 lines (222 loc) · 5.53 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
using System.ComponentModel;
using System.Globalization;
namespace Signum.Help;
public interface IHelpEntity : IEntity
{
bool ForeachHtmlField(Func<string, string> processHtml);
}
public abstract class HelpImportLineBase : EmbeddedEntity
{
public TypeEntity Type { get; set; }
public string Key { get; set; }
public CultureInfoEntity Culture { get; set; }
public string? Text { get; set; }
public ImportAction Action { get; set; }
[ImplementedByAll()]
public Lite<IHelpEntity>? ExitingEntity { get; set; }
}
public class HelpImportPreviewLineEmbedded : HelpImportLineBase
{
[Description("Apply?")]
public bool? Apply { get; set; }
public bool ApplyVisible
{
get { return Action != ImportAction.NoChange; }
}
public override string ToString() => $"{Type} {Key} {Action}";
}
public class HelpImportReportLineEmbedded : HelpImportLineBase
{
public ImportStatus Status { get; set; }
public string? ActionError { get; set; }
}
public class HelpImportPreviewModel : ModelEntity
{
public MList<HelpImportPreviewLineEmbedded> Lines { get; set; } = [];
}
public class HelpImportReportModel : ModelEntity
{
public MList<HelpImportReportLineEmbedded> Lines { get; set; } = [];
}
public enum ImportStatus
{
NoChange,
Applied,
Failed,
Skipped
}
public enum ImportAction
{
NoChange,
Create,
Override,
// Remove
}
public enum HelpMessage
{
[Description("{0} is a {1}")]
_0IsA1_G,
[Description("An embedded entity of type {0}")]
AnEmbeddedEntityOfType0,
[Description("A reference ({1}) to a {2}")]
AReference1ToA2_G,
[Description("lite")]
lite,
[Description("full")]
full,
[Description("{0} is a {1} and shows {2}")]
_0IsA1AndShows2,
[Description("{0} is a calculated {1}")]
_0IsACalculated1,
[Description("{0} is a collection of elements {1}")]
_0IsACollectionOfElements1,
[Description("amount")]
Amount,
[Description("any")]
Any,
Appendices,
Buscador,
[Description("Call {0} over {1} of the {2}")]
Call0Over1OfThe2,
[Description("character")]
Character,
[Description("boolean value (yes or no)")]
BooleanValue,
[Description("Constructs a new {0}")]
ConstructsANew0,
[Description("date")]
Date,
[Description("date and time")]
DateTime,
[Description("expressed in ")]
ExpressedIn,
[Description("from {0} of the {1}")]
From0OfThe1,
[Description("from many {0}")]
FromMany0,
Help,
HelpNotLoaded,
[Description("integer")]
Integer,
[Description("Key {0} not found")]
Key0NotFound,
[Description(" (optional)")]
Optional,
[Description("Property {0} does not exist in type {1}")]
Property0NotExistsInType1,
[Description("Query of {0}")]
QueryOf0,
[Description("Removes the {0} from the database")]
RemovesThe0FromTheDatabase,
[Description(". Should ")]
Should,
[Description("string")]
String,
[Description("the database version")]
TheDatabaseVersion,
[Description("the property {0}")]
TheProperty0,
[Description("value")]
Value,
[Description("value like {0}")]
ValueLike0,
[Description("your version")]
YourVersion,
[Description("{0} is the primary key of {1}, of type {2}")]
_0IsThePrimaryKeyOf1OfType2,
[Description("(in {0})")]
In0,
Entities,
SearchText,
Previous,
Next,
Edit,
Close,
ViewMore,
JumpToViewMore,
ExportAsZip,
Import,
ImportCompletedSuccessfully,
ImportCompletedWithErrors,
ImportReport,
ImportError,
ImportHelpContentsFromZipFile,
SelectTheZIPFileWithTheHelpContentsThatYouWantToImport,
ChooseZIPFile,
SelectedFile,
HelpZipContents,
NewKey,
ActionStatus,
LoadingImage,
}
public enum HelpKindMessage
{
[Description("His main function is to {0}")]
HisMainFunctionIsTo0,
[Description("relate other entities")]
RelateOtherEntities,
[Description("classify other entities")]
ClassifyOtherEntities,
[Description("store information shared by other entities")]
StoreInformationSharedByOtherEntities,
[Description("store information on its own")]
StoreInformationOnItsOwn,
[Description("store part of the information of other entity")]
StorePartOfTheInformationOfAnotherEntity,
[Description("store parts of information shared by different entities")]
StorePartsOfInformationSharedByDifferentEntities,
[Description(" automatically by the system")]
AutomaticallyByTheSystem,
[Description(" and is Master Data (rarely changes)")]
AndIsMasterDataRarelyChanges,
[Description(" and is Transactional Data (created regularly)")]
andIsTransactionalDataCreatedRegularly,
}
public enum HelpSyntaxMessage
{
BoldText,
ItalicText,
UnderlineText,
StriketroughText,
LinkToEntity,
LinkToProperty,
LinkToQuery,
LinkToOperation,
LinkToNamespace,
ExernalLink,
LinksAllowAnExtraParameterForTheText,
Example,
UnorderedListItem,
OtherItem,
OrderedListItem,
TitleLevel,
Title,
Images,
Texts,
Links,
Lists,
InsertImage,
Options,
Edit,
Save,
Syntax,
[Description("Translate from...")]
TranslateFrom
}
public enum HelpSearchMessage
{
Search,
[Description("{0} result[s] for {1} (in {2} ms)")]
_0ResultsFor1In2,
Results
}
[DescriptionOptions(DescriptionOptions.Members)]
public enum TypeSearchResult
{
Appendix,
Namespace,
Type,
Property,
Query,
Operation,
}