markus / KCOM / Common / InitData.cs @ b37ef4b3
이력 | 보기 | 이력해설 | 다운로드 (2.66 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Net; |
5 |
using System.Windows; |
6 |
using System.Windows.Controls; |
7 |
using System.Windows.Documents; |
8 |
using System.Windows.Input; |
9 |
using System.Windows.Media; |
10 |
using System.Windows.Media.Animation; |
11 |
using System.Windows.Shapes; |
12 |
using Telerik.Windows.Controls; |
13 |
using System.IO; |
14 |
using System.Drawing.Text; |
15 |
|
16 |
namespace KCOM.Views |
17 |
{ |
18 |
|
19 |
public class DashStyle |
20 |
{ |
21 |
public DoubleCollection dashData { get; set; } |
22 |
} |
23 |
|
24 |
public class FontStyle |
25 |
{ |
26 |
public string fontData { get; set; } |
27 |
} |
28 |
|
29 |
public partial class TopMenu : UserControl |
30 |
{ |
31 |
public List<DashStyle> dashSet; |
32 |
public List<FontStyle> fontSet; |
33 |
|
34 |
public void InitDataSet() |
35 |
{ |
36 |
dashSet = new List<DashStyle>() |
37 |
{ |
38 |
new DashStyle { dashData = new DoubleCollection{999999}}, |
39 |
new DashStyle { dashData = new DoubleCollection{2,2}}, |
40 |
new DashStyle { dashData = new DoubleCollection{4,4}}, |
41 |
new DashStyle { dashData = new DoubleCollection{8,8}}, |
42 |
new DashStyle { dashData = new DoubleCollection{20,0,0, 5,1.1,5}}, |
43 |
new DashStyle { dashData = new DoubleCollection{10,10}}, |
44 |
new DashStyle { dashData = new DoubleCollection{15,15}}, |
45 |
new DashStyle { dashData = new DoubleCollection{15,3,3,0,3,3}}, |
46 |
new DashStyle { dashData = new DoubleCollection{15,3,3,3,3,3}}, |
47 |
}; |
48 |
cbDashStyle.ItemsSource = dashSet.ToList(); |
49 |
|
50 |
|
51 |
fontSet = new List<FontStyle>() |
52 |
{ |
53 |
new FontStyle { fontData = "Arial"}, |
54 |
new FontStyle { fontData = "Calibri (Body)"}, |
55 |
new FontStyle { fontData = "Tahoma"}, |
56 |
new FontStyle { fontData = "Verdana"}, |
57 |
new FontStyle { fontData = "Times New Roman"}, |
58 |
new FontStyle { fontData = "Cambria"} |
59 |
}; |
60 |
comboFontFamily.ItemsSource = fontSet.ToList(); |
61 |
} |
62 |
|
63 |
/* |
64 |
/// <summary> |
65 |
/// 폰트 설치 여부 구하기 |
66 |
/// </summary> |
67 |
/// <param name="fontName">폰트명</param> |
68 |
/// <returns>폰트 설치 여부</returns> |
69 |
public bool IsFontInstalled(string fontName) |
70 |
{ |
71 |
System.Windows.Media.font |
72 |
InstalledFontCollection collection = new InstalledFontCollection(); |
73 |
foreach (FontFamily fontFamily in collection.Families) |
74 |
{ |
75 |
if (fontFamily.FamilyNames.Equals(fontName)) |
76 |
{ |
77 |
return true; |
78 |
} |
79 |
} |
80 |
return false; |
81 |
} |
82 |
*/ |
83 |
} |
84 |
} |