프로젝트

일반

사용자정보

통계
| 개정판:

hytos / DTI_PID / SPPIDConverter / AutoModeling_OPC.cs @ 224535bb

이력 | 보기 | 이력해설 | 다운로드 (1.85 KB)

1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Data;
7
using Llama;
8
using Plaice;
9
using Ingr.RAD2D.Interop.RAD2D;
10
using Ingr.RAD2D.Internal;
11
using Ingr.RAD2D.Helper;
12
using Converter.BaseModel;
13
using Converter.SPPID.Model;
14
using Converter.SPPID.Properties;
15
using Converter.SPPID.Util;
16
using Converter.SPPID.DB;
17
using Ingr.RAD2D.MacroControls.CmdCtrl;
18
using Ingr.RAD2D;
19
using System.Windows;
20
using System.Threading;
21
using System.Drawing;
22
using Microsoft.VisualBasic;
23
using Newtonsoft.Json;
24

    
25
using DevExpress.XtraSplashScreen;
26
namespace Converter.SPPID
27
{
28
    public class AutoModeling_OPC
29
    {
30
        Placement _placement;
31
        LMADataSource dataSource;
32
        dynamic application;
33
        string SPPID_DrawingName;
34
        Ingr.RAD2D.Application radApp;
35
        SPPID_Document document;
36

    
37
        public AutoModeling_OPC(SPPID_Document document, dynamic application, Ingr.RAD2D.Application radApp, string SPPID_DrawingName)
38
        {
39
            this.document = document;
40
            this.application = application;
41
            this.radApp = radApp;
42
            this.SPPID_DrawingName = SPPID_DrawingName;
43
        }
44

    
45
        public void Run()
46
        {
47
            Placement _placement = new Placement();
48
            LMADataSource dataSource = _placement.PIDDataSource;
49

    
50

    
51

    
52

    
53

    
54

    
55

    
56

    
57

    
58
            ReleaseCOMObjects(_placement);
59
            ReleaseCOMObjects(dataSource);
60
        }
61

    
62
        public void ReleaseCOMObjects(params object[] objVars)
63
        {
64
            int intNewRefCount = 0;
65
            foreach (object obj in objVars)
66
            {
67
                if (!Information.IsNothing(obj) && System.Runtime.InteropServices.Marshal.IsComObject(obj))
68
                    intNewRefCount = intNewRefCount + System.Runtime.InteropServices.Marshal.FinalReleaseComObject(obj);
69
            }
70
        }
71
    }
72
}
클립보드 이미지 추가 (최대 크기: 500 MB)