로스트아크 게임 화면 위에 인벤 지도를 오버레이해주는 프로그램입니다.
내실할 때 알탭해가면서 하지 마시고 편하게 하시면 좋을 것 같습니다.

크기 조절, 위치 이동, 투명도 조절 가능하며
방향키 ← →를 통해 게임하면서 맵을 넘길 수 있습니다.

Internet Explorer 브라우저를 사용하여 화면에 오버레이시켜주는 프로그램입니다.
(현재는 Microosft Edge)







다운로드는 매번 새로 올리기 힘든 관계로 아래 링크로 올립니다. Assets 부분의 zip 파일을 다운받으시면 됩니다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
 
 
 
 
namespace Lococo
{
    public partial class MainForm : MetroFramework.Forms.MetroForm
    {
        #region Windows API
        [DllImport("user32")]
        public static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
        [DllImport("user32.dll")]
        public static extern IntPtr FindWindowEx(IntPtr parentHWnd, IntPtr childAfterHWnd, string className, string windowTitle);
 
        [DllImport("user32")]
        public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
 
        [DllImport("User32.dll")]
        public static extern Int32 SetForegroundWindow(IntPtr hWnd);
        #endregion
 
 
        #region Global Variables
        private Forms.overlayForm overlayForm = new Forms.overlayForm();
        private Forms.messageForm messageForm;
 
        private readonly string appPath = Application.StartupPath;
        private readonly string app_version = "2021-05-18";
        #endregion
 
 
 
        /*
        private void loadContinents()
        {
            string filePath = appPath + "dbmapslist.ini";
            byte continent_count = 0;
            continent.Items.Clear();
            continent.Items.Add(">> 대항해");
            using (var configClass = new Functions.manageConfig())
            {
                Byte.TryParse(configClass.readConfig("Continent", "Count", filePath), out continent_count);
                for (byte index=1; index<continent_count; ++index)
                {
                    continent.Items.Add(configClass.readConfig("Continent List", index.ToString(), filePath));
                }
            }
        }
        private void loadAreas()
        {
            string filePath = appPath + "dbmapscontinents";
            byte area_count = 0, dungeon_count = 0;
            area.Items.Clear();
            if (continent.SelectedIndex == 0)
            { }
            else
            {
                filePath += continent.SelectedIndex.ToString() + "list.ini";
                using (var configClass = new Functions.manageConfig())
                {
                    byte.TryParse(configClass.readConfig("Area", "Count", filePath), out area_count);
                    byte.TryParse(configClass.readConfig("Dungeon", "Count", filePath), out dungeon_count);
                    for (byte index=1; index<area_count+1; ++index)
                    {
                        area.Items.Add(configClass.readConfig("Area List", index.ToString(), filePath));
                    }
                    if (dungeon_count > 0)
                    {
                        area.Items.Add("");
                        for (byte index=1; index<dungeon_count+1; ++index)
                        {
                            area.Items.Add(">> " + configClass.readConfig("Dungeon List", index.ToString(), filePath));
                        }
                    }
                }
            }            
        }
        */
 
 
        #region App Functions
        private void preventDoubleExcuting()
        {
            Process[] proc1 = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
 
            if (proc1.Length > 1)
            {
                for (byte index = 0; index < proc1.Count(); ++index)
                {
                    if (proc1[index].MainWindowHandle != this.Handle)
                        SetForegroundWindow(proc1[index].MainWindowHandle);
                }
 
                Environment.Exit(0);
            }
 
            for (byte index = 0; index < proc1.Length; ++index)
                proc1[index].Dispose();
        }
 
        private bool customMsgbox(string message, string caption, int width, int height, bool yesNo)
        {
            bool result = false;
            messageForm = new Forms.messageForm();
 
            messageForm.msg = message;
            messageForm.cap = caption;
            messageForm.width = width;
            messageForm.height = height;
            messageForm.yesNo = yesNo;
 
            messageForm.ShowDialog();
 
            if (messageForm.dialogResult == 1)
                result = true;
 
 
            messageForm.Dispose();
            return result;
        }
        #endregion
 
        public MainForm()
        {
            InitializeComponent();
        }
 
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams crp = base.CreateParams;
                crp.ClassStyle = 0x00020000;
                return crp;
            }
        }
 
 
 
 
 
 
        #region Event Handlers - Form
        private void MainForm_Load(object sender, EventArgs e)
        {
            preventDoubleExcuting();
 
            File.Open(Application.ExecutablePath, FileMode.Open, FileAccess.Read, FileShare.Read);
 
 
            if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
            {
                if (!customMsgbox("프로그램이 정상작동하지 않을 수 있습니다.rnrn프로그램을 실행하실건가요?""인터넷 연결되지 않음"500250true))
                    Environment.Exit(0);
            }
 
            else
            {
                using (var ftp = new Functions.checkVersion())
                {
                    string server_version = ftp.DownloadFTPString("version.ini");
 
                    if (server_version != app_version)
                    {
                        if (!customMsgbox("프로그램이 최신버전이 아니에요!rnrn그래도 이용하시겠어요?""최신버전 아님"400250true))
                            Environment.Exit(0);
                    }
                }
            }
 
 
 
            mainTab.SelectedIndex = 0;         
            this.Size = new Size(850650);
        }
 
        private void MainForm_Resize(object sender, EventArgs e)
        {
            int white_space = version_label.Left;
 
            mainTab.Size = new Size(this.Width - (white_space * 2), this.Height - (mainTab.Top + white_space));
        }
        #endregion
 
 
        #region Event Handlers - About Map
        private void mapToggle_Click(object sender, EventArgs e)
        {
            if (mapToggle.Checked && !overlayForm.IsHandleCreated)
            {
                overlayForm = new Forms.overlayForm();
 
                overlayForm.webURL = mapURL.Text;
                overlayForm.Opacity = (float)map_Bar.Value / 100;
 
                overlayForm.Show();
 
                overlayForm.setTransparent(map_changeState.Checked);
            }
 
            else
            {
                overlayForm.Dispose();
                overlayForm.Close();      
            }
        }
 
        private void mapHelp_Click(object sender, EventArgs e)
        {
            customMsgbox("이 기능을 활성화하실 경우, 웹 브라우저 부분에 전달되는 키보드/마우스의 명령이 무시되어 다른 프로그램에 전달됩니다.""입력 무시 도움말"525250false);
        }
 
        private void map_Bar_Scroll(object sender, ScrollEventArgs e)
        {
            map_BarLB.Text = "불투명도:                                                 " + map_Bar.Value.ToString() + "%";
 
            if (overlayForm.IsHandleCreated)
            {
                overlayForm.Opacity = (float)map_Bar.Value / 100;
            }
        }
 
        private void map_changeState_Click(object sender, EventArgs e)
        {
            if (mapToggle.Checked)
            {
                if (map_changeState.Checked)
                    overlayForm.setTransparent(true);
 
                else
                    overlayForm.setTransparent(false);
            }
        }
 
        private void map_appendURL_Click(object sender, EventArgs e)
        {
            if (mapToggle.Checked)
            {
                overlayForm.webURL = mapURL.Text;
                overlayForm.navigateBrowser();
            }
        }
 
        private void map_resetURL_Click(object sender, EventArgs e)
        {
            mapURL.Text = "https://lostark.inven.co.kr/dataninfo/world/";
 
            if (mapToggle.Checked)
            {
                overlayForm.webURL = mapURL.Text;
                overlayForm.navigateBrowser();
            }
        }
        #endregion
    }
}
 
cs


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Media;
 
 
 
 
 
namespace Lococo.Forms
{
    public partial class messageForm : MetroFramework.Forms.MetroForm
    {
        [DllImport("winmm.dll", SetLastError = true)] private static extern int waveOutSetVolume(IntPtr device, uint volume);
        public string msg { get; set; } = null;
        public string cap { get; set; } = null;
        public int width { get; set; } = 350;
        public int height { get; set; } = 200;
        public bool yesNo { get; set; } = false;
 
        public byte dialogResult { get; set; }
        // 0 = No
        // 1 = Yes, OK
 
 
        #region Settings UI/Sound
        public messageForm()
        {
            waveOutSetVolume(IntPtr.Zero, (uint)0x69786978);
 
            if (System.IO.File.Exists(Application.StartupPath + "dbsoundsMessagebox.wav"))
            {
                SoundPlayer sound = new SoundPlayer(Application.StartupPath + "dbsoundsMessagebox.wav");
                sound.Play();
                sound.Dispose();
            }
 
            InitializeComponent();
        }
 
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams crp = base.CreateParams;
                crp.ClassStyle = 0x00020000;
                return crp;
            }
        }
 
 
        private void messageForm_Load(object sender, EventArgs e)
        {
            this.Width = width;
            this.Height = height;
 
            Caption.Text = cap;
 
            message.Text = msg;
            message.MaximumSize = new Size(this.Width - message.Left - 25this.Height - message.Top - 80);
 
            if (yesNo)
            {
                okButton.MaximumSize = new Size(this.Width - 54, okButton.Height);
                okButton.Location = new Point((this.Width / 2 - 96 > 27 ? this.Width / 2 - 96 : 28), this.Height - 60);
                noButton.Location = new Point(this.Width / 2 + 10this.Height - 60);
 
            }
 
            else
            {
                noButton.Visible = false;
                okButton.Location = new Point (27this.Height - 60);
                okButton.Width = this.Width - 54;
            }
 
            deco_line.Width = this.Width - 54;
 
        }
        #endregion
 
 
 
 
        #region Pressed No/Closed
        private void noButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void messageForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (!noButton.Visible)
                dialogResult = 1;
 
            this.Close();
        }
        #endregion
 
        #region Pressed OK
        private void okButton_Click(object sender, EventArgs e)
        {
            dialogResult = 1;
            this.Close();
        }
        #endregion
 
 
    }
}
 
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.IO;
 
using Microsoft.Win32;
using System.Security;
 
 
 
 
 
namespace Lococo.Forms
{
    public partial class overlayForm : Form
    {
        #region Windows API
        [DllImport("user32")]
        public static extern Int32 SetWindowLong(IntPtr hWnd, Int32 nIndex, Int32 dwNewLong);
        [DllImport("user32")]
        public static extern Int32 GetWindowLong(IntPtr hWnd, Int32 nIndex);
 
        [DllImport("user32")]
        public static extern Int32 GetCursorPos(out POINT pt);
 
        [DllImport("user32")]
        public static extern UInt16 GetAsyncKeyState(Int32 vKey);
 
 
 
        public struct POINT
        {
            public Int32 x;
            public Int32 y;
        }
 
        #endregion
 
 
        #region Global Variables
        private Thread hotkeyThread;
 
        private int screen_width=Screen.PrimaryScreen.Bounds.Width, screen_height=Screen.PrimaryScreen.Bounds.Height;
        private int originalStyle;
        public string webURL { get; set; }
        #endregion
 
 
 
    
 
        public overlayForm()
        {
            InitializeComponent();
        }
 
        //Hide from Alt+Tab Switcher
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams Params = base.CreateParams;
                Params.ExStyle |= 0x80;
                Params.ClassStyle = 0x00020000;
 
                return Params;
            }
        }
 
 
        #region Public Functions
        public void setTransparent(bool value)
        {//마우스 클릭, 키보드 입력 등이 관통되어 다른 앱에 전달되도록
 
            if (value)
                SetWindowLong(this.Handle, -20, originalStyle | 0x80000 | 0x20);
 
            else
                SetWindowLong(this.Handle, -20, originalStyle);
 
        }
 
        public void navigateBrowser()
        {
            browser.Navigate(webURL);
        }
        #endregion
 
 
        private void hotkeyFunc()
        {
            byte pressedKey = 0;
            int form_left, form_top, form_width, form_height;
            POINT firstPoint, secondPoint;
 
            while (true)
            {
                if (pressedKey > 0)
                {
                    Thread.Sleep(35);
                    continue;
                }
 
 
                if (GetAsyncKeyState((int)Keys.ControlKey) > 32767)
                {
                    //마우스 좌클릭. 이동
                    if (GetAsyncKeyState((int)Keys.LButton) > 32767)
                    {
                        GetCursorPos(out firstPoint);
 
                        this.Invoke((MethodInvoker)delegate ()
                        {
                            if (firstPoint.x > this.Left - 1 && firstPoint.x < this.Right + 1 && firstPoint.y > this.Top - 1 && firstPoint.y < this.Bottom + 1)
                            { // 마우스가 오버레이 폼 내부에 있으면
 
                                form_left = this.Left;
                                form_top = this.Top;
                                form_width = this.Right - this.Left;
                                form_height = this.Bottom - this.Top;
 
                                while (GetAsyncKeyState((int)Keys.LButton) > 32767)
                                {
                                    GetCursorPos(out secondPoint);
 
                                    //화면 밖으로 나가는 것을 방지
                                    if (form_left + (secondPoint.x - firstPoint.x) > 100 - form_width && form_left + (secondPoint.x - firstPoint.x) < screen_width - 100)
                                        this.Left = form_left + (secondPoint.x - firstPoint.x);
 
                                    if (form_top + (secondPoint.y - firstPoint.y) > 100 - form_height && form_top + (secondPoint.y - firstPoint.y) < screen_height - 100)
                                        this.Top = form_top + (secondPoint.y - firstPoint.y);
 
                                    Thread.Sleep(5);
                                }
                            }
                        });
                    }
                 
                    //마우스 우클릭. 크기조정
                    else if (GetAsyncKeyState((int)Keys.RButton) > 32767)
                    {
                        GetCursorPos(out firstPoint);
 
                        this.Invoke((MethodInvoker)delegate ()
                        {
                            if (firstPoint.x > this.Left - 1 && firstPoint.x < this.Right + 1 && firstPoint.y > this.Top - 1 && firstPoint.y < this.Bottom + 1)
                            { // 마우스가 오버레이 폼 내부에 있으면
 
                                form_width = this.Right - this.Left;
                                form_height = this.Bottom - this.Top;
 
                                while (GetAsyncKeyState((int)Keys.RButton) > 32767)
                                {
                                    GetCursorPos(out secondPoint);
 
                                    if (form_width + (secondPoint.x - firstPoint.x) < 125 || form_height + (secondPoint.y - firstPoint.y) < 125)
                                    {
                                        this.Width = 125;
                                        this.Height = 125;
                                    }
 
                                    else
                                    {
                                        this.Width = form_width + (secondPoint.x - firstPoint.x);
                                        this.Height = form_height + (secondPoint.y - firstPoint.y);
                                    }                                 
 
                                    Thread.Sleep(1);
                                }
                            }
                        });
                    }
                }
 
                pressedKey = 0;
                Thread.Sleep(35);
            }
        }
 
 
 
 
        private void overlayForm_Load(object sender, EventArgs e)
        {
            this.BackColor = Color.Wheat;
            this.TransparencyKey = Color.Wheat;
            this.TopMost = true;
            this.FormBorderStyle = FormBorderStyle.None;
            this.Location = new Point(00);
 
            originalStyle = GetWindowLong(this.Handle, -20);
 
            this.WindowState = FormWindowState.Normal;
           
 
            hotkeyThread = new Thread(hotkeyFunc);
            hotkeyThread.IsBackground = true;
            hotkeyThread.Start();
 
            using (var IEClass = new Functions.changeIEVersion())
            {
                if (!IEClass.IsBrowserEmulationSet())
                    IEClass.SetBrowserEmulationVersion();
            }
 
 
            browser.Navigate(webURL);
        }
    }
}
 
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security;
using System.Text;
using System.Threading.Tasks;
 
 
 
namespace Lococo.Functions
{
    class changeIEVersion : IDisposable
    {
        public enum BrowserEmulationVersion
        {
            Default = 0,
            Version7 = 7000,
            Version8 = 8000,
            Version8Standards = 8888,
            Version9 = 9000,
            Version9Standards = 9999,
            Version10 = 10000,
            Version10Standards = 10001,
            Version11 = 11000,
            Version11Edge = 11001
        }
 
        private const string InternetExplorerRootKey = @"SoftwareMicrosoftInternet Explorer";
 
 
 
 
 
        public void Dispose()
        {
 
        }
 
 
 
 
 
 
 
 
        public int GetInternetExplorerMajorVersion()
        {
            int result;
 
            result = 0;
 
            try
            {
                RegistryKey key;
 
                key = Registry.LocalMachine.OpenSubKey(InternetExplorerRootKey);
 
                if (key != null)
                {
                    object value;
 
                    value = key.GetValue("svcVersion"null) ?? key.GetValue("Version"null);
 
                    if (value != null)
                    {
                        string version;
                        int separator;
 
                        version = value.ToString();
                        separator = version.IndexOf('.');
                        if (separator != -1)
                        {
                            int.TryParse(version.Substring(0, separator), out result);
                        }
                    }
                }
            }
            catch (SecurityException)
            {
                // The user does not have the permissions required to read from the registry key.
            }
            catch (UnauthorizedAccessException)
            {
                // The user does not have the necessary registry rights.
            }
 
            return result;
        }
        private const string BrowserEmulationKey = InternetExplorerRootKey + @"MainFeatureControlFEATURE_BROWSER_EMULATION";
 
        public BrowserEmulationVersion GetBrowserEmulationVersion()
        {
            BrowserEmulationVersion result;
 
            result = BrowserEmulationVersion.Default;
 
            try
            {
                RegistryKey key;
 
                key = Registry.CurrentUser.OpenSubKey(BrowserEmulationKey, true);
                if (key != null)
                {
                    string programName;
                    object value;
 
                    programName = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
                    value = key.GetValue(programName, null);
 
                    if (value != null)
                    {
                        result = (BrowserEmulationVersion)Convert.ToInt32(value);
                    }
                }
            }
            catch (SecurityException)
            {
                // The user does not have the permissions required to read from the registry key.
            }
            catch (UnauthorizedAccessException)
            {
                // The user does not have the necessary registry rights.
            }
 
            return result;
        }
        public bool SetBrowserEmulationVersion(BrowserEmulationVersion browserEmulationVersion)
        {
            bool result;
 
            result = false;
 
            try
            {
                RegistryKey key;
 
                key = Registry.CurrentUser.OpenSubKey(BrowserEmulationKey, true);
 
                if (key != null)
                {
                    string programName;
 
                    programName = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
 
                    if (browserEmulationVersion != BrowserEmulationVersion.Default)
                    {
                        // if it's a valid value, update or create the value
                        key.SetValue(programName, (int)browserEmulationVersion, RegistryValueKind.DWord);
                    }
                    else
                    {
                        // otherwise, remove the existing value
                        key.DeleteValue(programName, false);
                    }
 
                    result = true;
                }
            }
            catch (SecurityException)
            {
                // The user does not have the permissions required to read from the registry key.
            }
            catch (UnauthorizedAccessException)
            {
                // The user does not have the necessary registry rights.
            }
 
            return result;
        }
 
        public bool SetBrowserEmulationVersion()
        {
            int ieVersion;
            BrowserEmulationVersion emulationCode;
 
            ieVersion = GetInternetExplorerMajorVersion();
 
            if (ieVersion >= 11)
            {
                emulationCode = BrowserEmulationVersion.Version11;
            }
            else
            {
                switch (ieVersion)
                {
                    case 10:
                        emulationCode = BrowserEmulationVersion.Version10;
                        break;
                    case 9:
                        emulationCode = BrowserEmulationVersion.Version9;
                        break;
                    case 8:
                        emulationCode = BrowserEmulationVersion.Version8;
                        break;
                    default:
                        emulationCode = BrowserEmulationVersion.Version7;
                        break;
                }
            }
 
            return SetBrowserEmulationVersion(emulationCode);
        }
 
        public bool IsBrowserEmulationSet()
        {
            return GetBrowserEmulationVersion() != BrowserEmulationVersion.Default;
        }
 
 
 
 
 
    }
}
 
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
 
 
 
namespace Lococo.Functions
{
    class checkVersion : IDisposable
    {
        public void Dispose()
        {
 
        }
 
 
 
        // 암호화 AES256
        private string EncryptString(string InputText, string Password)
        {
            string EncryptedData = "";
            RijndaelManaged RijndaelCipher = new RijndaelManaged();
 
            byte[] PlainText = System.Text.Encoding.Unicode.GetBytes(InputText);
            byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
 
            PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
            ICryptoTransform Encryptor = RijndaelCipher.CreateEncryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
            MemoryStream memoryStream = new MemoryStream();
            CryptoStream cryptoStream = new CryptoStream(memoryStream, Encryptor, CryptoStreamMode.Write);
            cryptoStream.Write(PlainText, 0, PlainText.Length);
            cryptoStream.FlushFinalBlock();
 
            byte[] CipherBytes = memoryStream.ToArray();
 
            memoryStream.Close();
            cryptoStream.Close();
 
            EncryptedData = Convert.ToBase64String(CipherBytes);
 
            return EncryptedData;
        }
 
 
 
        // 복호화 AES256
        private string DecryptString(string InputText, string Password)
        {
            string DecryptedData = "";   // 리턴값
            RijndaelManaged RijndaelCipher = new RijndaelManaged();
 
            byte[] EncryptedData = Convert.FromBase64String(InputText);
            byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
 
            PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
            ICryptoTransform Decryptor = RijndaelCipher.CreateDecryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
            MemoryStream memoryStream = new MemoryStream(EncryptedData);
            CryptoStream cryptoStream = new CryptoStream(memoryStream, Decryptor, CryptoStreamMode.Read);
            byte[] PlainText = new byte[EncryptedData.Length];
            int DecryptedCount = cryptoStream.Read(PlainText, 0, PlainText.Length);
 
            memoryStream.Close();
            cryptoStream.Close();
 
            DecryptedData = Encoding.Unicode.GetString(PlainText, 0, DecryptedCount);
 
            return DecryptedData;
        }
 
 
 
 
 
        public string DownloadFTPString(string fileName)
        {
            using (WebClient cli = new WebClient())
            {
                cli.Credentials = new NetworkCredential(DecryptString("WUF8IVNVuWMS/khLIQckw==", DecryptString("+6L5CJRW/DnaN2UJxjJ4/6w==""lococo")), DecryptString("QMK1Wzf0QVcVoKOz9kPJiqDr7uI=", DecryptString("+6L5CJxjJ4/6w==""lococo")));
                cli.Encoding = Encoding.UTF8;
                return cli.DownloadString(DecryptString("H7L9p2Za8eUgX+oEX1hBf8LoA1BlCs0SkUN2KlpSSHoP/4uHQpDZatwdMJ+TfXcSEw==", DecryptString("+6L5CJRW/DJxjJ4/6w==""lococo")) + fileName);
            }
        }
 
 
    }
}
 
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
 
 
 
 
 
namespace Lococo.Functions
{
    class manageConfig : IDisposable
    {
        #region Windows API
        [System.Runtime.InteropServices.DllImport("kernel32")]
        public static extern int GetPrivateProfileString(string sAppName, string sKeyName, string sDefault, StringBuilder sReturnedString, int nSize, string sFileName);
 
        [System.Runtime.InteropServices.DllImport("kernel32")]
        public static extern int WritePrivateProfileString(string sAppName, string sKeyName, string sValue, string sFileName);
        #endregion
 
        private StringBuilder str = new StringBuilder(null);
 
 
 
 
        public void Dispose()
        {
 
        }
 
 
 
        public void writeConfig(string treeName, string contentName, string value, string filePath)
        {
            WritePrivateProfileString(treeName, contentName, value, filePath);
        }
 
        public string readConfig(string treeName, string contentName, string filePath)
        {
            str.Clear();
            GetPrivateProfileString(treeName, contentName, null, str, 1024, filePath);
 
            return str.ToString();
        }
 
    }
}
 
cs