markus / MarkusLogview / LICENSE_GENERATOR / Form1.cs @ 84578b97
이력 | 보기 | 이력해설 | 다운로드 (2.91 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.ComponentModel; |
4 |
using System.Data; |
5 |
using System.Drawing; |
6 |
using System.IO; |
7 |
using System.Linq; |
8 |
using System.Text; |
9 |
using System.Threading.Tasks; |
10 |
using System.Windows.Forms; |
11 |
using System.Xml.Linq; |
12 |
|
13 |
namespace LICENSE_GENERATOR |
14 |
{ |
15 |
public partial class Form1 : Form |
16 |
{ |
17 |
public Form1() |
18 |
{ |
19 |
InitializeComponent(); |
20 |
} |
21 |
|
22 |
private void Form1_Load(object sender, EventArgs e) |
23 |
{ |
24 |
|
25 |
} |
26 |
|
27 |
private void button1_Click(object sender, EventArgs e) |
28 |
{ |
29 |
|
30 |
XElement license = new XElement("LICENSE", |
31 |
|
32 |
new XElement("IS_ENCRYPT", |
33 |
new XElement("id", "isEncrypt"), |
34 |
new XElement("value", "false") |
35 |
), |
36 |
new XElement("LICENSE_KEY", |
37 |
new XElement("id", "KEY_HASH_A"), |
38 |
new XElement("value", "0") |
39 |
), |
40 |
new XElement("LICENSE_KEY", |
41 |
new XElement("id", "KEY_HASH_B"), |
42 |
new XElement("value", "0") |
43 |
), |
44 |
new XElement("LICENSE_KEY", |
45 |
new XElement("id", "KEY_HASH_C"), |
46 |
new XElement("value", "0") |
47 |
), |
48 |
//new XElement("LICENSE_COUNT", |
49 |
// new XElement("id", "ADMIN"), |
50 |
// new XElement("value", "10") |
51 |
//), |
52 |
//new XElement("LICENSE_COUNT", |
53 |
// new XElement("id", "DOFTECH"), |
54 |
// new XElement("value", "5") |
55 |
//), |
56 |
//new XElement("LICENSE_COUNT", |
57 |
// new XElement("id", "DAELIM"), |
58 |
// new XElement("value", "5") |
59 |
//), |
60 |
//new XElement("LICENSE_COUNT", |
61 |
// new XElement("id", "LG"), |
62 |
// new XElement("value", "5") |
63 |
//), |
64 |
new XElement("LICENSE_COUNT", |
65 |
new XElement("id", "ADMIN"), |
66 |
new XElement("value", textBox1.Text) |
67 |
), |
68 |
new XElement("LICENSE_UPDATE_TIME", |
69 |
new XElement("id", "TIME"), |
70 |
new XElement("value", "3") |
71 |
), |
72 |
new XElement("LICENSE_LIMIT_TIME", |
73 |
new XElement("id", "TIME"), |
74 |
new XElement("value", "1") |
75 |
) |
76 |
|
77 |
); |
78 |
|
79 |
|
80 |
if (!Directory.Exists("C:\\Users\\cms09\\Desktop\\Project\\licenseModel")) |
81 |
{ |
82 |
Directory.CreateDirectory("C:\\Users\\cms09\\Desktop\\Project\\licenseModel"); |
83 |
} |
84 |
|
85 |
license.Save("C:\\Users\\cms09\\Desktop\\Project\\licenseModel\\license.xml"); |
86 |
|
87 |
MessageBox.Show("생성 성공!"); |
88 |
|
89 |
} |
90 |
|
91 |
} |
92 |
} |