root / HServer / 01.Manager / 00.Program / Manager / DBServer.cs @ 50
이력 | 보기 | 이력해설 | 다운로드 (931 Bytes)
| 1 |
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 |
|
| 32 |
Console.WriteLine("arguments : " + arguments);
|
| 33 |
|
| 34 |
SetProcess(path, arguments); |
| 35 |
StartProcess(); |
| 36 |
} |
| 37 |
} |
| 38 |
} |
| 39 |
} |