개정판 78d91584
issue #1033: 폰트 목록 Text 수정 및 TopMenu 디자인 수정
Change-Id: I803173025fcfd626a5be04e389d77213f93c6c4f
KCOM/Common/InitData.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
1 |
using System.Collections.Generic; |
|
3 | 2 |
using System.Linq; |
4 |
using System.Net; |
|
5 |
using System.Windows; |
|
6 | 3 |
using System.Windows.Controls; |
7 |
using System.Windows.Documents; |
|
8 |
using System.Windows.Input; |
|
9 | 4 |
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 | 5 |
using System.Drawing.Text; |
15 | 6 |
|
16 | 7 |
namespace KCOM.Views |
17 | 8 |
{ |
18 |
|
|
19 | 9 |
public class DashStyle |
20 | 10 |
{ |
21 | 11 |
public DoubleCollection dashData { get; set; } |
22 | 12 |
} |
23 | 13 |
|
24 |
public class FontStyle |
|
25 |
{ |
|
26 |
public string fontData { get; set; } |
|
27 |
} |
|
28 |
|
|
29 | 14 |
public partial class TopMenu : UserControl |
30 | 15 |
{ |
31 | 16 |
public List<DashStyle> dashSet; |
32 |
public List<FontStyle> fontSet; |
|
33 | 17 |
|
34 | 18 |
public void InitDataSet() |
35 | 19 |
{ |
... | ... | |
47 | 31 |
}; |
48 | 32 |
cbDashStyle.ItemsSource = dashSet.ToList(); |
49 | 33 |
|
50 |
|
|
51 |
fontSet = new List<FontStyle>() |
|
34 |
List<string> fontList = new List<string>(); |
|
35 |
fontList.Add("Arial"); |
|
36 |
fontList.Add("Calibri (Body)"); |
|
37 |
fontList.Add("Tahoma"); |
|
38 |
fontList.Add("Verdana"); |
|
39 |
fontList.Add("Times New Roman"); |
|
40 |
fontList.Add("Cambria"); |
|
41 |
//fontList.Add("나눔바른펜"); |
|
42 |
List<string> fontSet = new List<string>(); |
|
43 |
foreach (var font in fontList) |
|
52 | 44 |
{ |
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 |
}; |
|
45 |
if (IsFontInstalled(font)) |
|
46 |
{ |
|
47 |
fontSet.Add(font.ToString()); |
|
48 |
} |
|
49 |
} |
|
60 | 50 |
comboFontFamily.ItemsSource = fontSet.ToList(); |
61 |
} |
|
51 |
}
|
|
62 | 52 |
|
63 |
/* |
|
64 | 53 |
/// <summary> |
65 | 54 |
/// 폰트 설치 여부 구하기 |
66 | 55 |
/// </summary> |
67 |
/// <param name="fontName">폰트명</param> |
|
68 |
/// <returns>폰트 설치 여부</returns> |
|
69 | 56 |
public bool IsFontInstalled(string fontName) |
70 | 57 |
{ |
71 |
System.Windows.Media.font |
|
72 | 58 |
InstalledFontCollection collection = new InstalledFontCollection(); |
73 |
foreach (FontFamily fontFamily in collection.Families) |
|
59 |
foreach (System.Drawing.FontFamily fontFamily in collection.Families)
|
|
74 | 60 |
{ |
75 |
if (fontFamily.FamilyNames.Equals(fontName))
|
|
61 |
if (fontFamily.Name.Equals(fontName))
|
|
76 | 62 |
{ |
77 | 63 |
return true; |
78 | 64 |
} |
79 | 65 |
} |
80 | 66 |
return false; |
81 |
} |
|
82 |
*/ |
|
67 |
} |
|
83 | 68 |
} |
84 | 69 |
} |
KCOM/Views/TopMenu.xaml | ||
---|---|---|
491 | 491 |
|
492 | 492 |
<telerik:RadOrderedWrapPanel> |
493 | 493 |
<StackPanel Orientation="Horizontal"> |
494 |
<!--강인구 추가--> |
|
495 | 494 |
<telerik:RadRibbonComboBox Width="60" Name="comboFontFamily" SelectedIndex="0" telerik:ScreenTip.Title="Font" telerik:ScreenTip.Description="Change the font face." |
496 |
SelectionChanged="RadRibbonComboBox_SelectionChanged" /> |
|
497 |
<!-- <telerik:RadRibbonComboBoxItem Content="Arial"/> |
|
498 |
<telerik:RadRibbonComboBoxItem Content="Calibri (Body)" /> |
|
499 |
<telerik:RadRibbonComboBoxItem Content="Tahoma" /> |
|
500 |
<telerik:RadRibbonComboBoxItem Content="Verdana" /> |
|
501 |
<telerik:RadRibbonComboBoxItem Content="Times New Roman" /> |
|
502 |
<telerik:RadRibbonComboBoxItem Content="Cambria" /> |
|
503 |
</telerik:RadRibbonComboBox>--> |
|
504 |
<!--강인구 추가(이벤트)--> |
|
505 |
<!--<telerik:RadRibbonComboBox Name="comboFontSize" Width="45" SelectedIndex="0" telerik:ScreenTip.Title="Font Size" telerik:ScreenTip.Description="Change the font size." SelectionChanged="comboFontSize_SelectionChanged"> |
|
506 |
<telerik:RadRibbonComboBoxItem Content="8" /> |
|
507 |
<telerik:RadRibbonComboBoxItem Content="9" /> |
|
508 |
<telerik:RadRibbonComboBoxItem Content="10" /> |
|
509 |
<telerik:RadRibbonComboBoxItem Content="11" /> |
|
510 |
<telerik:RadRibbonComboBoxItem Content="12" /> |
|
511 |
<telerik:RadRibbonComboBoxItem Content="14" /> |
|
512 |
<telerik:RadRibbonComboBoxItem Content="16" /> |
|
513 |
<telerik:RadRibbonComboBoxItem Content="18" /> |
|
514 |
<telerik:RadRibbonComboBoxItem Content="20" /> |
|
515 |
<telerik:RadRibbonComboBoxItem Content="30" /> |
|
516 |
<telerik:RadRibbonComboBoxItem Content="40" /> |
|
517 |
<telerik:RadRibbonComboBoxItem Content="50" /> |
|
518 |
<telerik:RadRibbonComboBoxItem Content="60" /> |
|
519 |
<telerik:RadRibbonComboBoxItem Content="70" /> |
|
520 |
<telerik:RadRibbonComboBoxItem Content="80" /> |
|
521 |
<telerik:RadRibbonComboBoxItem Content="90" /> |
|
522 |
<telerik:RadRibbonComboBoxItem Content="100" /> |
|
523 |
</telerik:RadRibbonComboBox>--> |
|
524 |
|
|
525 |
|
|
495 |
SelectionChanged="RadRibbonComboBox_SelectionChanged" Background="Transparent"/> |
|
526 | 496 |
<telerik:RadNumericUpDown x:Name="comboFontSize" |
527 | 497 |
Width="35" |
528 | 498 |
HorizontalContentAlignment="Center" |
... | ... | |
532 | 502 |
telerik:StyleManager.Theme="Windows7" |
533 | 503 |
ToolTipService.ToolTip="Stroke Value" |
534 | 504 |
ValueChanged="comboFontSize_ValueChanged" |
535 |
Value="{Binding TextSize, Source={x:Static common:ViewerDataModel.Instance}}" |
|
536 |
/> |
|
537 |
|
|
538 |
|
|
505 |
Value="{Binding TextSize, Source={x:Static common:ViewerDataModel.Instance}}"/> |
|
539 | 506 |
</StackPanel> |
540 |
<!--<telerik:RadButtonGroup> |
|
541 |
<telerik:RadRibbonButton SmallImage="/KCOM;component/Resources/Images/MenuImage/bold.png" telerik:ScreenTip.Title="Grow Font" /> |
|
542 |
<telerik:RadRibbonButton SmallImage="/RadRibbonViewSample;component/Images/IconMSOffice/16/font-decreasesize.png" telerik:ScreenTip.Title="Shrink Font" /> |
|
543 |
</telerik:RadButtonGroup>--> |
|
544 |
<!--<telerik:RadButtonGroup> |
|
545 |
<telerik:RadRibbonButton SmallImage="/RadRibbonViewSample;component/Images/IconMSOffice/16/ClearFormatting16.png" Text="Clear Formatting" telerik:ScreenTip.Title="Clear Formatting" /> |
|
546 |
</telerik:RadButtonGroup>--> |
|
547 |
<!--<telerik:RadButtonGroup telerik:StyleManager.Theme="Office2016">--> |
|
548 |
<!--강인구 추가(이벤트)--> |
|
549 |
<!--<CheckBox HorizontalAlignment="Left" Content="Highlight" Grid.Column="3" VerticalAlignment="Center" Margin="2,5,2,0" Checked="HighlightEvent" Unchecked="HighlightEvent" IsChecked="{Binding checkHighlight, Source={x:Static common:ViewerDataModel.Instance}}" />--> |
|
550 |
<telerik:RadToggleButton x:Name="btnBold" telerik:ScreenTip.Title="Bold" telerik:ScreenTip.Description="Make the selected text bold." Width="32" Height="32" Checked="btnBold_Checked" Unchecked="btnBold_Checked" IsChecked="{Binding checkTextWeight, Source={x:Static common:ViewerDataModel.Instance}}"> |
|
507 |
<StackPanel Orientation="Horizontal"> |
|
508 |
<telerik:RadToggleButton x:Name="btnBold" telerik:ScreenTip.Title="Bold" telerik:ScreenTip.Description="Make the selected text bold." Width="32" Height="32" Checked="btnBold_Checked" Unchecked="btnBold_Checked" IsChecked="{Binding checkTextWeight, Source={x:Static common:ViewerDataModel.Instance}}"> |
|
551 | 509 |
<Image Source="/KCOM;component/Resources/Images/MenuImage_new/bold.png" /> |
552 |
</telerik:RadToggleButton> |
|
553 |
<!--강인구 추가(이벤트)--> |
|
554 |
<telerik:RadToggleButton x:Name="btnItalic" telerik:ScreenTip.Title="Italic" telerik:ScreenTip.Description="Italicize the selected text." Width="32" Height="32" Checked="btnItalic_Checked" Unchecked="btnItalic_Checked" IsChecked="{Binding checkTextStyle, Source={x:Static common:ViewerDataModel.Instance}}"> |
|
510 |
</telerik:RadToggleButton> |
|
511 |
<telerik:RadToggleButton x:Name="btnItalic" telerik:ScreenTip.Title="Italic" telerik:ScreenTip.Description="Italicize the selected text." Width="32" Height="32" Checked="btnItalic_Checked" Unchecked="btnItalic_Checked" IsChecked="{Binding checkTextStyle, Source={x:Static common:ViewerDataModel.Instance}}"> |
|
555 | 512 |
<Image Source="/KCOM;component/Resources/Images/MenuImage_new/italic.png"/> |
556 |
</telerik:RadToggleButton> |
|
557 |
<!--강인구 추가(이벤트)--> |
|
558 |
<telerik:RadToggleButton x:Name="btnUnderLine" Width="32" Height="32" telerik:ScreenTip.Title="Underline" telerik:ScreenTip.Description="Underline the selected text." Checked="btnUnderLine_Checked" Unchecked="btnUnderLine_Checked" IsChecked="{Binding checkUnderLine, Source={x:Static common:ViewerDataModel.Instance}}"> |
|
513 |
</telerik:RadToggleButton> |
|
514 |
<telerik:RadToggleButton x:Name="btnUnderLine" Width="32" Height="32" telerik:ScreenTip.Title="Underline" telerik:ScreenTip.Description="Underline the selected text." Checked="btnUnderLine_Checked" Unchecked="btnUnderLine_Checked" IsChecked="{Binding checkUnderLine, Source={x:Static common:ViewerDataModel.Instance}}"> |
|
559 | 515 |
<Image Source="/KCOM;component/Resources/Images/MenuImage_new/underline.png"/> |
560 | 516 |
</telerik:RadToggleButton> |
561 |
<!--</telerik:RadButtonGroup>--> |
|
562 |
<!--<CheckBox Margin="10,3,5,0" HorizontalAlignment="Left" Content="Highlight" VerticalAlignment="Center"/>--><!-- |
|
563 |
<telerik:RadButton Content="LIBRARY" Background="{DynamicResource KCOMColor_MarkerBrush}" Foreground="White" Margin="5,5,0,0" Padding="3"/>--> |
|
517 |
</StackPanel> |
|
564 | 518 |
</telerik:RadOrderedWrapPanel> |
565 | 519 |
</telerik:RadRibbonGroup> |
566 | 520 |
|
내보내기 Unified diff