프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

hytos / DTI_PID / APIDConverter / APIDConverterExplorer.cs @ 14540282

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

1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Drawing;
5
using System.Data;
6
using System.Linq;
7
using System.Text;
8
using System.Threading.Tasks;
9
using System.Windows.Forms;
10

    
11
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
12
using AVEVA.PID.CustomizationUtility.DB;
13
using AVEVA.PID.CustomizationUtility.Model;
14
using AVEVA.PID.CustomizationUtility.Properties;
15

    
16
namespace AVEVA.PID.CustomizationUtility
17
{
18
    public partial class APIDConverterExplorer : UserControl
19
    {
20
        public APIDConverterExplorer()
21
        {
22
            InitializeComponent();
23

    
24
            Autodesk.AutoCAD.Interop.AcadApplication acadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication as Autodesk.AutoCAD.Interop.AcadApplication;
25
            Autodesk.AutoCAD.Interop._DAcadApplicationEvents_NewDrawingEventHandler handler = new Autodesk.AutoCAD.Interop._DAcadApplicationEvents_NewDrawingEventHandler(CommandEnded);
26
            acadApplication.NewDrawing += handler;
27
        }
28
        public static void CommandEnded()
29
        {
30

    
31
        }
32

    
33
        private void btnOpenConverter_Click(object sender, EventArgs e)
34
        {
35
            APIDConverter form = new APIDConverter();
36
            if (AcadApp.ShowModalDialog(form) == DialogResult.OK)
37
            {
38
                foreach (var item in form.Documents)
39
                {
40
                    AutoModeling autoModeling = new AutoModeling(item);
41
                    autoModeling.Run();
42
                }
43
            }
44
        }
45
    }
46
}
클립보드 이미지 추가 (최대 크기: 500 MB)