개정판 f14b4e3b
dev issue #507 : VentDrain Modeling
Change-Id: I52725feb0cbdaf38b0a6cb8dad5f0e4848d7b50a
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
30 | 30 |
public partial class ConverterDocking : UserControl |
31 | 31 |
{ |
32 | 32 |
Ingr.RAD2D.Application application; |
33 |
static bool addEvent = false; |
|
33 | 34 |
public ConverterDocking() |
34 | 35 |
{ |
35 | 36 |
InitializeComponent(); |
... | ... | |
52 | 53 |
_ProjectInfo.Port = Settings.Default.ProjectPort; |
53 | 54 |
_ProjectInfo.DBUser = Settings.Default.ProjectDBUser; |
54 | 55 |
_ProjectInfo.DBPassword = Settings.Default.ProjectDBPassword; |
56 |
|
|
57 |
if (!addEvent) |
|
58 |
{ |
|
59 |
application.EventObject.BeforeApplicationExit += ApplicationEvents_ApplicationExit; |
|
60 |
addEvent = true; |
|
61 |
} |
|
55 | 62 |
} |
56 | 63 |
catch (Exception ex) |
57 | 64 |
{ |
... | ... | |
216 | 223 |
} |
217 | 224 |
|
218 | 225 |
#region TEST |
226 |
private void ApplicationEvents_ApplicationExit(out bool cancel) |
|
227 |
{ |
|
228 |
application.Documents.Close(); |
|
229 |
//SheetWindow sheetWindow = application.ActiveWindow; |
|
230 |
cancel = false; |
|
231 |
} |
|
232 |
|
|
219 | 233 |
private void simpleButton1_Click(object sender, EventArgs e) |
220 | 234 |
{ |
235 |
int z = application.RunningCommand; |
|
236 |
|
|
221 | 237 |
foreach (RADObject item in application.ActiveDocument.SelectSet) |
222 | 238 |
{ |
223 | 239 |
DependencyObject dependencyObject = item as DependencyObject; |
... | ... | |
239 | 255 |
symbol2D.Range(out minX, out minY, out maxX, out maxY); |
240 | 256 |
} |
241 | 257 |
} |
242 |
|
|
243 |
|
|
258 |
int pid = 0; |
|
259 |
GetWindowThreadProcessId((IntPtr)application.HWnd, out pid); |
|
244 | 260 |
|
245 | 261 |
return; |
246 | 262 |
Thread outThread = new Thread(func2 => |
내보내기 Unified diff