hrz_sv / 01.Manager / 00.Program / Manager / DBServer.cs
이력 | 보기 | 이력해설 | 다운로드 (931 Bytes)
1 | 37 | HKM | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | using System.Windows.Forms; |
||
7 | |||
8 | namespace Manager |
||
9 | { |
||
10 | public class DBServer : Process_Cmd |
||
11 | { |
||
12 | #region [ Variable ] |
||
13 | public string path = @"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe"; |
||
14 | public string arguments = " --dbpath C:/Users/spboy/test"; |
||
15 | #endregion |
||
16 | |||
17 | public DBServer() |
||
18 | { |
||
19 | } |
||
20 | |||
21 | public void Connect_DBServer() |
||
22 | { |
||
23 | // 기존 연결을 끊어준다. |
||
24 | if (isProcessAlive) |
||
25 | { |
||
26 | ExitProcess(); |
||
27 | } |
||
28 | // 새 연결을 해준다. |
||
29 | else |
||
30 | { |
||
31 | 39 | HKM | |
32 | Console.WriteLine("arguments : " + arguments); |
||
33 | |||
34 | SetProcess(path, arguments); |
||
35 | 37 | HKM | StartProcess(); |
36 | } |
||
37 | } |
||
38 | } |
||
39 | } |