hytos / DTI_PID / SPPIDConverter / SPPIDModel / GridSetting.cs @ 8487ecb2
이력 | 보기 | 이력해설 | 다운로드 (964 Bytes)
1 | 06b40010 | gaqhf | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | |||
7 | namespace Converter.SPPID |
||
8 | { |
||
9 | enum GridUnit |
||
10 | { |
||
11 | Inch |
||
12 | } |
||
13 | class GridSetting |
||
14 | { |
||
15 | private static GridSetting setting; |
||
16 | public bool UseSnapGrid { get; set; } |
||
17 | public double Density { get; set; } |
||
18 | public GridUnit Unit { get; set; } |
||
19 | 5761879d | gaqhf | public int MinSymbolGridCellCount { get; set; } |
20 | public int DrainValveCellCount { get; set; } |
||
21 | d9794a6c | gaqhf | public double Length { get; set; } |
22 | 06b40010 | gaqhf | |
23 | public static GridSetting GetInstance() |
||
24 | { |
||
25 | if (setting == null) |
||
26 | setting = new GridSetting(); |
||
27 | |||
28 | d9794a6c | gaqhf | if (setting.Unit == GridUnit.Inch) |
29 | { |
||
30 | setting.Length = setting.Density * 0.0254; |
||
31 | } |
||
32 | |||
33 | 06b40010 | gaqhf | return setting; |
34 | } |
||
35 | |||
36 | public static void Clear() |
||
37 | { |
||
38 | setting = new GridSetting(); |
||
39 | } |
||
40 | } |
||
41 | } |