개정판 e52385b9
issue #000: BaseClientAddress MARKUS.ini File로 통합
Change-Id: I05d621ff60251bb08eb9c165e1309f4dff65a111
MarkupToPDF/Common/GetUserSign.cs | ||
---|---|---|
4 | 4 |
using System.Collections.Generic; |
5 | 5 |
using System.IO; |
6 | 6 |
using System.Linq; |
7 |
using System.Runtime.InteropServices; |
|
7 | 8 |
using System.ServiceModel; |
8 | 9 |
using System.Text; |
9 | 10 |
|
... | ... | |
19 | 20 |
/// <param name="UserID"></param> |
20 | 21 |
/// <param name="ProjectNo"></param> |
21 | 22 |
/// <returns></returns> |
23 |
/// |
|
24 |
/// <summary> |
|
25 |
/// Application Data Folder |
|
26 |
/// </summary> |
|
27 |
/// |
|
28 |
public static string AppDataFolder |
|
29 |
{ |
|
30 |
get |
|
31 |
{ |
|
32 |
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MARKUS"); |
|
33 |
} |
|
34 |
} |
|
35 |
|
|
36 |
[DllImport("kernel32")] |
|
37 |
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); |
|
38 |
|
|
22 | 39 |
public string GetSign(string UserID, string ProjectNo) |
23 | 40 |
{ |
24 | 41 |
|
... | ... | |
30 | 47 |
_binding.CloseTimeout = new TimeSpan(0, 5, 0); |
31 | 48 |
_binding.SendTimeout = new TimeSpan(0, 5, 0); |
32 | 49 |
_binding.TextEncoding = System.Text.Encoding.UTF8; |
33 |
_binding.TransferMode = TransferMode.Buffered; |
|
50 |
_binding.TransferMode = TransferMode.Buffered; |
|
51 |
|
|
52 |
StringBuilder BaseClientAddress = new StringBuilder(512); |
|
53 |
GetPrivateProfileString("BaseClientAddress", "URL", "(NONE)", BaseClientAddress, 512, Path.Combine(AppDataFolder, "FinalService.ini")); |
|
54 |
|
|
55 |
//string sBaseServiceURL = global::MarkupToPDF.Properties.Settings.Default.BaseClientAddress; |
|
56 |
string sBaseServiceURL = BaseClientAddress.ToString(); |
|
34 | 57 |
|
35 |
string sBaseServiceURL = global::MarkupToPDF.Properties.Settings.Default.BaseClientAddress; |
|
36 | 58 |
_EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL)); |
37 | 59 |
|
38 | 60 |
markus_api.ServiceDeepViewClient client = new markus_api.ServiceDeepViewClient(_binding, _EndPoint); |
내보내기 Unified diff