프로젝트

일반

사용자정보

개정판 43d99d26

ID43d99d261276a28a0e5da485d13a0409ee1f1bb0
상위 af129cd9
하위 c3ce13e1, d5918862

김동진이(가) 5년 이상 전에 추가함

issue #000 common lib 분리 및 installer 수정

Change-Id: I61a45d1b4df55719aa9d4418bdeb573a91086d69

차이점 보기:

FinalService.wxs
139 139
      <Component Id="cmpFF91FE36548D6FA9C8D0DC80206BE1EF" Directory="INSTALLFOLDER" Guid="28E25268-EB14-44B5-9C70-7A5D620A63F6" Win64='yes'>
140 140
          <File Id="fil898D8F5BF92067A65BDD539092A9A061" KeyPath="yes" Source=".\Setup\FinalService\Telerik.Windows.Zip.xml" />
141 141
      </Component>
142
	  <Component Id="commonlib.dll" Directory="INSTALLFOLDER" Guid="a766f7cf-1bc2-4b28-abe5-b35eedc05e01" Win64='yes'>
143
          <File Id="commonlib.dll" KeyPath="yes" Source=".\Setup\FinalService\CommonLib.dll" />
144
      </Component>
142 145
    </ComponentGroup>
143 146
  </Fragment>
144 147
</Wix>
FinalService/KCOM_FinalService/CommonLib/Common.cs
1
using System;
2
using System.Collections.Generic;
3
using System.IO;
4
using System.Linq;
5
using System.Runtime.InteropServices;
6
using System.Text;
7
using System.Threading.Tasks;
8

  
9
namespace CommonLib
10
{
11
    public class Common
12
    {
13
        [DllImport("kernel32")]
14
        public static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
15

  
16
        public static string AppDataFolder
17
        {
18
            get
19
            {
20
                return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MARKUS");
21
            }
22
        }
23
    }
24
}
FinalService/KCOM_FinalService/CommonLib/CommonLib.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>{6BBE14D5-C998-47C8-BF75-C9647EDAD561}</ProjectGuid>
8
    <OutputType>Library</OutputType>
9
    <AppDesignerFolder>Properties</AppDesignerFolder>
10
    <RootNamespace>CommonLib</RootNamespace>
11
    <AssemblyName>CommonLib</AssemblyName>
12
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13
    <FileAlignment>512</FileAlignment>
14
    <Deterministic>true</Deterministic>
15
    <TargetFrameworkProfile />
16
  </PropertyGroup>
17
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18
    <DebugSymbols>true</DebugSymbols>
19
    <DebugType>full</DebugType>
20
    <Optimize>false</Optimize>
21
    <OutputPath>bin\Debug\</OutputPath>
22
    <DefineConstants>DEBUG;TRACE</DefineConstants>
23
    <ErrorReport>prompt</ErrorReport>
24
    <WarningLevel>4</WarningLevel>
25
  </PropertyGroup>
26
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27
    <DebugType>pdbonly</DebugType>
28
    <Optimize>true</Optimize>
29
    <OutputPath>bin\Release\</OutputPath>
30
    <DefineConstants>TRACE</DefineConstants>
31
    <ErrorReport>prompt</ErrorReport>
32
    <WarningLevel>4</WarningLevel>
33
  </PropertyGroup>
34
  <ItemGroup>
35
    <Reference Include="System" />
36
    <Reference Include="System.Core" />
37
    <Reference Include="System.Xml.Linq" />
38
    <Reference Include="System.Data.DataSetExtensions" />
39
    <Reference Include="Microsoft.CSharp" />
40
    <Reference Include="System.Data" />
41
    <Reference Include="System.Net.Http" />
42
    <Reference Include="System.Xml" />
43
  </ItemGroup>
44
  <ItemGroup>
45
    <Compile Include="Common.cs" />
46
    <Compile Include="Properties\AssemblyInfo.cs" />
47
  </ItemGroup>
48
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
49
</Project>
FinalService/KCOM_FinalService/CommonLib/Properties/AssemblyInfo.cs
1
using System.Reflection;
2
using System.Runtime.CompilerServices;
3
using System.Runtime.InteropServices;
4

  
5
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 
6
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
7
// 이러한 특성 값을 변경하세요.
8
[assembly: AssemblyTitle("CommonLib")]
9
[assembly: AssemblyDescription("")]
10
[assembly: AssemblyConfiguration("")]
11
[assembly: AssemblyCompany("")]
12
[assembly: AssemblyProduct("CommonLib")]
13
[assembly: AssemblyCopyright("Copyright ©  2019")]
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("6bbe14d5-c998-47c8-bf75-c9647edad561")]
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")]
FinalService/KCOM_FinalService/FinalService_Watcher/FinalService_Watcher.cs
8 8
using System.Text;
9 9
using System.Runtime.Remoting.Channels;
10 10
using System.Runtime.Remoting.Channels.Tcp;
11
using System.IO;
11 12

  
12 13
namespace FinalService_Watcher
13 14
{
......
17 18
        {
18 19
            InitializeComponent();
19 20

  
21
            System.Text.StringBuilder monitorservicename = new System.Text.StringBuilder(512);
22
            CommonLib.Common.GetPrivateProfileString("FinalServiceName", "NAME", "FinalService", monitorservicename, 512, Path.Combine(CommonLib.Common.AppDataFolder, "FinalService.ini"));
23
            _controller = new ServiceController(monitorservicename.ToString());
20 24
            this.EventLog.Source = this.ServiceName;
21 25
            this.EventLog.Log = "Application";
22 26

  
......
29 33

  
30 34
        System.Timers.Timer _Timer = new System.Timers.Timer();
31 35
        //ServiceController _controller = new ServiceController("ConverterStation");
32
        ServiceController _controller = new ServiceController("FinalStation");
36

  
37
        ServiceController _controller = null;
38
        
33 39

  
34 40
        protected override void OnStart(string[] args)
35 41
        {
FinalService/KCOM_FinalService/FinalService_Watcher/FinalService_Watcher.csproj
62 62
    </Compile>
63 63
  </ItemGroup>
64 64
  <ItemGroup>
65
    <ProjectReference Include="..\EmailClient\EmailClient.csproj">
66
      <Project>{50EBCC06-AB49-4C8F-A4C4-1A7520AC2F2D}</Project>
67
      <Name>EmailClient</Name>
65
    <ProjectReference Include="..\CommonLib\CommonLib.csproj">
66
      <Project>{6bbe14d5-c998-47c8-bf75-c9647edad561}</Project>
67
      <Name>CommonLib</Name>
68 68
    </ProjectReference>
69 69
  </ItemGroup>
70 70
  <ItemGroup>
FinalService/KCOM_FinalService/KCOM_FinalService.sln
4 4
VisualStudioVersion = 15.0.27130.2010
5 5
MinimumVisualStudioVersion = 10.0.40219.1
6 6
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KCOM_FinalService", "KCOM_FinalService\KCOM_FinalService.csproj", "{2BE3F054-D494-4712-927F-47E2FFB52170}"
7
	ProjectSection(ProjectDependencies) = postProject
8
		{78839E61-B116-4AB2-B358-FF4FB19090EF} = {78839E61-B116-4AB2-B358-FF4FB19090EF}
9
	EndProjectSection
7 10
EndProject
8 11
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KCOMDataModel", "KCOMDataModel\KCOMDataModel.csproj", "{629DC8CD-D458-47EF-8F02-CD12C7001C3E}"
9 12
EndProject
......
17 20
EndProject
18 21
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinalService_Watcher", "FinalService_Watcher\FinalService_Watcher.csproj", "{78839E61-B116-4AB2-B358-FF4FB19090EF}"
19 22
EndProject
23
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonLib", "CommonLib\CommonLib.csproj", "{6BBE14D5-C998-47C8-BF75-C9647EDAD561}"
24
EndProject
20 25
Global
21 26
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
22 27
		Debug|Any CPU = Debug|Any CPU
......
107 112
		{78839E61-B116-4AB2-B358-FF4FB19090EF}.Release|x64.ActiveCfg = Release|x86
108 113
		{78839E61-B116-4AB2-B358-FF4FB19090EF}.Release|x86.ActiveCfg = Release|x86
109 114
		{78839E61-B116-4AB2-B358-FF4FB19090EF}.Release|x86.Build.0 = Release|x86
115
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
116
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Debug|Any CPU.Build.0 = Debug|Any CPU
117
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Debug|x64.ActiveCfg = Debug|Any CPU
118
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Debug|x64.Build.0 = Debug|Any CPU
119
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Debug|x86.ActiveCfg = Debug|Any CPU
120
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Debug|x86.Build.0 = Debug|Any CPU
121
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Release|Any CPU.ActiveCfg = Release|Any CPU
122
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Release|Any CPU.Build.0 = Release|Any CPU
123
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Release|x64.ActiveCfg = Release|Any CPU
124
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Release|x64.Build.0 = Release|Any CPU
125
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Release|x86.ActiveCfg = Release|Any CPU
126
		{6BBE14D5-C998-47C8-BF75-C9647EDAD561}.Release|x86.Build.0 = Release|Any CPU
110 127
	EndGlobalSection
111 128
	GlobalSection(SolutionProperties) = preSolution
112 129
		HideSolutionNode = FALSE
FinalService/KCOM_FinalService/KCOM_FinalService/KCOM_FinalService.csproj
62 62
    <Compile Include="Remoting\RemFinalPDFStation.cs" />
63 63
  </ItemGroup>
64 64
  <ItemGroup>
65
    <ProjectReference Include="..\CommonLib\CommonLib.csproj">
66
      <Project>{6bbe14d5-c998-47c8-bf75-c9647edad561}</Project>
67
      <Name>CommonLib</Name>
68
    </ProjectReference>
65 69
    <ProjectReference Include="..\IFinalPDF\IFinalPDF.csproj">
66 70
      <Project>{784438be-2074-41ae-a692-24e1a4a67fe3}</Project>
67 71
      <Name>IFinalPDF</Name>
FinalService/KCOM_FinalService/KCOM_FinalService/Remoting/RemFinalPDFStation.cs
231 231
                    else
232 232
                    {
233 233
                        ///TODO: 저장할 폴더 위치를 configuration으로 빼주세요
234
                        string saveFolder = String.Format(Properties.Settings.Default.saveFileFolder, _item.PROJECT_NO, Convert.ToInt32(_item.DOCUMENT_ID) / 100, _item.DOCUMENT_ID);
234
                        ///Local Test 용 저장 위치
235
                        System.Text.StringBuilder pdfsavepath = new System.Text.StringBuilder(512);
236
                        CommonLib.Common.GetPrivateProfileString("DebugSavePath", "URL", "(NONE)", pdfsavepath, 512, Path.Combine(CommonLib.Common.AppDataFolder, "FinalService.ini"));
237

  
238

  
239
                        string saveFolder = String.Format(pdfsavepath.ToString(), _item.PROJECT_NO, Convert.ToInt32(_item.DOCUMENT_ID) / 100, _item.DOCUMENT_ID);
235 240
                        if (!System.IO.Directory.Exists(saveFolder))
236 241
                        {
237 242
                            System.IO.Directory.CreateDirectory(saveFolder);
......
244 249
                        {
245 250
                            var item = _entity.DOCUMENT_ITEM.Where(d => d.DOCUMENT_ID == _item.DOCUMENT_ID).FirstOrDefault();
246 251
                            ///TODO: RESULT FILE 경로 위치를 configuration으로 빼주세요
247
                            item.RESULT_FILE = String.Format(Properties.Settings.Default.resultFileFolder, _item.PROJECT_NO, Convert.ToInt32(_item.DOCUMENT_ID) / 100, _item.DOCUMENT_ID, e.OriginPDFName);
248
                            //@"http://cloud.devdoftech.co.kr:5977/FinalPDF/{0}_app/VPCS_DOCLIB/{1}/{2}/ToVendor/{3}"
252
                            ///Local Test 용 result url
253
                            System.Text.StringBuilder resultFileFolder = new System.Text.StringBuilder(512);
254
                            CommonLib.Common.GetPrivateProfileString("DebugResultUrlPath", "URL", "(NONE)", resultFileFolder, 512, Path.Combine(CommonLib.Common.AppDataFolder, "FinalService.ini"));
255
                            item.RESULT_FILE = String.Format(resultFileFolder.ToString(), _item.PROJECT_NO, Convert.ToInt32(_item.DOCUMENT_ID) / 100, _item.DOCUMENT_ID, e.OriginPDFName);
256
                            
249 257
                            sendReqLog("RESULT_FILE_PATH", item.RESULT_FILE);
250 258
                            _entity.SaveChanges();
251 259
                            SetFinalState(_item.ID, FinalStatus.Success);
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
1026 1026
                                                double Opacity = control.Opac;
1027 1027

  
1028 1028
                                                StringBuilder ApprovedImgPath = new StringBuilder(512);
1029
                                                GetPrivateProfileString("ApprovedImgPath", "URL", "(NONE)", ApprovedImgPath, 512, Path.Combine(AppDataFolder, "FinalService.ini"));
1029
                                                CommonLib.Common.GetPrivateProfileString("ApprovedImgPath", "URL", "(NONE)", ApprovedImgPath, 512, Path.Combine(CommonLib.Common.AppDataFolder, "FinalService.ini"));
1030 1030

  
1031 1031
                                                Controls_PDF.HoneyPDFLib_DrawSet_Symbol.DrawApproval(StartPoint, EndPoint, pointSet, contentByte, _SetColor, Angle, Opacity, ApprovedImgPath.ToString());
1032 1032
                                            }
......
1042 1042
                                                double Opacity = control.Opac;
1043 1043

  
1044 1044
                                                StringBuilder imgpath = new StringBuilder(512);
1045
                                                GetPrivateProfileString("CheckmarkImgPath", "URL", "(NONE)", imgpath, 512, Path.Combine(AppDataFolder, "FinalService.ini"));
1045
                                                CommonLib.Common.GetPrivateProfileString("CheckmarkImgPath", "URL", "(NONE)", imgpath, 512, Path.Combine(CommonLib.Common.AppDataFolder, "FinalService.ini"));
1046 1046

  
1047 1047
                                                Controls_PDF.HoneyPDFLib_DrawSet_Symbol.DrawCheckMark(StartPoint, EndPoint, pointSet, contentByte, _SetColor, Angle, Opacity, imgpath.ToString());
1048 1048
                                            }
......
1100 1100
                    //File.Move(FinalPDFPath.FullName, @"\\192.168.0.67\finalpdf\" + FinalPDFPath.Name.Replace(".tmp", ".pdf"));
1101 1101
                    //FinalPDFPath = new FileInfo(@"\\192.168.0.67\finalpdf\" + FinalPDFPath.Name.Replace(".tmp", ".pdf"));
1102 1102
                    StringBuilder PDFMovePath = new StringBuilder(512);
1103
                    GetPrivateProfileString("PDFMovePath", "URL", "(NONE)", PDFMovePath, 512, Path.Combine(AppDataFolder, "FinalService.ini"));
1103
                    CommonLib.Common.GetPrivateProfileString("PDFMovePath", "URL", "(NONE)", PDFMovePath, 512, Path.Combine(CommonLib.Common.AppDataFolder, "FinalService.ini"));
1104 1104
                    File.Move(FinalPDFPath.FullName, PDFMovePath.ToString() + FinalPDFPath.Name.Replace(".tmp", ".pdf"));
1105 1105
                    FinalPDFPath = new FileInfo(PDFMovePath.ToString() + FinalPDFPath.Name.Replace(".tmp", ".pdf"));
1106 1106

  
......
1131 1131
            throw new NotImplementedException();
1132 1132
        }
1133 1133

  
1134
        [DllImport("kernel32")]
1135
        private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
1136

  
1137
        public static string AppDataFolder
1138
        {
1139
            get
1140
            {
1141
                return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MARKUS");
1142
            }
1143
        }
1134
        
1144 1135

  
1145 1136
        #endregion
1146 1137
    }
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.csproj
162 162
    </Page>
163 163
  </ItemGroup>
164 164
  <ItemGroup>
165
    <ProjectReference Include="..\CommonLib\CommonLib.csproj">
166
      <Project>{6bbe14d5-c998-47c8-bf75-c9647edad561}</Project>
167
      <Name>CommonLib</Name>
168
    </ProjectReference>
165 169
    <ProjectReference Include="..\IFinalPDF\IFinalPDF.csproj">
166 170
      <Project>{784438BE-2074-41AE-A692-24E1A4A67FE3}</Project>
167 171
      <Name>IFinalPDF</Name>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)