개정판 19391ad3
issue #000: symbol external ip 치환 추가
Change-Id: I53a7b13b0d091781d45efceb7c84042c9cc45bfa
CommonLib/Common.cs | ||
---|---|---|
63 | 63 |
} |
64 | 64 |
return result; |
65 | 65 |
} |
66 |
public static string IPReplace(string url, bool isExternal) |
|
67 |
{ |
|
68 |
string result = url; |
|
69 |
try |
|
70 |
{ |
|
71 |
if (isExternal) |
|
72 |
{ |
|
73 |
System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(512); |
|
74 |
GetPrivateProfileString("External", "IP", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini")); |
|
75 |
string external_ip = stringBuilder.ToString(); |
|
76 |
stringBuilder = new StringBuilder(); |
|
77 |
GetPrivateProfileString("Internal", "IP", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini")); |
|
78 |
string internal_ip = stringBuilder.ToString(); |
|
79 |
result = result.Replace(internal_ip, external_ip); |
|
80 |
} |
|
81 |
} |
|
82 |
catch (Exception) |
|
83 |
{ |
|
84 |
throw; |
|
85 |
} |
|
86 |
|
|
87 |
return result; |
|
88 |
} |
|
66 | 89 |
public static string GetAlertMessageString(string section, string key, string def) |
67 | 90 |
{ |
68 | 91 |
System.Text.StringBuilder strbuilder = new System.Text.StringBuilder(1024); |
KCOM/App.xaml.cs | ||
---|---|---|
186 | 186 |
|
187 | 187 |
#if DEBUG |
188 | 188 |
//sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal); |
189 |
sBaseServiceURL = CommonLib.Common.GetConfigString("Debug_BaseClientAddress", "URL", ""); |
|
189 |
sBaseServiceURL = CommonLib.Common.GetConfigString("Debug_BaseClientAddress", "URL", "",isExternal);
|
|
190 | 190 |
#else |
191 | 191 |
sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal); |
192 | 192 |
#endif |
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
99 | 99 |
foreach (var item in symbol_Private) |
100 | 100 |
{ |
101 | 101 |
Custom.Name = item.NAME; |
102 |
Custom.ImageUri = item.IMAGE_URL;
|
|
102 |
Custom.ImageUri = CommonLib.Common.IPReplace(item.IMAGE_URL, App.isExternal);
|
|
103 | 103 |
Custom.ID = item.ID; |
104 | 104 |
Custom_List.Add(Custom); |
105 | 105 |
Custom = new Symbol_Custom(); |
... | ... | |
125 | 125 |
foreach (var item in symbol_Public) |
126 | 126 |
{ |
127 | 127 |
Custom.Name = item.NAME; |
128 |
Custom.ImageUri = item.IMAGE_URL;
|
|
128 |
Custom.ImageUri = CommonLib.Common.IPReplace(item.IMAGE_URL, App.isExternal);
|
|
129 | 129 |
Custom.ID = item.ID; |
130 | 130 |
Custom_List.Add(Custom); |
131 | 131 |
Custom = new Symbol_Custom(); |
내보내기 Unified diff