개정판 09f99113
dev issue #000 : edit License
Change-Id: I0949d1162be453a38a14dbf67dcfa26e657c5595
DTI_PID/SPPIDConverter/License.cs | ||
---|---|---|
22 | 22 |
RegistryKey key = Registry.LocalMachine; |
23 | 23 |
RegistryKey software = key.OpenSubKey("SOFTWARE"); |
24 | 24 |
RegistryKey DOFTECH = software.OpenSubKey("DOFTECH"); |
25 |
RegistryKey SPPIDConverter = DOFTECH.OpenSubKey("SPPIDConverter"); |
|
25 |
RegistryKey SPPIDConverter = DOFTECH.OpenSubKey("SPPIDConverter", true);
|
|
26 | 26 |
path = SPPIDConverter.GetValue("path") + "licenses.licx"; |
27 | 27 |
if (File.Exists(path)) |
28 | 28 |
{ |
... | ... | |
34 | 34 |
|
35 | 35 |
if (string.IsNullOrEmpty(data)) |
36 | 36 |
{ |
37 |
data = "Date:" + DateTime.Today.ToShortDateString(); |
|
38 |
data = Crypt.encrypt(data, "dof1073#"); |
|
39 |
File.WriteAllText(path, data); |
|
40 |
result = true; |
|
37 |
if (SPPIDConverter.GetValue("Version") == null) |
|
38 |
{ |
|
39 |
SPPIDConverter.SetValue("Version", "U"); |
|
40 |
data = "Date:" + DateTime.Today.ToShortDateString(); |
|
41 |
data = Crypt.encrypt(data, "dof1073#"); |
|
42 |
File.WriteAllText(path, data); |
|
43 |
result = true; |
|
44 |
} |
|
41 | 45 |
} |
42 | 46 |
else |
43 | 47 |
{ |
... | ... | |
45 | 49 |
DateTime currentTime = DateTime.Now; |
46 | 50 |
if (DateTime.TryParse(data, out dataTime) && DateTime.Compare(dataTime.AddDays(7), currentTime) >= 0) |
47 | 51 |
result = true; |
52 |
|
|
48 | 53 |
} |
49 | 54 |
} |
50 | 55 |
else if (data.StartsWith("Absolute:")) |
내보내기 Unified diff