개정판 f3c08420
#issue 0004 UpdateWindow 추가/MainAngle에 대한 수정
- 처음 실행시 업데이트 진행 하도록 수정
- MainAngle에 각 Markup 회전시 각도가 나오도록 수정
Change-Id: I547c18e0b5aa5c09ddaec14e93b1c4ced4e03a56
KCOM/App.xaml | ||
---|---|---|
7 | 7 |
<ResourceDictionary> |
8 | 8 |
<ResourceDictionary.MergedDictionaries> |
9 | 9 |
<ResourceDictionary Source="Resources\Theme_Color.xaml"/> |
10 |
<ResourceDictionary/> |
|
11 | 10 |
<ResourceDictionary Source="Resources\DecodeImageTemplate.xaml"/> |
12 | 11 |
<ResourceDictionary Source="Resources\Theme_CustomControl.xaml"/> |
13 | 12 |
<ResourceDictionary Source="Resources\MainWindowStyle.xaml"/> |
14 | 13 |
<ResourceDictionary Source="Assets\RadGridViewStyleResourceDictionary.xaml"/> |
15 | 14 |
<ResourceDictionary Source="Messenger\StyleDictionary.xaml"/> |
16 | 15 |
<ResourceDictionary Source="/MarkupToPDF;component/themes/generic.xaml"/> |
16 |
<ResourceDictionary Source="/Telerik.Windows.Controls;component/Themes/FontResources.xaml"/> |
|
17 | 17 |
<!--<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml"/> |
18 | 18 |
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml"/> |
19 | 19 |
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Input.xaml"/> |
KCOM/App.xaml.cs | ||
---|---|---|
267 | 267 |
|
268 | 268 |
Current.ShutdownMode = ShutdownMode.OnMainWindowClose; |
269 | 269 |
|
270 |
|
|
271 |
(new MainWindow()).Show(); |
|
270 |
UpdateCheck(e); |
|
272 | 271 |
//this.MainWindow.Show(); |
273 | 272 |
//KeyValuePair<bool, string> updatecheck = UpdateCheck(e); |
274 |
|
|
275 |
|
|
276 | 273 |
} |
277 | 274 |
catch (Exception ex) |
278 | 275 |
{ |
... | ... | |
284 | 281 |
} |
285 | 282 |
} |
286 | 283 |
|
287 |
private void CallUpdateProcess(string updateurl) |
|
288 |
{ |
|
289 |
ProcessStartInfo proInfo = new ProcessStartInfo(); |
|
290 |
string smartupdaterpath = string.Empty; |
|
291 |
smartupdaterpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SmartUpdate.exe"); |
|
292 |
Process.Start(smartupdaterpath, updateurl); |
|
293 |
} |
|
294 |
|
|
295 | 284 |
private KeyValuePair<bool, string> UpdateCheck(StartupEventArgs startupEvents) |
296 | 285 |
{ |
297 | 286 |
bool isUpdateCheck = false; |
... | ... | |
303 | 292 |
ServiceDeepViewClient BaseClient = new ServiceDeepViewClient(_binding, _EndPoint); |
304 | 293 |
updateurl = BaseClient.GetVersionData(is64bit, clientversion); |
305 | 294 |
|
306 |
var result = MessageBox.Show("test","test",MessageBoxButton.OKCancel); |
|
307 |
|
|
308 |
if (result == MessageBoxResult.Cancel) |
|
309 |
{ |
|
310 |
return new KeyValuePair<bool, string>(); |
|
311 |
} |
|
312 |
|
|
313 | 295 |
if (Check_Uri.isUri(updateurl)) |
314 | 296 |
{ |
315 |
DialogParameters parameters = new DialogParameters() |
|
297 |
base.OnStartup(startupEvents); |
|
298 |
|
|
299 |
var updateWin = new UpdateWindow(updateurl); |
|
300 |
|
|
301 |
updateWin.UpdatePassEvent += (snd, evt) => |
|
316 | 302 |
{ |
317 |
//Owner = Application.Current.MainWindow, |
|
318 |
Content = new System.Windows.Controls.TextBlock() |
|
319 |
{ |
|
320 |
MinWidth = 400, |
|
321 |
FontSize = 11, |
|
322 |
Text = "새로운 버전이 있습니다. \n업데이트 하시겠습니까?", |
|
323 |
TextWrapping = System.Windows.TextWrapping.Wrap |
|
324 |
}, |
|
325 |
Header = "Confirm", |
|
326 |
Theme = new Telerik.Windows.Controls.VisualStudio2013Theme(), |
|
327 |
ModalBackground = new System.Windows.Media.SolidColorBrush { Color = System.Windows.Media.Colors.Black, Opacity = 0.6 }, |
|
328 |
Closed = delegate (object windowSender, WindowClosedEventArgs e) |
|
329 |
{ |
|
330 |
if (e.DialogResult == true) |
|
331 |
{ |
|
332 |
CallUpdateProcess(updateurl); |
|
333 |
} |
|
334 |
|
|
335 |
base.OnStartup(startupEvents); |
|
336 |
(new MainWindow()).Show(); |
|
337 |
} |
|
303 |
updateWin.Visibility = Visibility.Hidden; |
|
304 |
new MainWindow().Show(); |
|
338 | 305 |
}; |
339 |
Telerik.Windows.Controls.RadWindow.Confirm(parameters); |
|
340 | 306 |
|
307 |
updateWin.ShowDialog(); |
|
341 | 308 |
} |
342 | 309 |
else |
343 | 310 |
{ |
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
374 | 374 |
|
375 | 375 |
|
376 | 376 |
#region Angle 관련 |
377 |
private Visibility _AngleVisibility { get; set; } |
|
377 |
private Visibility _AngleVisibility; |
|
378 |
|
|
378 | 379 |
public Visibility AngleVisibility |
379 | 380 |
{ |
380 | 381 |
get |
... | ... | |
1155 | 1156 |
|
1156 | 1157 |
this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval; |
1157 | 1158 |
|
1159 |
this.AngleVisibility = Visibility.Collapsed; |
|
1158 | 1160 |
} |
1159 | 1161 |
|
1160 | 1162 |
public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; } |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
1754 | 1754 |
|
1755 | 1755 |
System.Reactive.Linq.Observable2.FromPropertyChangedPattern(Common.ViewerDataModel.Instance, temp => temp.AngleVisibility).Subscribe(isSee => |
1756 | 1756 |
{ |
1757 |
instanceMain.dzMainMenu.MainAngle.Visibility = isSee; |
|
1758 |
System.Reactive.Linq.Observable2.FromPropertyChangedPattern(Common.ViewerDataModel.Instance, temp => temp.AngleValue).Subscribe(p => |
|
1757 |
if (instanceMain.dzMainMenu.MainAngle.Visibility != isSee) |
|
1759 | 1758 |
{ |
1760 |
instanceMain.dzMainMenu.MainAngle.AngleValue = p; |
|
1761 |
}); |
|
1759 |
instanceMain.dzMainMenu.MainAngle.Visibility = isSee; |
|
1760 |
} |
|
1761 |
//System.Reactive.Linq.Observable2.FromPropertyChangedPattern(Common.ViewerDataModel.Instance, temp => temp.AngleValue).Subscribe(p => |
|
1762 |
//{ |
|
1763 |
// instanceMain.dzMainMenu.MainAngle.AngleValue = p; |
|
1764 |
//}); |
|
1762 | 1765 |
}); |
1763 | 1766 |
instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing; |
1764 | 1767 |
|
KCOM/KCOM.csproj | ||
---|---|---|
308 | 308 |
<Compile Include="Extensions\MatrixHelper.cs" /> |
309 | 309 |
<Compile Include="Extensions\VectorExtentions.cs" /> |
310 | 310 |
<Compile Include="Assets\HeaderTemplateSelector.cs" /> |
311 |
<Compile Include="UpdateWindow.xaml.cs"> |
|
312 |
<DependentUpon>UpdateWindow.xaml</DependentUpon> |
|
313 |
</Compile> |
|
311 | 314 |
<Compile Include="ViewModel\BiddersSearchViewModel.cs" /> |
312 | 315 |
<Compile Include="ViewModel\BiddersViewModel.cs" /> |
313 | 316 |
<Compile Include="ViewModel\RequirementSearchViewModel.cs" /> |
... | ... | |
424 | 427 |
<SubType>Designer</SubType> |
425 | 428 |
<Generator>MSBuild:Compile</Generator> |
426 | 429 |
</Page> |
430 |
<Page Include="UpdateWindow.xaml"> |
|
431 |
<SubType>Designer</SubType> |
|
432 |
<Generator>MSBuild:Compile</Generator> |
|
433 |
</Page> |
|
427 | 434 |
<Page Include="Views\AddRequirement.xaml"> |
428 | 435 |
<SubType>Designer</SubType> |
429 | 436 |
<Generator>MSBuild:Compile</Generator> |
KCOM/MainWindow.xaml | ||
---|---|---|
11 | 11 |
xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation" |
12 | 12 |
WindowStartupLocation="CenterScreen" |
13 | 13 |
navigation:RadWindowInteropHelper.ShowInTaskbar="True" |
14 |
Style="{StaticResource MainWindowStyle}" BorderBrush="#FF2A579A"
|
|
14 |
Style="{StaticResource MainWindowStyle}" BorderBrush="#FF40568D"
|
|
15 | 15 |
navigation:RadWindowInteropHelper.Icon="markup.ico" |
16 | 16 |
Background="{DynamicResource KCOMColor_TopMenubackgroundBrush}" |
17 | 17 |
Header="MARKUS" Foreground="White" > |
18 | 18 |
<telerik:RadWindow.Resources> |
19 | 19 |
<Style x:Key="NoMarginGrid" TargetType="{x:Type Grid}"> |
20 |
<Setter Property="Margin" Value="1"/>
|
|
20 |
<Setter Property="Margin" Value="0"/>
|
|
21 | 21 |
</Style> |
22 | 22 |
</telerik:RadWindow.Resources> |
23 | 23 |
<Grid Style="{StaticResource NoMarginGrid}"> |
... | ... | |
27 | 27 |
<RowDefinition Height="Auto"/> |
28 | 28 |
<RowDefinition Height="*"/> |
29 | 29 |
</Grid.RowDefinitions> |
30 |
<Border Grid.RowSpan="10" BorderThickness="1" BorderBrush="#FF8D8888"/>
|
|
30 |
<Border Grid.RowSpan="10" BorderThickness="2" BorderBrush="#FF8D8888"/>
|
|
31 | 31 |
<!--<Border VerticalAlignment="Stretch" MouseLeftButtonDown="WindowDragEvent" Background="{DynamicResource KCOMColor_TopMenubackgroundBrush}" |
32 | 32 |
MouseLeftButtonUp="WindowDragEventUp" MouseMove="WindowDragEventMove"> |
33 | 33 |
<Grid> |
KCOM/Properties/AssemblyInfo.cs | ||
---|---|---|
51 | 51 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 |
52 | 52 |
// 지정되도록 할 수 있습니다. |
53 | 53 |
// [assembly: AssemblyVersion("1.0.*")] |
54 |
[assembly: AssemblyVersion("2.0.1.100")] |
|
55 |
[assembly: AssemblyFileVersion("2.0.1.100")] |
|
54 |
[assembly: AssemblyVersion("2.1.0.000")] |
|
55 |
[assembly: AssemblyFileVersion("2.1.0.000")] |
KCOM/UpdateWindow.xaml | ||
---|---|---|
1 |
<telerik:RadWindow x:Class="KCOM.UpdateWindow" |
|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
4 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
5 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
6 |
xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation" |
|
7 |
navigation:RadWindowInteropHelper.ShowInTaskbar="True" |
|
8 |
navigation:RadWindowInteropHelper.Icon="markup.ico" |
|
9 |
xmlns:local="clr-namespace:KCOM" CanClose="False" HideMinimizeButton="True" |
|
10 |
WindowStartupLocation="CenterScreen" HideMaximizeButton="True" CanMove="False" |
|
11 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
|
12 |
mc:Ignorable="d" Style="{StaticResource MainWindowStyle}" |
|
13 |
Header="Markus Smart Update" Height="150" Width="500" MaxHeight="150" MaxWidth="500" MinHeight="150" MinWidth="500"> |
|
14 |
<telerik:RadWindow.Resources> |
|
15 |
<Style TargetType="Path" x:Key="RadPathStyle"> |
|
16 |
<Setter Property="Width" Value="14"/> |
|
17 |
<Setter Property="Height" Value="14"/> |
|
18 |
<Setter Property="Fill" Value="#FF494949" /> |
|
19 |
<Setter Property="Stretch" Value="Fill" /> |
|
20 |
<Setter Property="HorizontalAlignment" Value="Left" /> |
|
21 |
<Setter Property="VerticalAlignment" Value="Center" /> |
|
22 |
</Style> |
|
23 |
<Style TargetType="telerik:RadPathButton" x:Key="RadPathButtonStyle"> |
|
24 |
<Setter Property="PathStyle" Value="{StaticResource RadPathStyle}"/> |
|
25 |
<Setter Property="telerik:StyleManager.Theme" Value="Office2016"/> |
|
26 |
<Setter Property="ContentPlacement" Value="Right"/> |
|
27 |
<Setter Property="HorizontalContentAlignment" Value="Center"/> |
|
28 |
<Setter Property="FontSize" Value="14"/> |
|
29 |
<Setter Property="FontWeight" Value="Bold"/> |
|
30 |
</Style> |
|
31 |
</telerik:RadWindow.Resources> |
|
32 |
<telerik:RadWindow.Icon> |
|
33 |
<Image Source="{telerik:RadGlyph Glyph={StaticResource GlyphQuestion}, Foreground=Gray}" Margin="0,0,10,0"/> |
|
34 |
<!--<telerik:RadGlyph Glyph="" Foreground="White" FontSize="14"/>--> |
|
35 |
</telerik:RadWindow.Icon> |
|
36 |
<Grid> |
|
37 |
<Grid.RowDefinitions> |
|
38 |
<RowDefinition Height="Auto"/> |
|
39 |
<RowDefinition Height="Auto"/> |
|
40 |
</Grid.RowDefinitions> |
|
41 |
<StackPanel Orientation="Horizontal"> |
|
42 |
<TextBlock FontSize="20" FontWeight="Bold" Margin="25,10" Foreground="#FF515151"> |
|
43 |
Markus의 새로운 버전이 있습니다.<LineBreak/>업데이트 하시겠습니까? |
|
44 |
</TextBlock> |
|
45 |
</StackPanel> |
|
46 |
<Grid Grid.Row="1"> |
|
47 |
<Grid.ColumnDefinitions> |
|
48 |
<ColumnDefinition/> |
|
49 |
<ColumnDefinition Width="Auto"/> |
|
50 |
<ColumnDefinition Width="10"/> |
|
51 |
<ColumnDefinition Width="Auto"/> |
|
52 |
<ColumnDefinition Width="10"/> |
|
53 |
<ColumnDefinition Width="Auto"/> |
|
54 |
<ColumnDefinition/> |
|
55 |
</Grid.ColumnDefinitions> |
|
56 |
<telerik:RadPathButton Grid.Column="1" Content="업데이트 " Width="115" Style="{StaticResource RadPathButtonStyle}" Click="btUpdate_Click" |
|
57 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphReset}, Foreground=White}"/> |
|
58 |
<telerik:RadPathButton Grid.Column="3" Content="업데이트 안함" Width="115" Style="{StaticResource RadPathButtonStyle}" Click="btPassUpdate_Click" |
|
59 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphClose}, Foreground=White}"/> |
|
60 |
<telerik:RadPathButton Grid.Column="5" Content="취 소 " Width="115" Style="{StaticResource RadPathButtonStyle}" Click="btCancel_Click" |
|
61 |
PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphClose}, Foreground=White}"/> |
|
62 |
</Grid> |
|
63 |
</Grid> |
|
64 |
</telerik:RadWindow> |
KCOM/UpdateWindow.xaml.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Diagnostics; |
|
4 |
using System.Linq; |
|
5 |
using System.Text; |
|
6 |
using System.Threading.Tasks; |
|
7 |
using System.Windows; |
|
8 |
using System.Windows.Controls; |
|
9 |
using System.Windows.Data; |
|
10 |
using System.Windows.Documents; |
|
11 |
using System.Windows.Input; |
|
12 |
using System.Windows.Media; |
|
13 |
using System.Windows.Media.Imaging; |
|
14 |
using System.Windows.Shapes; |
|
15 |
using Telerik.Windows.Controls; |
|
16 |
|
|
17 |
namespace KCOM |
|
18 |
{ |
|
19 |
/// <summary> |
|
20 |
/// UpdateWindow.xaml에 대한 상호 작용 논리 |
|
21 |
/// </summary> |
|
22 |
public partial class UpdateWindow : RadWindow |
|
23 |
{ |
|
24 |
public UpdateWindow(string updateurl) |
|
25 |
{ |
|
26 |
InitializeComponent(); |
|
27 |
|
|
28 |
this._updateurl = updateurl; |
|
29 |
} |
|
30 |
|
|
31 |
public event EventHandler<EventArgs> UpdatePassEvent; |
|
32 |
private string _updateurl; |
|
33 |
|
|
34 |
private void CallUpdateProcess(string updateurl) |
|
35 |
{ |
|
36 |
ProcessStartInfo proInfo = new ProcessStartInfo(); |
|
37 |
string smartupdaterpath = string.Empty; |
|
38 |
smartupdaterpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SmartUpdate.exe"); |
|
39 |
Process.Start(smartupdaterpath, updateurl); |
|
40 |
} |
|
41 |
|
|
42 |
private void btUpdate_Click(object sender, RoutedEventArgs e) |
|
43 |
{ |
|
44 |
CallUpdateProcess(_updateurl); |
|
45 |
} |
|
46 |
|
|
47 |
private void btPassUpdate_Click(object sender, RoutedEventArgs e) |
|
48 |
{ |
|
49 |
if (UpdatePassEvent != null) |
|
50 |
{ |
|
51 |
UpdatePassEvent(this, new EventArgs()); |
|
52 |
} |
|
53 |
} |
|
54 |
|
|
55 |
private void btCancel_Click(object sender, RoutedEventArgs e) |
|
56 |
{ |
|
57 |
this.DialogResult = false; |
|
58 |
} |
|
59 |
} |
|
60 |
} |
KCOM/Views/MainMenu.xaml | ||
---|---|---|
238 | 238 |
Grid.Column="1" |
239 | 239 |
Grid.ColumnSpan="2" |
240 | 240 |
Margin="10" |
241 |
AngleValue="{Binding AngleValue, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}"
|
|
241 |
AngleValue="{Binding Angle, Mode=TwoWay, StringFormat=\{0:F0\}°, Source={x:Static common:ViewerDataModel.Instance}}"
|
|
242 | 242 |
HorizontalAlignment="Right" |
243 | 243 |
VerticalAlignment="Top" |
244 | 244 |
IsHitTestVisible="False" |
245 |
Visibility="Collapsed" />
|
|
245 |
Visibility="{Binding AngleVisibility, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" />
|
|
246 | 246 |
</Grid> |
247 | 247 |
</telerik:RadDocumentPane> |
248 | 248 |
</telerik:RadPaneGroup> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
1352 | 1352 |
control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift); |
1353 | 1353 |
control.DashSize = ViewerDataModel.Instance.DashSize; |
1354 | 1354 |
} |
1355 |
|
|
1355 | 1356 |
} |
1356 | 1357 |
break; |
1357 | 1358 |
|
... | ... | |
1526 | 1527 |
default: |
1527 | 1528 |
break; |
1528 | 1529 |
} |
1530 |
|
|
1531 |
if (ViewerDataModel.Instance.AngleVisibility == Visibility.Visible) |
|
1532 |
{ |
|
1533 |
ViewerDataModel.Instance.Angle = currentControl.Angle; |
|
1534 |
} |
|
1529 | 1535 |
} |
1530 | 1536 |
} |
1531 | 1537 |
else if(mouseHandlingMode == MouseHandlingMode.Drawing && e.LeftButton == MouseButtonState.Pressed) |
... | ... | |
2795 | 2801 |
|
2796 | 2802 |
CreateCommand.Instance.Execute(currentControl); |
2797 | 2803 |
currentControl = null; |
2798 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
2804 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
2799 | 2805 |
} |
2800 | 2806 |
else |
2801 | 2807 |
{ |
... | ... | |
2810 | 2816 |
currentControl.CommentID = Commons.shortGuid(); |
2811 | 2817 |
currentControl.IsNew = true; |
2812 | 2818 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
2813 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
2819 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
2814 | 2820 |
} |
2815 | 2821 |
} |
2816 | 2822 |
} |
... | ... | |
2891 | 2897 |
CreateCommand.Instance.Execute(currentControl); |
2892 | 2898 |
|
2893 | 2899 |
currentControl = null; |
2894 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
2900 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
2895 | 2901 |
return; |
2896 | 2902 |
} |
2897 | 2903 |
|
2898 | 2904 |
if (!control.IsCompleted) |
2899 | 2905 |
{ |
2900 | 2906 |
control.PointSet.Add(control.EndPoint); |
2901 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
2907 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
2902 | 2908 |
} |
2903 | 2909 |
} |
2904 | 2910 |
else |
... | ... | |
2948 | 2954 |
CreateCommand.Instance.Execute(currentControl); |
2949 | 2955 |
|
2950 | 2956 |
currentControl = null; |
2951 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
2957 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
2952 | 2958 |
} |
2953 | 2959 |
else |
2954 | 2960 |
{ |
... | ... | |
2961 | 2967 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
2962 | 2968 |
currentControl.IsNew = true; |
2963 | 2969 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
2964 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
2970 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
2965 | 2971 |
} |
2966 | 2972 |
} |
2967 | 2973 |
else if (e.RightButton == MouseButtonState.Pressed) |
... | ... | |
2991 | 2997 |
CreateCommand.Instance.Execute(currentControl); |
2992 | 2998 |
|
2993 | 2999 |
currentControl = null; |
2994 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3000 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
2995 | 3001 |
} |
2996 | 3002 |
else |
2997 | 3003 |
{ |
... | ... | |
3004 | 3010 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
3005 | 3011 |
currentControl.IsNew = true; |
3006 | 3012 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3007 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3013 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3008 | 3014 |
} |
3009 | 3015 |
//} |
3010 | 3016 |
} |
... | ... | |
3051 | 3057 |
CreateCommand.Instance.Execute(currentControl); |
3052 | 3058 |
|
3053 | 3059 |
currentControl = null; |
3054 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3060 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
3055 | 3061 |
} |
3056 | 3062 |
} |
3057 | 3063 |
else |
... | ... | |
3065 | 3071 |
currentControl.MarkupInfoID = App.Custom_ViewInfoId; |
3066 | 3072 |
currentControl.IsNew = true; |
3067 | 3073 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
3068 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3074 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3069 | 3075 |
} |
3070 | 3076 |
//} |
3071 | 3077 |
} |
... | ... | |
3384 | 3390 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
3385 | 3391 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
3386 | 3392 |
(currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text)); |
3387 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3393 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3388 | 3394 |
|
3389 | 3395 |
|
3390 | 3396 |
//} |
... | ... | |
3410 | 3416 |
|
3411 | 3417 |
currentControl.IsNew = false; |
3412 | 3418 |
currentControl = null; |
3413 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3419 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
3414 | 3420 |
} |
3415 | 3421 |
else |
3416 | 3422 |
{ |
... | ... | |
3458 | 3464 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
3459 | 3465 |
currentControl.IsNew = false; |
3460 | 3466 |
currentControl = null; |
3461 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3467 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
3462 | 3468 |
} |
3463 | 3469 |
else |
3464 | 3470 |
{ |
... | ... | |
3485 | 3491 |
(currentControl as ArrowTextControl).Angle -= rotate.Angle; |
3486 | 3492 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
3487 | 3493 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
3488 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3494 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3489 | 3495 |
//} |
3490 | 3496 |
} |
3491 | 3497 |
} |
... | ... | |
3507 | 3513 |
currentControl.IsNew = false; |
3508 | 3514 |
currentControl = null; |
3509 | 3515 |
|
3510 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3516 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
3511 | 3517 |
} |
3512 | 3518 |
else |
3513 | 3519 |
{ |
... | ... | |
3539 | 3545 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
3540 | 3546 |
(currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text)); |
3541 | 3547 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
3542 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3548 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3543 | 3549 |
|
3544 | 3550 |
//20180911 LJY |
3545 | 3551 |
(currentControl as ArrowTextControl).isTrans = true; |
... | ... | |
3565 | 3571 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
3566 | 3572 |
currentControl.IsNew = false; |
3567 | 3573 |
currentControl = null; |
3568 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3574 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
3569 | 3575 |
} |
3570 | 3576 |
else |
3571 | 3577 |
{ |
... | ... | |
3591 | 3597 |
|
3592 | 3598 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
3593 | 3599 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
3594 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3600 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3595 | 3601 |
//} |
3596 | 3602 |
} |
3597 | 3603 |
} |
... | ... | |
3612 | 3618 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
3613 | 3619 |
currentControl.IsNew = false; |
3614 | 3620 |
currentControl = null; |
3615 |
this.MainAngle.Visibility = Visibility.Collapsed;
|
|
3621 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
|
|
3616 | 3622 |
} |
3617 | 3623 |
else |
3618 | 3624 |
{ |
... | ... | |
3641 | 3647 |
(currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text)); |
3642 | 3648 |
(currentControl as ArrowTextControl).ApplyTemplate(); |
3643 | 3649 |
(currentControl as ArrowTextControl).Base_TextBox.Focus(); |
3644 |
this.MainAngle.Visibility = Visibility.Visible;
|
|
3650 |
ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
|
|
3645 | 3651 |
|
3646 | 3652 |
//20180911 LJY |
3647 | 3653 |
(currentControl as ArrowTextControl).isTrans = true; |
KCOM/Views/TopMenu.xaml | ||
---|---|---|
25 | 25 |
</UserControl.Resources> |
26 | 26 |
<Grid> |
27 | 27 |
<telerik:RadRibbonView Title="KCOM" ApplicationName="세부 내용 입력란" TitleBarVisibility="Collapsed" VerticalAlignment="Top" telerik:StyleManager.Theme="Office2016" |
28 |
ApplicationButtonVisibility="Collapsed" BorderThickness="0.5" SelectedIndex="1" |
|
28 |
ApplicationButtonVisibility="Collapsed" BorderThickness="0.5" SelectedIndex="1" TitleBarBackground="#FF94A6CA"
|
|
29 | 29 |
x:Name="radRibbonView" MaxHeight="Infinity" IsApplicationMenuOpen="False" IsBackstageOpen="False" IsMinimizable="True" IsMinimized="False" |
30 | 30 |
QuickAccessToolBarPosition="AboveRibbon" MinimizeButtonVisibility="Visible"> |
31 | 31 |
<!--<telerik:RadRibbonView.QuickAccessToolBar> |
MarkupToPDF/Controls/Common/MathSet.cs | ||
---|---|---|
415 | 415 |
} |
416 | 416 |
} |
417 | 417 |
|
418 |
public static double returnAngle(Point start, ref Point end, bool PressShift) |
|
419 |
{ |
|
420 |
double angle = MathSet.getAngle(start.X, start.Y, end.X, end.Y); |
|
421 |
|
|
422 |
if (PressShift) |
|
423 |
{ |
|
424 |
double approxAngle = MathSet.getMultipleAngle(UnitAngle, angle); |
|
425 |
double distance = MathSet.DistanceTo(start, end); |
|
426 |
end = MathSet.RotateAbout(start, new Point(start.X + distance, start.Y), approxAngle); |
|
427 |
} |
|
428 |
|
|
429 |
angle *= -1; |
|
430 |
|
|
431 |
if (angle < 0) |
|
432 |
{ |
|
433 |
angle = angle + 360; |
|
434 |
} |
|
435 |
return angle; |
|
436 |
} |
|
437 |
|
|
418 | 438 |
public static Point getRectMiddlePoint(Rect data) |
419 | 439 |
{ |
420 | 440 |
Point startP = new Point(data.X, data.Y); |
MarkupToPDF/Controls/Line/ArcControl.cs | ||
---|---|---|
305 | 305 |
get { return (double)GetValue(AngleProperty); } |
306 | 306 |
set { SetValue(AngleProperty, value); } |
307 | 307 |
} |
308 |
public double Angle |
|
309 |
{ |
|
310 |
get { return (double)GetValue(AngleProperty); } |
|
311 |
set |
|
312 |
{ |
|
313 |
if (this.Angle != value) |
|
314 |
{ |
|
315 |
SetValue(AngleProperty, value); |
|
316 |
} |
|
317 |
} |
|
318 |
} |
|
308 |
|
|
309 |
|
|
310 |
// CommentUserInfo에서 상속받기때문에 제거. |
|
311 |
|
|
312 |
//public double Angle |
|
313 |
//{ |
|
314 |
// get { return (double)GetValue(AngleProperty); } |
|
315 |
// set |
|
316 |
// { |
|
317 |
// if (this.Angle != value) |
|
318 |
// { |
|
319 |
// SetValue(AngleProperty, value); |
|
320 |
// } |
|
321 |
// } |
|
322 |
//} |
|
323 |
|
|
319 | 324 |
public Point EndPoint |
320 | 325 |
{ |
321 | 326 |
get { return (Point)GetValue(EndPointProperty); } |
... | ... | |
536 | 541 |
this.EndPoint = pt; |
537 | 542 |
this.MidPoint = new Point(0, 0); |
538 | 543 |
|
544 |
Point tmp = this.EndPoint; |
|
545 |
Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true); |
|
546 |
|
|
539 | 547 |
if (bAxisLocked || bShiftKeyPressed) |
540 | 548 |
{ |
541 |
Point tmp = this.EndPoint; |
|
542 |
string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true); |
|
543 | 549 |
this.EndPoint = tmp; |
544 | 550 |
} |
545 | 551 |
|
MarkupToPDF/Controls/Line/ArrowArcControl.cs | ||
---|---|---|
304 | 304 |
get { return (double)GetValue(AngleProperty); } |
305 | 305 |
set { SetValue(AngleProperty, value); } |
306 | 306 |
} |
307 |
public double Angle |
|
308 |
{ |
|
309 |
get { return (double)GetValue(AngleProperty); } |
|
310 |
set |
|
311 |
{ |
|
312 |
if (this.Angle != value) |
|
313 |
{ |
|
314 |
SetValue(AngleProperty, value); |
|
315 |
} |
|
316 |
} |
|
317 |
} |
|
307 |
|
|
308 |
|
|
309 |
//public double Angle |
|
310 |
//{ |
|
311 |
// get { return (double)GetValue(AngleProperty); } |
|
312 |
// set |
|
313 |
// { |
|
314 |
// if (this.Angle != value) |
|
315 |
// { |
|
316 |
// SetValue(AngleProperty, value); |
|
317 |
// } |
|
318 |
// } |
|
319 |
//} |
|
320 |
|
|
318 | 321 |
public Point EndPoint |
319 | 322 |
{ |
320 | 323 |
get { return (Point)GetValue(EndPointProperty); } |
... | ... | |
480 | 483 |
this.isTransOn = false; |
481 | 484 |
this.MidPoint = new Point(0, 0); |
482 | 485 |
this.EndPoint = pt; |
486 |
|
|
487 |
Point tmp = this.EndPoint; |
|
488 |
Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true); |
|
489 |
|
|
483 | 490 |
if (bAxisLocked || bShiftKeyPressed) |
484 | 491 |
{ |
485 |
Point tmp = this.EndPoint; |
|
486 |
string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true); |
|
487 | 492 |
this.EndPoint = tmp; |
488 | 493 |
} |
489 | 494 |
|
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs | ||
---|---|---|
361 | 361 |
this.EndPoint = pt; |
362 | 362 |
if (this.MiddlePoint == new Point(0, 0)) |
363 | 363 |
{ |
364 |
Point tmp = this.EndPoint; |
|
365 |
Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true); |
|
366 |
|
|
364 | 367 |
if (bAxisLocked || bShiftKeyPressed) |
365 | 368 |
{ |
366 |
Point tmp = this.EndPoint; |
|
367 |
string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true); |
|
368 | 369 |
this.EndPoint = tmp; |
369 | 370 |
} |
370 | 371 |
} |
371 | 372 |
else |
372 | 373 |
{ |
374 |
Point tmp = this.EndPoint; |
|
375 |
Angle = MathSet.returnAngle(this.MiddlePoint, ref tmp, true); |
|
376 |
|
|
373 | 377 |
if (bAxisLocked || bShiftKeyPressed) |
374 | 378 |
{ |
375 |
Point tmp = this.EndPoint; |
|
376 |
string angle = MathSet.returnAngleString(this.MiddlePoint, ref tmp, true); |
|
379 |
|
|
377 | 380 |
this.EndPoint = tmp; |
378 | 381 |
} |
379 | 382 |
} |
MarkupToPDF/Controls/Line/LineControl.cs | ||
---|---|---|
318 | 318 |
get { return (double)GetValue(AngleProperty); } |
319 | 319 |
set { SetValue(AngleProperty, value); } |
320 | 320 |
} |
321 |
public double Angle |
|
322 |
{ |
|
323 |
get { return (double)GetValue(AngleProperty); } |
|
324 |
set |
|
325 |
{ |
|
326 |
if (this.Angle != value) |
|
327 |
{ |
|
328 |
SetValue(AngleProperty, value); |
|
329 |
} |
|
330 |
} |
|
331 |
} |
|
321 |
//public double Angle
|
|
322 |
//{
|
|
323 |
// get { return (double)GetValue(AngleProperty); }
|
|
324 |
// set
|
|
325 |
// {
|
|
326 |
// if (this.Angle != value)
|
|
327 |
// {
|
|
328 |
// SetValue(AngleProperty, value);
|
|
329 |
// }
|
|
330 |
// }
|
|
331 |
//}
|
|
332 | 332 |
public Point EndPoint |
333 | 333 |
{ |
334 | 334 |
get { return (Point)GetValue(EndPointProperty); } |
... | ... | |
507 | 507 |
this.LineStyleSet = LineStyleSet.SingleLine; |
508 | 508 |
|
509 | 509 |
this.EndPoint = pt; |
510 |
|
|
510 |
|
|
511 |
Point tmp = this.EndPoint; |
|
512 |
Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true); |
|
513 |
|
|
511 | 514 |
if (bAxisLocked || bShiftKeyPressed) |
512 | 515 |
{ |
513 |
Point tmp = this.EndPoint; |
|
514 |
string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true); |
|
515 | 516 |
this.EndPoint = tmp; |
516 | 517 |
} |
517 | 518 |
|
MarkupToPDF/Controls/Polygon/CloudControl.cs | ||
---|---|---|
447 | 447 |
get { return _fill; } |
448 | 448 |
set { _fill = value; } |
449 | 449 |
} |
450 |
public double Angle |
|
451 |
{ |
|
452 |
get { return (double)GetValue(AngleProperty); } |
|
453 |
set |
|
454 |
{ |
|
455 |
if (this.Angle != value) |
|
456 |
{ |
|
457 |
SetValue(AngleProperty, value); |
|
458 |
OnPropertyChanged("Angle"); |
|
459 |
} |
|
460 |
} |
|
461 |
} |
|
450 |
//public double Angle
|
|
451 |
//{
|
|
452 |
// get { return (double)GetValue(AngleProperty); }
|
|
453 |
// set
|
|
454 |
// {
|
|
455 |
// if (this.Angle != value)
|
|
456 |
// {
|
|
457 |
// SetValue(AngleProperty, value);
|
|
458 |
// OnPropertyChanged("Angle");
|
|
459 |
// }
|
|
460 |
// }
|
|
461 |
//}
|
|
462 | 462 |
public StylusPointSet PointC |
463 | 463 |
{ |
464 | 464 |
get { return (StylusPointSet)GetValue(StylusPointSetProperty); } |
... | ... | |
824 | 824 |
this.PointSet.RemoveAt(this.PointSet.Count - 1); |
825 | 825 |
|
826 | 826 |
Point tmp = pt; |
827 |
|
|
827 | 828 |
if (bAxisLocked || bShiftKeyPressed) |
828 | 829 |
{ |
829 |
string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true);
|
|
830 |
Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true);
|
|
830 | 831 |
} |
832 |
|
|
831 | 833 |
this.PointSet.Add(tmp); |
832 | 834 |
|
833 | 835 |
this.SetCloud(); |
MarkupToPDF/Controls/Polygon/PolygonControl.cs | ||
---|---|---|
384 | 384 |
} |
385 | 385 |
} |
386 | 386 |
|
387 |
public double Angle |
|
388 |
{ |
|
389 |
get { return (double)GetValue(AngleProperty); } |
|
390 |
set |
|
391 |
{ |
|
392 |
if (this.Angle != value) |
|
393 |
{ |
|
394 |
SetValue(AngleProperty, value); |
|
395 |
OnPropertyChanged("Angle"); |
|
396 |
} |
|
397 |
} |
|
398 |
} |
|
387 |
//public double Angle
|
|
388 |
//{
|
|
389 |
// get { return (double)GetValue(AngleProperty); }
|
|
390 |
// set
|
|
391 |
// {
|
|
392 |
// if (this.Angle != value)
|
|
393 |
// {
|
|
394 |
// SetValue(AngleProperty, value);
|
|
395 |
// OnPropertyChanged("Angle");
|
|
396 |
// }
|
|
397 |
// }
|
|
398 |
//}
|
|
399 | 399 |
|
400 | 400 |
public Point EndPoint |
401 | 401 |
{ |
... | ... | |
493 | 493 |
this.PointSet.RemoveAt(this.PointSet.Count - 1); |
494 | 494 |
|
495 | 495 |
Point tmp = pt; |
496 |
|
|
496 | 497 |
if (bAxisLocked || bShiftKeyPressed) |
497 | 498 |
{ |
498 |
string angle = MathSet.returnAngleString(this.PointSet[this.PointSet.Count - 1], ref tmp, true);
|
|
499 |
Angle = MathSet.returnAngle(this.PointSet[this.PointSet.Count - 1], ref tmp, true);
|
|
499 | 500 |
} |
501 |
|
|
500 | 502 |
this.PointSet.Add(tmp); |
501 | 503 |
|
502 | 504 |
this.UpdateControl(); |
MarkupToPDF/Controls/Text/ArrowTextControl.cs | ||
---|---|---|
358 | 358 |
} |
359 | 359 |
|
360 | 360 |
|
361 |
public double Angle |
|
362 |
{ |
|
363 |
get { return (double)GetValue(AngleProperty); } |
|
364 |
set { SetValue(AngleProperty, value); } |
|
365 |
} |
|
361 |
//public double Angle
|
|
362 |
//{
|
|
363 |
// get { return (double)GetValue(AngleProperty); }
|
|
364 |
// set { SetValue(AngleProperty, value); }
|
|
365 |
//}
|
|
366 | 366 |
|
367 | 367 |
public Thickness BorderSize |
368 | 368 |
{ |
... | ... | |
1605 | 1605 |
{ |
1606 | 1606 |
this.EndPoint = pt; |
1607 | 1607 |
|
1608 |
Point tempPoint = this.EndPoint; |
|
1609 |
Angle = MathSet.returnAngle(this.StartPoint, ref tempPoint, true); |
|
1610 |
|
|
1608 | 1611 |
if (bAxisLocked || bShiftKeyPressed) |
1609 | 1612 |
{ |
1610 |
Point tempPoint = this.EndPoint; |
|
1611 |
string angle = MathSet.returnAngleString(this.StartPoint, ref tempPoint, true); |
|
1612 | 1613 |
this.EndPoint = tempPoint; |
1613 | 1614 |
} |
1614 | 1615 |
|
내보내기 Unified diff