개정판 b74a9c91
macro기능 추가
Change-Id: I6e80960cf3ebf71f316f9d18cd890e90c827c40b
ConvertService/ServiceBase/ErrorNotice/ErrorNotice.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace ErrorNotice |
|
8 |
{ |
|
9 |
public class ErrorNotice : Markus.Service.Convert.Plugin.IPlugin |
|
10 |
{ |
|
11 |
public string Name => throw new NotImplementedException(); |
|
12 |
|
|
13 |
public string Exception { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } |
|
14 |
|
|
15 |
public bool Do(string ConvertID, Dictionary<string, object> Parameters) |
|
16 |
{ |
|
17 |
|
|
18 |
} |
|
19 |
} |
|
20 |
} |
ConvertService/ServiceBase/ErrorNotice/ErrorNotice.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}</ProjectGuid> |
|
8 |
<OutputType>Library</OutputType> |
|
9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
10 |
<RootNamespace>ErrorNotice</RootNamespace> |
|
11 |
<AssemblyName>ErrorNotice</AssemblyName> |
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
|
13 |
<FileAlignment>512</FileAlignment> |
|
14 |
<Deterministic>true</Deterministic> |
|
15 |
</PropertyGroup> |
|
16 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
17 |
<DebugSymbols>true</DebugSymbols> |
|
18 |
<DebugType>full</DebugType> |
|
19 |
<Optimize>false</Optimize> |
|
20 |
<OutputPath>bin\Debug\</OutputPath> |
|
21 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
22 |
<ErrorReport>prompt</ErrorReport> |
|
23 |
<WarningLevel>4</WarningLevel> |
|
24 |
</PropertyGroup> |
|
25 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
26 |
<DebugType>pdbonly</DebugType> |
|
27 |
<Optimize>true</Optimize> |
|
28 |
<OutputPath>bin\Release\</OutputPath> |
|
29 |
<DefineConstants>TRACE</DefineConstants> |
|
30 |
<ErrorReport>prompt</ErrorReport> |
|
31 |
<WarningLevel>4</WarningLevel> |
|
32 |
</PropertyGroup> |
|
33 |
<ItemGroup> |
|
34 |
<Reference Include="System" /> |
|
35 |
<Reference Include="System.Core" /> |
|
36 |
<Reference Include="System.Xml.Linq" /> |
|
37 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
38 |
<Reference Include="Microsoft.CSharp" /> |
|
39 |
<Reference Include="System.Data" /> |
|
40 |
<Reference Include="System.Net.Http" /> |
|
41 |
<Reference Include="System.Xml" /> |
|
42 |
</ItemGroup> |
|
43 |
<ItemGroup> |
|
44 |
<Compile Include="ErrorNotice.cs" /> |
|
45 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
46 |
</ItemGroup> |
|
47 |
<ItemGroup> |
|
48 |
<ProjectReference Include="..\Markus.Service.Convert.IPlugin\Markus.Service.Convert.IPlugin.csproj"> |
|
49 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
|
50 |
<Name>Markus.Service.Convert.IPlugin</Name> |
|
51 |
</ProjectReference> |
|
52 |
<ProjectReference Include="..\Markus.Service.DataBase\Markus.Service.DataBase.csproj"> |
|
53 |
<Project>{400736fb-92c9-4bc0-b447-e8274103d813}</Project> |
|
54 |
<Name>Markus.Service.DataBase</Name> |
|
55 |
</ProjectReference> |
|
56 |
</ItemGroup> |
|
57 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
58 |
</Project> |
ConvertService/ServiceBase/ErrorNotice/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("ErrorNotice")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("ErrorNotice")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2020")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("270d92ef-abaf-4524-b851-f8bb80ebf2bf")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 |
|
33 |
// 기본값으로 할 수 있습니다. |
|
34 |
// [assembly: AssemblyVersion("1.0.*")] |
|
35 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
36 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
ConvertService/ServiceBase/ServiceBase.sln | ||
---|---|---|
118 | 118 |
{2F7115C0-6414-46DB-B2E5-C941099B7737} = {2F7115C0-6414-46DB-B2E5-C941099B7737} |
119 | 119 |
EndProjectSection |
120 | 120 |
EndProject |
121 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ErrorNotice", "ErrorNotice\ErrorNotice.csproj", "{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}" |
|
122 |
EndProject |
|
121 | 123 |
Global |
122 | 124 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
123 | 125 |
Debug|Any CPU = Debug|Any CPU |
... | ... | |
422 | 424 |
{44A14CE4-40B2-4EA4-9F49-9666D05EF08D}.Release|x64.Build.0 = Release|Any CPU |
423 | 425 |
{44A14CE4-40B2-4EA4-9F49-9666D05EF08D}.Release|x86.ActiveCfg = Release|Any CPU |
424 | 426 |
{44A14CE4-40B2-4EA4-9F49-9666D05EF08D}.Release|x86.Build.0 = Release|Any CPU |
427 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
428 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
429 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
430 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Debug|x64.Build.0 = Debug|Any CPU |
|
431 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
432 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Debug|x86.Build.0 = Debug|Any CPU |
|
433 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
434 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Release|Any CPU.Build.0 = Release|Any CPU |
|
435 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Release|x64.ActiveCfg = Release|Any CPU |
|
436 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Release|x64.Build.0 = Release|Any CPU |
|
437 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Release|x86.ActiveCfg = Release|Any CPU |
|
438 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF}.Release|x86.Build.0 = Release|Any CPU |
|
425 | 439 |
EndGlobalSection |
426 | 440 |
GlobalSection(SolutionProperties) = preSolution |
427 | 441 |
HideSolutionNode = FALSE |
... | ... | |
433 | 447 |
{F344E7AE-B16E-4736-9816-4BE415418F58} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
434 | 448 |
{2F7115C0-6414-46DB-B2E5-C941099B7737} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
435 | 449 |
{44A14CE4-40B2-4EA4-9F49-9666D05EF08D} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
450 |
{270D92EF-ABAF-4524-B851-F8BB80EBF2BF} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08} |
|
436 | 451 |
EndGlobalSection |
437 | 452 |
GlobalSection(ExtensibilityGlobals) = postSolution |
438 | 453 |
SolutionGuid = {CA1BB1E8-1969-4435-A889-37F359B6EAAE} |
KCOM/App.xaml | ||
---|---|---|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:local="clr-namespace:KCOM" |
5 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="KCOM.App" |
|
5 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
|
6 |
|
|
7 |
x:Class="KCOM.App" |
|
6 | 8 |
StartupUri="MainWindow.xaml"> |
7 | 9 |
<Application.Resources> |
8 | 10 |
<ResourceDictionary> |
KCOM/Common/MacroItem.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace KCOM.Common |
|
8 |
{ |
|
9 |
public class MacroItem |
|
10 |
{ |
|
11 |
public bool IsCurrent { get; set; } |
|
12 |
|
|
13 |
public bool IsDraw { get; set; } |
|
14 |
|
|
15 |
public int Index { get; set; } |
|
16 |
|
|
17 |
public string Desc { get; set; } |
|
18 |
|
|
19 |
public MarkupToPDF.Controls.Common.ControlType ControlType { get; set; } |
|
20 |
} |
|
21 |
} |
KCOM/Common/MenuItem.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace KCOM.Common |
|
8 |
{ |
|
9 |
public class MarkupMenuItem |
|
10 |
{ |
|
11 |
public string Name { get; set; } |
|
12 |
|
|
13 |
public Uri Icon { get; set; } |
|
14 |
|
|
15 |
public string Tooltip { get; set; } |
|
16 |
|
|
17 |
public string GroupName { get; set; } |
|
18 |
} |
|
19 |
} |
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
318 | 318 |
} |
319 | 319 |
} |
320 | 320 |
|
321 |
private List<KCOM.Common.MacroItem> _MacroItems; |
|
322 |
|
|
323 |
public List<KCOM.Common.MacroItem> MacroItems |
|
324 |
{ |
|
325 |
get |
|
326 |
{ |
|
327 |
return _MacroItems; |
|
328 |
} |
|
329 |
|
|
330 |
set |
|
331 |
{ |
|
332 |
_MacroItems = value; |
|
333 |
} |
|
334 |
} |
|
335 |
|
|
336 |
private int _MacroCommandIndex; |
|
337 |
|
|
338 |
public int MacroCommandIndex |
|
339 |
{ |
|
340 |
get |
|
341 |
{ |
|
342 |
return _MacroCommandIndex; |
|
343 |
} |
|
344 |
|
|
345 |
set |
|
346 |
{ |
|
347 |
_MacroCommandIndex = value; |
|
348 |
} |
|
349 |
} |
|
350 |
|
|
351 |
private bool _IsMacroCommand; |
|
352 |
|
|
353 |
public bool IsMacroCommand |
|
354 |
{ |
|
355 |
get |
|
356 |
{ |
|
357 |
return _IsMacroCommand; |
|
358 |
} |
|
359 |
|
|
360 |
set |
|
361 |
{ |
|
362 |
_IsMacroCommand = value; |
|
363 |
} |
|
364 |
} |
|
321 | 365 |
|
322 | 366 |
/// <summary> |
323 | 367 |
/// 현재 상단 메뉴의 선 굵기값 |
KCOM/Controls/MacroEdit.xaml | ||
---|---|---|
1 |
<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="KCOM.Controls.MacroEdit" |
|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
4 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
5 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
6 |
xmlns:local="clr-namespace:KCOM.Controls" |
|
7 |
mc:Ignorable="d" Background="White" |
|
8 |
d:DesignHeight="450" d:DesignWidth="800"> |
|
9 |
<Grid> |
|
10 |
<Grid.RowDefinitions> |
|
11 |
<RowDefinition Height="Auto"/> |
|
12 |
<RowDefinition/> |
|
13 |
<RowDefinition Height="Auto"/> |
|
14 |
</Grid.RowDefinitions> |
|
15 |
<Grid.ColumnDefinitions> |
|
16 |
<ColumnDefinition/> |
|
17 |
<ColumnDefinition/> |
|
18 |
</Grid.ColumnDefinitions> |
|
19 |
<StackPanel> |
|
20 |
<TextBlock Text="Macro Select : "/> |
|
21 |
<telerik:RadComboBox x:Name="cboMacro"/> |
|
22 |
</StackPanel> |
|
23 |
</Grid> |
|
24 |
</UserControl> |
KCOM/Controls/MacroEdit.xaml.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
using System.Windows; |
|
7 |
using System.Windows.Controls; |
|
8 |
using System.Windows.Data; |
|
9 |
using System.Windows.Documents; |
|
10 |
using System.Windows.Input; |
|
11 |
using System.Windows.Media; |
|
12 |
using System.Windows.Media.Imaging; |
|
13 |
using System.Windows.Navigation; |
|
14 |
using System.Windows.Shapes; |
|
15 |
|
|
16 |
namespace KCOM.Controls |
|
17 |
{ |
|
18 |
/// <summary> |
|
19 |
/// MacroEdit.xaml에 대한 상호 작용 논리 |
|
20 |
/// </summary> |
|
21 |
public partial class MacroEdit : UserControl |
|
22 |
{ |
|
23 |
public MacroEdit() |
|
24 |
{ |
|
25 |
InitializeComponent(); |
|
26 |
} |
|
27 |
} |
|
28 |
} |
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
193 | 193 |
ViewerDataModel.Instance.Capture_Opacity = 0; |
194 | 194 |
} |
195 | 195 |
|
196 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch") |
|
196 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch" |
|
197 |
|| Common.ViewerDataModel.Instance.SelectedControl == "MACRO") |
|
197 | 198 |
{ |
198 | 199 |
this.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None; |
199 | 200 |
this.dzMainMenu.txtBatch.Visibility = Visibility.Collapsed; |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
1817 | 1817 |
|
1818 | 1818 |
if (instanceToggle.IsChecked != false) |
1819 | 1819 |
{ |
1820 |
string param = instanceToggle.CommandParameter.ToString(); |
|
1821 |
string MacroIndex = ""; |
|
1822 |
|
|
1823 |
if (param.StartsWith("MACRO")) |
|
1824 |
{ |
|
1825 |
param = "MACRO"; |
|
1826 |
MacroIndex = param.Replace("MACRO;",""); |
|
1827 |
|
|
1828 |
//Common.ViewerDataModel.Instance.MacroItems = MacroHelper.LoadMacroItems(MacroIndex); |
|
1829 |
//var items = MacroHelper.TopMenuItems(); |
|
1830 |
|
|
1831 |
Common.ViewerDataModel.Instance.MacroItems = new List<MacroItem> |
|
1832 |
{ |
|
1833 |
new MacroItem |
|
1834 |
{ |
|
1835 |
Desc = "Cloud Rectangle", |
|
1836 |
ControlType = MarkupToPDF.Controls.Common.ControlType.RectCloud |
|
1837 |
}, |
|
1838 |
new MacroItem |
|
1839 |
{ |
|
1840 |
Desc = "Arrow TextBox", |
|
1841 |
ControlType = MarkupToPDF.Controls.Common.ControlType.ArrowTextBorderControl |
|
1842 |
} |
|
1843 |
}; |
|
1844 |
} |
|
1845 |
|
|
1820 | 1846 |
#region 컨트롤이 체크되었다면 |
1821 |
switch (instanceToggle.CommandParameter.ToString())
|
|
1847 |
switch (param)
|
|
1822 | 1848 |
{ |
1823 | 1849 |
#region Line |
1824 | 1850 |
case "Line": |
... | ... | |
2112 | 2138 |
instanceMain.dzMainMenu.txtBatch.Text = "Place Mark"; |
2113 | 2139 |
break; |
2114 | 2140 |
#endregion |
2141 |
|
|
2142 |
#region MACRO -MACRO1 |
|
2143 |
case "MACRO": |
|
2144 |
Common.ViewerDataModel.Instance.SelectedControl = "MACRO"; |
|
2145 |
Common.ViewerDataModel.Instance.ControlTag = instanceMain.dzMainMenu._ViewInfo.UserID; //사번 |
|
2146 |
|
|
2147 |
MacroHelper.MacroAction(); |
|
2148 |
|
|
2149 |
break; |
|
2150 |
#endregion |
|
2151 |
|
|
2115 | 2152 |
#region Copy |
2116 | 2153 |
case "Copy": |
2117 | 2154 |
Copy_Start(); |
KCOM/Extensions/MacroHelper.cs | ||
---|---|---|
1 |
using KCOM.Common; |
|
2 |
using MarkupToPDF.Controls.Text; |
|
3 |
using System; |
|
4 |
using System.Collections.Generic; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
using System.Windows.Controls; |
|
9 |
using System.Windows.Controls.Primitives; |
|
10 |
using Telerik.Windows.Controls; |
|
11 |
|
|
12 |
namespace KCOM |
|
13 |
{ |
|
14 |
public static class MacroHelper |
|
15 |
{ |
|
16 |
private static List<MarkupToPDF.Controls.Common.ControlType> TextControlType = new List<MarkupToPDF.Controls.Common.ControlType> |
|
17 |
{ |
|
18 |
MarkupToPDF.Controls.Common.ControlType.TextBorder, |
|
19 |
MarkupToPDF.Controls.Common.ControlType.TextCloud, |
|
20 |
MarkupToPDF.Controls.Common.ControlType.TextControl, |
|
21 |
MarkupToPDF.Controls.Common.ControlType.ArrowTextBorderControl, |
|
22 |
MarkupToPDF.Controls.Common.ControlType.ArrowTextCloudControl, |
|
23 |
MarkupToPDF.Controls.Common.ControlType.ArrowTextControl, |
|
24 |
MarkupToPDF.Controls.Common.ControlType.ArrowTransTextBorderControl, |
|
25 |
MarkupToPDF.Controls.Common.ControlType.ArrowTransTextCloudControl, |
|
26 |
MarkupToPDF.Controls.Common.ControlType.ArrowTransTextControl, |
|
27 |
}; |
|
28 |
|
|
29 |
/// <summary> |
|
30 |
/// 버튼에 따른 macro 로드 |
|
31 |
/// </summary> |
|
32 |
/// <param name="Key">버튼의 key</param> |
|
33 |
/// <returns></returns> |
|
34 |
public static List<MacroItem> LoadMacroItems(string Key) |
|
35 |
{ |
|
36 |
List<MacroItem> result = new List<MacroItem>(); |
|
37 |
|
|
38 |
string items = CommonLib.Common.GetConfigString("MACRO", Key, ""); |
|
39 |
|
|
40 |
if(!string.IsNullOrWhiteSpace(items)) |
|
41 |
{ |
|
42 |
var controlTypes = items.Split(';'); |
|
43 |
|
|
44 |
for (int i = 0; i < controlTypes.Count(); i++) |
|
45 |
{ |
|
46 |
result.Add(new MacroItem |
|
47 |
{ |
|
48 |
IsCurrent = false, |
|
49 |
Index = i, |
|
50 |
ControlType = (MarkupToPDF.Controls.Common.ControlType)Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), controlTypes[i]) |
|
51 |
}); |
|
52 |
} |
|
53 |
} |
|
54 |
|
|
55 |
return result; |
|
56 |
} |
|
57 |
|
|
58 |
public static void MacroAction() |
|
59 |
{ |
|
60 |
var menu = ViewerDataModel.Instance.SystemMain.dzMainMenu; |
|
61 |
|
|
62 |
var currentItem = Common.ViewerDataModel.Instance.MacroItems.Find(x => x.IsCurrent); |
|
63 |
|
|
64 |
if(currentItem != null) |
|
65 |
{ |
|
66 |
if (TextControlType.Contains(currentItem.ControlType)) |
|
67 |
{ |
|
68 |
var arrowtext_item = ViewerDataModel.Instance.MarkupControls_USER.Where(data => (data as ArrowTextControl) != null && (data as ArrowTextControl).IsEditingMode == true).FirstOrDefault(); |
|
69 |
|
|
70 |
var text_item = ViewerDataModel.Instance.MarkupControls_USER.Where(data => (data as TextControl) != null && (data as TextControl).IsEditingMode == true).FirstOrDefault(); |
|
71 |
|
|
72 |
if (arrowtext_item != null || text_item != null) |
|
73 |
{ |
|
74 |
System.Diagnostics.Debug.WriteLine("MacroAction return = Text Control Edit Mode"); |
|
75 |
return; |
|
76 |
} |
|
77 |
} |
|
78 |
} |
|
79 |
|
|
80 |
Common.ViewerDataModel.Instance.MacroItems.ForEach(x =>x.IsCurrent = false); |
|
81 |
|
|
82 |
if (Common.ViewerDataModel.Instance.MacroCommandIndex < Common.ViewerDataModel.Instance.MacroItems.Count) |
|
83 |
{ |
|
84 |
Common.ViewerDataModel.Instance.IsMacroCommand = true; |
|
85 |
|
|
86 |
var item = Common.ViewerDataModel.Instance.MacroItems[Common.ViewerDataModel.Instance.MacroCommandIndex]; |
|
87 |
|
|
88 |
item.IsCurrent = true; |
|
89 |
item.IsDraw = true; |
|
90 |
menu.controlType = item.ControlType; |
|
91 |
menu.txtBatch.Visibility = System.Windows.Visibility.Visible; |
|
92 |
menu.txtBatch.Text = $"Draw a {item.Desc}"; |
|
93 |
|
|
94 |
Common.ViewerDataModel.Instance.MacroCommandIndex++; |
|
95 |
} |
|
96 |
else |
|
97 |
{ |
|
98 |
Common.ViewerDataModel.Instance.IsMacroCommand = false; |
|
99 |
Common.ViewerDataModel.Instance.MacroCommandIndex = 0; |
|
100 |
Common.ViewerDataModel.Instance.MacroItems.ForEach(x => |
|
101 |
{ |
|
102 |
x.IsCurrent = false; |
|
103 |
x.IsDraw = false; |
|
104 |
}); |
|
105 |
|
|
106 |
menu.controlType = MarkupToPDF.Controls.Common.ControlType.None; |
|
107 |
menu.txtBatch.Visibility = System.Windows.Visibility.Collapsed; |
|
108 |
menu.mouseHandlingMode = IKCOM.MouseHandlingMode.None; |
|
109 |
var TogList = menu.Parent.ChildrenOfType<Telerik.Windows.Controls.RadToggleButton>(); |
|
110 |
|
|
111 |
foreach (var tog in TogList) |
|
112 |
{ |
|
113 |
tog.IsChecked = false; |
|
114 |
} |
|
115 |
} |
|
116 |
|
|
117 |
} |
|
118 |
|
|
119 |
public static List<MarkupMenuItem> TopMenuItems() |
|
120 |
{ |
|
121 |
List<MarkupMenuItem> result = new List<MarkupMenuItem>(); |
|
122 |
|
|
123 |
var menu = ViewerDataModel.Instance.SystemMain.dzTopMenu; |
|
124 |
|
|
125 |
result.AddRange(ItemCollectionToMenuItem(menu.LineControlGroup.Items,"Line")); |
|
126 |
result.AddRange(ItemCollectionToMenuItem(menu.ShapeControlGroup.Items, "Shape")); |
|
127 |
result.AddRange(ItemCollectionToMenuItem(menu.TextControlGroup.Items, "Text")); |
|
128 |
result.AddRange(ItemCollectionToMenuItem(menu.PenControlGroup.Items, "Pen")); |
|
129 |
result.AddRange(ItemCollectionToMenuItem(menu.AppStampControlGroup.Items, "Approval Stamp")); |
|
130 |
|
|
131 |
return result; |
|
132 |
} |
|
133 |
|
|
134 |
private static IEnumerable<MarkupMenuItem> ItemCollectionToMenuItem(ItemCollection collection,string GroupName) |
|
135 |
{ |
|
136 |
foreach (var item in collection) |
|
137 |
{ |
|
138 |
foreach (var control in (item as System.Windows.DependencyObject).FindAllChildren(c => c is ButtonBase)) |
|
139 |
{ |
|
140 |
Uri iconUri = null; |
|
141 |
|
|
142 |
if ((control as ButtonBase).CommandParameter != null) |
|
143 |
{ |
|
144 |
if ((control as ButtonBase).Content is Image) |
|
145 |
{ |
|
146 |
var uri = (((control as ButtonBase).Content as Image).Source as System.Windows.Markup.IUriContext); |
|
147 |
|
|
148 |
if (uri != null) |
|
149 |
{ |
|
150 |
iconUri = new Uri(uri.ToString()); |
|
151 |
} |
|
152 |
} |
|
153 |
|
|
154 |
yield return new MarkupMenuItem |
|
155 |
{ |
|
156 |
GroupName = GroupName, |
|
157 |
Name = (control as ButtonBase).CommandParameter?.ToString(), |
|
158 |
Tooltip = (control as ButtonBase).CommandParameter?.ToString(), |
|
159 |
Icon = iconUri |
|
160 |
}; |
|
161 |
} |
|
162 |
else |
|
163 |
{ |
|
164 |
|
|
165 |
} |
|
166 |
} |
|
167 |
} |
|
168 |
} |
|
169 |
|
|
170 |
} |
|
171 |
} |
KCOM/Extensions/VisualHelper.cs | ||
---|---|---|
76 | 76 |
|
77 | 77 |
return result; |
78 | 78 |
} |
79 |
|
|
80 |
public static IEnumerable<DependencyObject> FindAllChildren(this DependencyObject dpo, Predicate<DependencyObject> predicate) |
|
81 |
{ |
|
82 |
//var results = new List<DependencyObject>(); |
|
83 |
//if (predicate == null) |
|
84 |
// yield return results; |
|
85 |
|
|
86 |
|
|
87 |
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dpo); i++) |
|
88 |
{ |
|
89 |
var child = VisualTreeHelper.GetChild(dpo, i); |
|
90 |
if (predicate(child)) |
|
91 |
yield return child;// results.Add(child); |
|
92 |
|
|
93 |
var subChildren = child.FindAllChildren(predicate); |
|
94 |
foreach (var item in subChildren) |
|
95 |
{ |
|
96 |
yield return item; |
|
97 |
} |
|
98 |
|
|
99 |
//results.AddRange(subChildren); |
|
100 |
} |
|
101 |
} |
|
79 | 102 |
} |
80 | 103 |
|
81 | 104 |
public class MoveDirection |
KCOM/KCOM.csproj | ||
---|---|---|
501 | 501 |
<Compile Include="Common\ImageAsyncHelper.cs" /> |
502 | 502 |
<Compile Include="Common\ImageSourceHelper.cs" /> |
503 | 503 |
<Compile Include="Common\ISplashMessage.cs" /> |
504 |
<Compile Include="Common\MacroItem.cs" /> |
|
504 | 505 |
<Compile Include="Common\MarkupUserInfo.cs" /> |
505 | 506 |
<Compile Include="Common\MathHelper.cs" /> |
507 |
<Compile Include="Common\MenuItem.cs" /> |
|
506 | 508 |
<Compile Include="Common\MouseInputBase.cs" /> |
507 | 509 |
<Compile Include="Controls\CustomWindow.cs" /> |
510 |
<Compile Include="Controls\MacroEdit.xaml.cs"> |
|
511 |
<DependentUpon>MacroEdit.xaml</DependentUpon> |
|
512 |
</Compile> |
|
508 | 513 |
<Compile Include="Controls\PasswordBoxUtilities.cs" /> |
509 | 514 |
<Compile Include="Extensions\DownloadProcess.cs" /> |
510 | 515 |
<Compile Include="Extensions\LinqExtension.cs" /> |
516 |
<Compile Include="Extensions\MacroHelper.cs" /> |
|
511 | 517 |
<Compile Include="PageManager\PageItem.cs" /> |
512 | 518 |
<Compile Include="PageManager\PageLoadCompletedEventArgs.cs" /> |
513 | 519 |
<Compile Include="PageManager\PageStorage.cs" /> |
... | ... | |
651 | 657 |
<Generator>MSBuild:Compile</Generator> |
652 | 658 |
<SubType>Designer</SubType> |
653 | 659 |
</Page> |
660 |
<Page Include="Controls\MacroEdit.xaml"> |
|
661 |
<SubType>Designer</SubType> |
|
662 |
<Generator>MSBuild:Compile</Generator> |
|
663 |
</Page> |
|
654 | 664 |
<Page Include="Controls\Panorama.xaml"> |
655 | 665 |
<SubType>Designer</SubType> |
656 | 666 |
<Generator>MSBuild:Compile</Generator> |
... | ... | |
1365 | 1375 |
<ItemGroup> |
1366 | 1376 |
<None Include="Connected Services\ServiceDeepView\ServiceDeepView.disco" /> |
1367 | 1377 |
</ItemGroup> |
1378 |
<ItemGroup> |
|
1379 |
<Resource Include="Resources\Images\MenuImage_New\cloudRectArrowText.png" /> |
|
1380 |
</ItemGroup> |
|
1368 | 1381 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
1369 | 1382 |
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
1370 | 1383 |
<PropertyGroup> |
KCOM/KCOM.csproj.user | ||
---|---|---|
3 | 3 |
<PropertyGroup> |
4 | 4 |
<ReferencePath> |
5 | 5 |
</ReferencePath> |
6 |
<ProjectView>ProjectFiles</ProjectView>
|
|
6 |
<ProjectView>ShowAllFiles</ProjectView>
|
|
7 | 7 |
<PublishUrlHistory>publish\</PublishUrlHistory> |
8 | 8 |
<InstallUrlHistory /> |
9 | 9 |
<SupportUrlHistory /> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
1664 | 1664 |
|
1665 | 1665 |
private void zoomAndPanControl_MouseMove(object sender, MouseEventArgs e) |
1666 | 1666 |
{ |
1667 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch") |
|
1667 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch" |
|
1668 |
|| Common.ViewerDataModel.Instance.SelectedControl == "MACRO") |
|
1669 |
//if(this.txtBatch.Visibility == Visibility.Visible) |
|
1668 | 1670 |
{ |
1669 | 1671 |
if (!floatingTip.IsOpen) { floatingTip.IsOpen = true; } |
1670 | 1672 |
|
... | ... | |
3742 | 3744 |
currentControl = null; |
3743 | 3745 |
|
3744 | 3746 |
if (Common.ViewerDataModel.Instance.SelectedControl == "Batch") |
3745 |
{ |
|
3747 |
{
|
|
3746 | 3748 |
controlType = ControlType.None; |
3747 | 3749 |
IsSwingMode = false; |
3748 | 3750 |
Common.ViewerDataModel.Instance.SelectedControl = ""; |
... | ... | |
3888 | 3890 |
} |
3889 | 3891 |
|
3890 | 3892 |
CreateCommand.Instance.Execute(currentControl); |
3891 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
|
3893 |
try |
|
3894 |
{ |
|
3895 |
ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl); |
|
3896 |
} |
|
3897 |
catch (Exception ex) |
|
3898 |
{ |
|
3899 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
|
3900 |
} |
|
3892 | 3901 |
|
3893 | 3902 |
(currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false; |
3894 | 3903 |
(currentControl as ArrowTextControl).EnableEditing = false; |
... | ... | |
4407 | 4416 |
break; |
4408 | 4417 |
} |
4409 | 4418 |
|
4419 |
|
|
4410 | 4420 |
if (currentControl is ArrowTextControl) |
4411 | 4421 |
{ |
4412 | 4422 |
(currentControl as ArrowTextControl).EditEnded += (snd, evt) => |
... | ... | |
4420 | 4430 |
}; |
4421 | 4431 |
|
4422 | 4432 |
} |
4433 |
|
|
4434 |
if (Common.ViewerDataModel.Instance.IsMacroCommand) |
|
4435 |
{ |
|
4436 |
if (currentControl == null && mouseHandlingMode == MouseHandlingMode.Drawing) |
|
4437 |
{ |
|
4438 |
MacroHelper.MacroAction(); |
|
4439 |
} |
|
4440 |
//if (currentControl.ControlType) |
|
4441 |
//txtBatch.Text = "Draw a TextBox"; |
|
4442 |
//controlType = ControlType.ArrowTextBorderControl; |
|
4443 |
} |
|
4444 |
|
|
4423 | 4445 |
//if (currentControl != null) |
4424 | 4446 |
//{ |
4425 | 4447 |
// currentControl.PageAngle = pageNavigator.CurrentPage.Angle; |
... | ... | |
4427 | 4449 |
} |
4428 | 4450 |
if (mouseHandlingMode != MouseHandlingMode.None && e.LeftButton == MouseButtonState.Pressed) |
4429 | 4451 |
{ |
4452 |
// MACRO 버튼클릭하여 CLOUD RECT 그린 후 |
|
4453 |
|
|
4454 |
|
|
4430 | 4455 |
if (mouseHandlingMode == MouseHandlingMode.Adorner && SelectLayer.Children.Count > 0) |
4431 | 4456 |
{ |
4432 | 4457 |
bool mouseOff = false; |
KCOM/Views/TopMenu.xaml | ||
---|---|---|
254 | 254 |
</telerik:RadCollapsiblePanel> |
255 | 255 |
</telerik:RadRibbonGroup> |
256 | 256 |
|
257 |
<telerik:RadRibbonGroup DialogLauncherVisibility="Collapsed" |
|
258 |
Header="LINE"
|
|
257 |
<telerik:RadRibbonGroup x:Name="LineControlGroup" DialogLauncherVisibility="Collapsed"
|
|
258 |
Header="LINE" |
|
259 | 259 |
Icon="/KCOM;component/Resources/Images/MenuImage_New/small/line.png" |
260 | 260 |
telerik:ScreenTip.Description="Show the File Task options." |
261 | 261 |
telerik:ScreenTip.Title="File" |
... | ... | |
333 | 333 |
|
334 | 334 |
</Grid> |
335 | 335 |
</telerik:RadRibbonGroup> |
336 |
|
|
337 |
|
|
338 |
<telerik:RadRibbonGroup DialogLauncherVisibility="Collapsed" |
|
336 |
|
|
337 |
|
|
338 |
<telerik:RadRibbonGroup x:Name="ShapeControlGroup" DialogLauncherVisibility="Collapsed"
|
|
339 | 339 |
Header="SHAPE" |
340 | 340 |
Icon="/KCOM;component/Resources/Images/MenuImage_New/small/shape.png" |
341 | 341 |
telerik:ScreenTip.Description="Show the File Task options." |
... | ... | |
383 | 383 |
Maximum="1" Minimum="0" HandlesVisibility="Visible" VerticalAlignment="Center" ValueChanged="sdOpacity_ValueChanged"/> |
384 | 384 |
</telerik:RadDockPanel> |
385 | 385 |
|
386 |
<telerik:RadButtonGroup Margin="10,3,0,-3" Height="20" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2" |
|
387 |
BorderThickness="1" |
|
388 |
telerik:StyleManager.Theme="Windows8"> |
|
386 |
<telerik:RadDockPanel Margin="10,3,0,0" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2"> |
|
389 | 387 |
<TextBlock Width="50" |
390 | 388 |
HorizontalAlignment="Center" |
391 | 389 |
VerticalAlignment="Center" |
... | ... | |
393 | 391 |
Text="ArcLength" |
394 | 392 |
TextAlignment="Center" /> |
395 | 393 |
<telerik:RadNumericUpDown x:Name="cbArcLength" |
396 |
Width="69" |
|
397 |
Height="20" |
|
398 |
Margin="2" |
|
394 |
Width="60" |
|
395 |
Height="Auto" |
|
399 | 396 |
HorizontalAlignment="Stretch" |
400 | 397 |
VerticalAlignment="Center" |
401 | 398 |
HorizontalContentAlignment="Center" |
... | ... | |
407 | 404 |
ValueChanged="cbArcLength_ValueChanged" |
408 | 405 |
Value="{Binding ArcLength, Source={x:Static common:ViewerDataModel.Instance}, Mode=TwoWay}" |
409 | 406 |
/> |
410 |
</telerik:RadButtonGroup>
|
|
407 |
</telerik:RadDockPanel>
|
|
411 | 408 |
|
412 | 409 |
|
413 | 410 |
|
... | ... | |
440 | 437 |
</telerik:RadButtonGroup>--> |
441 | 438 |
</Grid> |
442 | 439 |
</telerik:RadRibbonGroup> |
443 |
|
|
444 |
<telerik:RadRibbonGroup DialogLauncherVisibility="Collapsed" Header="TEXT" Icon="/KCOM;component/Resources/Images/MenuImage_New/small/text.png"> |
|
440 |
<telerik:RadRibbonGroup DialogLauncherVisibility="Collapsed" Header="MACRO"> |
|
441 |
<telerik:RadToggleButton Width="30" Height="30" Click="ControlEvent" CommandParameter="MACRO;1" Tag="Normal"> |
|
442 |
<Image Source="/KCOM;component/Resources/Images/MenuImage_new/cloudRectArrowText.png" /> |
|
443 |
</telerik:RadToggleButton> |
|
444 |
</telerik:RadRibbonGroup> |
|
445 |
<telerik:RadRibbonGroup x:Name="TextControlGroup" DialogLauncherVisibility="Collapsed" |
|
446 |
Header="TEXT" Icon="/KCOM;component/Resources/Images/MenuImage_New/small/text.png"> |
|
445 | 447 |
|
446 | 448 |
<Grid Margin="0,-1,0,0"> |
447 | 449 |
<Grid.ColumnDefinitions> |
... | ... | |
528 | 530 |
</StackPanel> |
529 | 531 |
</telerik:RadOrderedWrapPanel> |
530 | 532 |
</telerik:RadRibbonGroup> |
531 |
|
|
532 |
<telerik:RadRibbonGroup DialogLauncherVisibility="Collapsed" |
|
533 |
|
|
534 |
<telerik:RadRibbonGroup x:Name="PenControlGroup" DialogLauncherVisibility="Collapsed"
|
|
533 | 535 |
Header="PEN" |
534 | 536 |
Icon="/KCOM;component/Resources/Images/MenuImage_New/small/pen.png" |
535 | 537 |
IsEnabled="True" |
536 | 538 |
telerik:ScreenTip.Description="Use pen tool to draw" |
537 | 539 |
telerik:ScreenTip.Title="Pen"> |
538 | 540 |
<telerik:RadCollapsiblePanel> |
539 |
<telerik:RadRibbonToggleButton |
|
540 |
CollapseToMedium="WhenGroupIsMedium" |
|
541 |
CollapseToSmall="WhenGroupIsSmall" |
|
541 |
<telerik:RadToggleButton Width="30" Height="30" |
|
542 | 542 |
CommandParameter="Ink" |
543 |
LargeImage="/KCOM;component/Resources/Images/MenuImage_new/pen.png" |
|
544 |
Size="Large" |
|
545 | 543 |
Click="ControlEvent" |
546 | 544 |
Tag="Pensil" |
547 | 545 |
telerik:ScreenTip.Description="Use basic pen." |
548 |
telerik:ScreenTip.Title="Free Mark Pen" |
|
549 |
Text="Pen" /> |
|
546 |
telerik:ScreenTip.Title="Free Mark Pen"> |
|
547 |
<Image Source="/KCOM;component/Resources/Images/MenuImage_new/pen.png"/> |
|
548 |
</telerik:RadToggleButton> |
|
550 | 549 |
<!--<telerik:RadRibbonToggleButton |
551 | 550 |
CollapseToMedium="WhenGroupIsMedium" |
552 | 551 |
CollapseToSmall="WhenGroupIsSmall" |
... | ... | |
583 | 582 |
</telerik:RadCollapsiblePanel> |
584 | 583 |
</telerik:RadRibbonGroup> |
585 | 584 |
|
586 |
<telerik:RadRibbonGroup DialogLauncherVisibility="Collapsed" |
|
585 |
<telerik:RadRibbonGroup x:Name="AppStampControlGroup" DialogLauncherVisibility="Collapsed"
|
|
587 | 586 |
Icon="/KCOM;component/Resources/Images/MenuImage_New/small/stamp.png" |
588 | 587 |
Header="Approval Stamp" |
589 | 588 |
telerik:ScreenTip.Description="Stamp , Image , Date 등을 만듭니다" |
내보내기 Unified diff