개정판 8562d7dc
dev issue #1228 : project info instance 수정
Change-Id: I10814cbad7b00860649805cd6ddd4d6dd103422e
DTI_PID/APIDConverter/PIDCustomization.cs | ||
---|---|---|
20 | 20 |
using Autodesk.AutoCAD.Runtime; |
21 | 21 |
using Autodesk.AutoCAD.Windows; |
22 | 22 |
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application; |
23 |
using AVEVA.PID.CustomizationUtility.DB; |
|
24 |
using AVEVA.PID.CustomizationUtility.Model; |
|
25 |
using AVEVA.PID.CustomizationUtility.Properties; |
|
26 |
|
|
23 | 27 |
#endregion using namespaces |
24 | 28 |
namespace AVEVA.PID.CustomizationUtility |
25 | 29 |
{ |
... | ... | |
117 | 121 |
ProjectForm form = new ProjectForm(); |
118 | 122 |
if (AcadApp.ShowModalDialog(form) == DialogResult.OK) |
119 | 123 |
{ |
124 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
|
125 |
_ProjectInfo.DefaultPath = Settings.Default.ProjectPath; |
|
126 |
_ProjectInfo.DBType = (ID2DB_Type)Settings.Default.ProjectDBType; |
|
127 |
_ProjectInfo.ServerIP = Settings.Default.ProjectServerIP; |
|
128 |
_ProjectInfo.Port = Settings.Default.ProjectPort; |
|
129 |
_ProjectInfo.DBUser = Settings.Default.ProjectDBUser; |
|
130 |
_ProjectInfo.DBPassword = Settings.Default.ProjectDBPassword; |
|
120 | 131 |
|
132 |
if (Project_DB.ConnTestAndCreateTable()) |
|
133 |
{ |
|
134 |
_ProjectInfo.Enable = true; |
|
135 |
MessageBox.Show("Success project setting", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Information); |
|
136 |
} |
|
137 |
else |
|
138 |
{ |
|
139 |
_ProjectInfo.Enable = false; |
|
140 |
MessageBox.Show("Fail project setting", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
141 |
} |
|
142 |
|
|
121 | 143 |
} |
122 | 144 |
} |
123 | 145 |
[CommandMethod("MappingForm")] |
... | ... | |
314 | 336 |
{ |
315 | 337 |
if (objIdBlockId != ObjectId.Null) |
316 | 338 |
{ |
317 |
Document doc = AcadApp.DocumentManager.MdiActiveDocument; |
|
339 |
Autodesk.AutoCAD.ApplicationServices.Document doc = AcadApp.DocumentManager.MdiActiveDocument;
|
|
318 | 340 |
Database db = HostApplicationServices.WorkingDatabase; |
319 | 341 |
trans = doc.TransactionManager.StartTransaction(); |
320 | 342 |
using (doc.LockDocument()) |
내보내기 Unified diff