프로젝트

일반

사용자정보

개정판 f1232880

IDf1232880ad709316ee6e8d909637464a625d90d9
상위 ec1279b0
하위 aceeb2a6, 5e6ecf05

gaqhf 이(가) 약 6년 전에 추가함

dev issue #000 : add file

Change-Id: I9e0c0471a8cce23e3053b0dc0fe69cb755779f7e

차이점 보기:

DTI_PID/BaseModel/Model/TrimLine.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Converter.BaseModel
8
{
9
    public class TrimLine
10
    {
11
        private string _UID;
12
        private string _TEXT;
13
        private string _LOCATION;
14
        private string _WIDTH;
15
        private string _HEIGHT;
16
        private double _ANGLE;
17
        private string _AREA;
18
        private List<LineRun> _RUNS = new List<LineRun>();
19
        private List<Property> _PROPERTIES = new List<Property>();
20
        private List<Attribute> _ATTRIBUTES = new List<Attribute>();
21

  
22
        public string UID { get => _UID; set => _UID = value; }
23
        public string TEXT { get => _TEXT; set => _TEXT = value; }
24
        public string LOCATION { get => _LOCATION; set => _LOCATION = value; }
25
        public string WIDTH { get => _WIDTH; set => _WIDTH = value; }
26
        public string HEIGHT { get => _HEIGHT; set => _HEIGHT = value; }
27
        public double ANGLE { get => _ANGLE; set => _ANGLE = value; }
28
        public string AREA { get => _AREA; set => _AREA = value; }
29
        public List<LineRun> RUNS { get => _RUNS; set => _RUNS = value; }
30
        public List<Property> PROPERTIES { get => _PROPERTIES; set => _PROPERTIES = value; }
31
        public List<Attribute> ATTRIBUTES { get => _ATTRIBUTES; set => _ATTRIBUTES = value; }
32
    }
33
}
DTI_PID/DTI_PID.sln
7 7
EndProject
8 8
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDF_TO_IMAGE", "PDF_TO_IMAGE\PDF_TO_IMAGE.csproj", "{B7B8B0AE-9F03-4543-BC05-813A25E9D584}"
9 9
EndProject
10
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPPIDConverter_Wrapper", "SPPIDConverter_DialogBarWrapper\SPPIDConverter_Wrapper.csproj", "{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}"
11
EndProject
12 10
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BaseModel", "BaseModel\BaseModel.csproj", "{BEEC4A21-BD63-40D2-B745-027B19241A70}"
13 11
EndProject
14 12
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPPIDConverter", "SPPIDConverter\SPPIDConverter.csproj", "{B6757E78-6B59-40A3-A7BB-E73E8F81B6C3}"
15 13
EndProject
16
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPPIDConverter_CustomCommand", "SPPIDConverter_CustomCommand\SPPIDConverter_CustomCommand.csproj", "{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}"
14
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPPIDConverter_Wrapper", "SPPIDConverter_DialogBarWrapper\SPPIDConverter_Wrapper.csproj", "{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}"
17 15
EndProject
18 16
Global
19 17
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
......
35 33
		{B7B8B0AE-9F03-4543-BC05-813A25E9D584}.Release|Any CPU.Build.0 = Release|Any CPU
36 34
		{B7B8B0AE-9F03-4543-BC05-813A25E9D584}.Release|x86.ActiveCfg = Release|x86
37 35
		{B7B8B0AE-9F03-4543-BC05-813A25E9D584}.Release|x86.Build.0 = Release|x86
38
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
40
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|x86.ActiveCfg = Debug|x86
41
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|x86.Build.0 = Debug|x86
42
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
43
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|Any CPU.Build.0 = Release|Any CPU
44
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|x86.ActiveCfg = Release|x86
45
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|x86.Build.0 = Release|x86
46 36
		{BEEC4A21-BD63-40D2-B745-027B19241A70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 37
		{BEEC4A21-BD63-40D2-B745-027B19241A70}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 38
		{BEEC4A21-BD63-40D2-B745-027B19241A70}.Debug|x86.ActiveCfg = Debug|x86
......
59 49
		{B6757E78-6B59-40A3-A7BB-E73E8F81B6C3}.Release|Any CPU.Build.0 = Release|Any CPU
60 50
		{B6757E78-6B59-40A3-A7BB-E73E8F81B6C3}.Release|x86.ActiveCfg = Release|x86
61 51
		{B6757E78-6B59-40A3-A7BB-E73E8F81B6C3}.Release|x86.Build.0 = Release|x86
62
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
64
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Debug|x86.ActiveCfg = Debug|Any CPU
65
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Debug|x86.Build.0 = Debug|Any CPU
66
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
67
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Release|Any CPU.Build.0 = Release|Any CPU
68
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Release|x86.ActiveCfg = Release|Any CPU
69
		{4B35A8E9-DBE4-4D2E-8555-1CD5CB907D2D}.Release|x86.Build.0 = Release|Any CPU
52
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
53
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
54
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|x86.ActiveCfg = Debug|x86
55
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|x86.Build.0 = Debug|x86
56
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
57
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|Any CPU.Build.0 = Release|Any CPU
58
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|x86.ActiveCfg = Release|x86
59
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|x86.Build.0 = Release|x86
70 60
	EndGlobalSection
71 61
	GlobalSection(SolutionProperties) = preSolution
72 62
		HideSolutionNode = FALSE
DTI_PID/SPPIDConverter/ConverterForm.Designer.cs
29 29
        private void InitializeComponent()
30 30
        {
31 31
            this.components = new System.ComponentModel.Container();
32
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConverterForm));
32 33
            this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
33 34
            this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl();
34 35
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
......
65 66
            this.splitterItem1 = new DevExpress.XtraLayout.SplitterItem();
66 67
            this.xtraFolderBrowserDialog = new DevExpress.XtraEditors.XtraFolderBrowserDialog(this.components);
67 68
            this.xtraOpenFileDialog = new DevExpress.XtraEditors.XtraOpenFileDialog(this.components);
69
            this.commandControl = new Ingr.RAD2D.MacroControls.CmdCtrl.IgCommand();
68 70
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
69 71
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
70 72
            this.layoutControl1.SuspendLayout();
......
95 97
            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem3)).BeginInit();
96 98
            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem4)).BeginInit();
97 99
            ((System.ComponentModel.ISupportInitialize)(this.splitterItem1)).BeginInit();
100
            ((System.ComponentModel.ISupportInitialize)(this.commandControl)).BeginInit();
98 101
            this.SuspendLayout();
99 102
            // 
100 103
            // defaultLookAndFeel
......
497 500
            this.xtraOpenFileDialog.Filter = "Xml Files(*.xml)|*.xml";
498 501
            this.xtraOpenFileDialog.Multiselect = true;
499 502
            // 
503
            // commandControl
504
            // 
505
            this.commandControl.Enabled = true;
506
            this.commandControl.Location = new System.Drawing.Point(193, -1);
507
            this.commandControl.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
508
            this.commandControl.Name = "commandControl";
509
            this.commandControl.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("commandControl.OcxState")));
510
            this.commandControl.Size = new System.Drawing.Size(28, 28);
511
            this.commandControl.TabIndex = 3;
512
            this.commandControl.Activate += new System.EventHandler(this.commandControl_Activate);
513
            this.commandControl.Deactivate += new System.EventHandler(this.commandControl_Deactivate);
514
            this.commandControl.Terminate += new System.EventHandler(this.commandControl_Terminate);
515
            this.commandControl.Initialize += new System.EventHandler(this.commandControl_Initialize);
516
            // 
500 517
            // ConverterForm
501 518
            // 
502 519
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
503 520
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
504 521
            this.ClientSize = new System.Drawing.Size(1226, 593);
522
            this.Controls.Add(this.commandControl);
505 523
            this.Controls.Add(this.layoutControl1);
506 524
            this.Controls.Add(this.ribbonControl);
507 525
            this.Name = "ConverterForm";
......
509 527
            this.ShowIcon = false;
510 528
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
511 529
            this.Text = "SPPID Converter";
530
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConverterForm_FormClosing);
512 531
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit();
513 532
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
514 533
            this.layoutControl1.ResumeLayout(false);
......
539 558
            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem3)).EndInit();
540 559
            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem4)).EndInit();
541 560
            ((System.ComponentModel.ISupportInitialize)(this.splitterItem1)).EndInit();
561
            ((System.ComponentModel.ISupportInitialize)(this.commandControl)).EndInit();
542 562
            this.ResumeLayout(false);
543 563
            this.PerformLayout();
544 564

  
......
581 601
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
582 602
        private DevExpress.XtraEditors.XtraFolderBrowserDialog xtraFolderBrowserDialog;
583 603
        private DevExpress.XtraEditors.XtraOpenFileDialog xtraOpenFileDialog;
604
        public Ingr.RAD2D.MacroControls.CmdCtrl.IgCommand commandControl;
584 605
    }
585 606
}
DTI_PID/SPPIDConverter/ConverterForm.cs
58 58
            InitID2Project();
59 59
        }
60 60

  
61
        #region
62
        /// <summary>
63
        /// The Activate Event is where the command should show its form
64
        /// if it should be displayed.
65
        /// </summary>
66
        /// <param name="sender">The sender of the event</param>
67
        /// <param name="e">Arguments passed during event</param>
68
        private void commandControl_Activate(object sender, EventArgs e)
69
        {
70
            if (ShowDialog() == DialogResult.OK)
71
            {
72

  
73
            }
74

  
75
            foreach (var item in commandControl.Application.RADApplication.ActiveSelectSet)
76
            {
77
                //MessageBox.Show(item.GetType());
78
                int count = ((Ingr.RAD2D.LineStringGeometry2d)((Ingr.RAD2D.DependencyObject)item).GetGeometry()).VertexCount;
79
                double[] iii = null;
80
                ((Ingr.RAD2D.LineStringGeometry2d)((Ingr.RAD2D.DependencyObject)item).GetGeometry()).GetVertices(ref count, ref iii);
81
                for (int i = 0; i < count; i++)
82
                {
83
                    double x = 0;
84
                    double y = 0;
85
                    ((Ingr.RAD2D.LineStringGeometry2d)((Ingr.RAD2D.DependencyObject)item).GetGeometry()).GetVertex(i + 1, ref x, ref y);
86

  
87
                }
88
                Ingr.RAD2D.Symbol2d symbol2D;
89
                //symbol2D.Move
90
            }
91

  
92
            //commandControl.Application.RADApplication.Interactive = true;
93
            //Hide();
94
            //commandControl.Done = true;
95
        }
96

  
97
        /// <summary>
98
        /// The Deactivate event is where the command should hide its form if it
99
        /// was displayed.  The command should not unload the form here.
100
        /// The command's form should be unloaded in the Class Module Terminate event.
101
        /// </summary>
102
        /// <param name="sender">The sender of the event</param>
103
        /// <param name="e">Arguments passed during event</param>
104
        private void commandControl_Deactivate(object sender, EventArgs e)
105
        {
106
            Hide();
107
        }
108

  
109
        /// <summary>
110
        /// The Initialize event is where the command should perform 1 time 
111
        /// initialization, for example it might save a reference to the 
112
        /// active document in private global data.
113
        /// </summary>
114
        /// <param name="sender">The sender of the event</param>
115
        /// <param name="e">Arguments passed during event</param>
116
        private void commandControl_Initialize(object sender, EventArgs e)
117
        {
118

  
119
        }
120

  
121
        /// <summary>
122
        /// The Terminate event is where the command can clean up any command
123
        /// specific allocated resources.
124
        /// </summary>
125
        /// <param name="sender">The sender of the event</param>
126
        /// <param name="e">Arguments passed during event</param>
127
        public void commandControl_Terminate(object sender, EventArgs e)
128
        {
129

  
130
        }
131

  
132
        /// <summary>
133
        /// The primary form should not simply be unloaded. You should set the
134
        /// Intergraph Command Control Done property to True when you want the 
135
        /// form to be unloaded. Then unload the form in the dispose method.
136
        /// </summary>
137
        /// <param name="sender">The sender of the event</param>
138
        /// <param name="e">Arguments passed during event</param>
139
        private void ConverterForm_FormClosing(object sender, FormClosingEventArgs e)
140
        {
141
            Hide();
142
            commandControl.Done = true;
143
            e.Cancel = true; //Do not let C# close out the form ... Let RAD close it.
144
        }
145
        #endregion
146

  
61 147
        private void InitUsedDataTable()
62 148
        {
63 149
            // Converter Table
DTI_PID/SPPIDConverter/ConverterForm.resx
126 126
  <metadata name="xtraOpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127 127
    <value>367, 17</value>
128 128
  </metadata>
129
  <data name="commandControl.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
130
    <value>
131
        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
132
        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
133
        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJwAAAAIB
134
        AAAAAQAAAAAAAAAAAAAAABIAAAAFAAIAUQIAAFECAAAAAAAAAQEL
135
</value>
136
  </data>
129 137
</root>
DTI_PID/SPPIDConverter/MainWrapper.Designer.cs
1
namespace Converter.SPPID
2
{
3
    partial class MainWrapper
4
    {
5
        /// <summary> 
6
        /// 필수 디자이너 변수입니다.
7
        /// </summary>
8
        private System.ComponentModel.IContainer components = null;
9

  
10
        /// <summary> 
11
        /// 사용 중인 모든 리소스를 정리합니다.
12
        /// </summary>
13
        /// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
14
        protected override void Dispose(bool disposing)
15
        {
16
            if (disposing && (components != null))
17
            {
18
                components.Dispose();
19
            }
20
            base.Dispose(disposing);
21
        }
22

  
23
        #region 구성 요소 디자이너에서 생성한 코드
24

  
25
        /// <summary> 
26
        /// 디자이너 지원에 필요한 메서드입니다. 
27
        /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
28
        /// </summary>
29
        private void InitializeComponent()
30
        {
31
            this.SuspendLayout();
32
            // 
33
            // MainWrapper
34
            // 
35
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
36
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37
            this.Name = "MainWrapper";
38
            this.Size = new System.Drawing.Size(185, 190);
39
            this.ResumeLayout(false);
40

  
41
        }
42

  
43
        #endregion
44
    }
45
}
DTI_PID/SPPIDConverter/MainWrapper.cs
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.Threading;
10
using System.Windows.Forms;
11
using Converter.SPPID.Model;
12
namespace Converter.SPPID
13
{
14
    public partial class MainWrapper : UserControl
15
    {
16
        public MainWrapper()
17
        {
18
            InitializeComponent();
19
        }
20

  
21
        Thread thread;
22

  
23
        public void ShowDialog()
24
        {
25
            ConverterForm form = new ConverterForm();
26
            if (form.ShowDialog() == DialogResult.OK)
27
            {
28
                List<SPPID_Document> documents = form.Documents;
29
                //dynamic application = Interaction.GetObject("", "PIDAutomation.Application");
30
                //dynamic newDrawing = application.Drawings.Add(sUnit, sTemplate, sDrawingNumber, sDrawingName);
31

  
32
                thread = new Thread(func =>
33
                {
34
                    CloseOPCForm.Run();
35
                    try
36
                    {
37
                        foreach (SPPID_Document document in documents)
38
                        {
39
                            AutoModeling autoModeling = new AutoModeling(document);
40
                            autoModeling.Run();
41
                        }
42
                    }
43
                    catch (Exception ex)
44
                    {
45
                        MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
46
                    }
47
                    CloseOPCForm.Stop();
48

  
49
                });
50
                thread.Start();
51
            }
52
        }
53
    }
54
}
DTI_PID/SPPIDConverter/SPPIDConverter.csproj
5 5
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 6
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7 7
    <ProjectGuid>{B6757E78-6B59-40A3-A7BB-E73E8F81B6C3}</ProjectGuid>
8
    <OutputType>WinExe</OutputType>
8
    <OutputType>Library</OutputType>
9 9
    <AppDesignerFolder>Properties</AppDesignerFolder>
10 10
    <RootNamespace>Converter.SPPID</RootNamespace>
11 11
    <AssemblyName>SPPIDConverter</AssemblyName>
......
60 60
  <PropertyGroup>
61 61
    <GenerateManifests>false</GenerateManifests>
62 62
  </PropertyGroup>
63
  <PropertyGroup>
64
    <ApplicationManifest>Properties\app.manifest</ApplicationManifest>
65
  </PropertyGroup>
63
  <PropertyGroup />
66 64
  <ItemGroup>
67 65
    <Reference Include="DevExpress.Data.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
68 66
    <Reference Include="DevExpress.Dialogs.v18.2.Core, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
......
97 95
      <SpecificVersion>False</SpecificVersion>
98 96
      <HintPath>C:\Program Files (x86)\SmartPlant\P&amp;ID Workstation\bin\RadNetAutomation.dll</HintPath>
99 97
    </Reference>
98
    <Reference Include="RadNetCmdCtrl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5f600089cf0eaec9, processorArchitecture=MSIL">
99
      <SpecificVersion>False</SpecificVersion>
100
      <HintPath>C:\Program Files (x86)\SmartPlant\P&amp;ID Workstation\bin\RadNetCmdCtrl.dll</HintPath>
101
    </Reference>
100 102
    <Reference Include="System" />
101 103
    <Reference Include="System.ComponentModel.DataAnnotations" />
102 104
    <Reference Include="System.Core" />
......
138 140
    <Compile Include="Form\UnitForm.Designer.cs">
139 141
      <DependentUpon>UnitForm.cs</DependentUpon>
140 142
    </Compile>
141
    <Compile Include="MainWrapper.cs">
142
      <SubType>UserControl</SubType>
143
    </Compile>
144
    <Compile Include="MainWrapper.Designer.cs">
145
      <DependentUpon>MainWrapper.cs</DependentUpon>
146
    </Compile>
147 143
    <Compile Include="Model\ETCSetting.cs" />
148 144
    <Compile Include="Model\Group.cs" />
149 145
    <Compile Include="Model\LineNumberMapping.cs" />
......
151 147
    <Compile Include="Model\LineMapping.cs" />
152 148
    <Compile Include="Model\AssociationMapping.cs" />
153 149
    <Compile Include="Model\SymbolMapping.cs" />
154
    <Compile Include="Program.cs" />
155 150
    <Compile Include="Properties\AssemblyInfo.cs" />
156 151
    <Compile Include="Properties\Msg.Designer.cs">
157 152
      <AutoGen>True</AutoGen>
......
174 169
      <DependentUpon>Settings.settings</DependentUpon>
175 170
    </Compile>
176 171
    <Compile Include="Settings.cs" />
172
    <Compile Include="SPPIDConverter_AutoModeling.cs" />
177 173
    <Compile Include="Util\SPPIDUtil.cs" />
178 174
  </ItemGroup>
179 175
  <ItemGroup>
......
189 185
    <EmbeddedResource Include="Form\UnitForm.resx">
190 186
      <DependentUpon>UnitForm.cs</DependentUpon>
191 187
    </EmbeddedResource>
192
    <EmbeddedResource Include="MainWrapper.resx">
193
      <DependentUpon>MainWrapper.cs</DependentUpon>
194
    </EmbeddedResource>
195 188
    <EmbeddedResource Include="Properties\licenses.licx" />
196 189
    <EmbeddedResource Include="Properties\Resources.resx">
197 190
      <Generator>ResXFileCodeGenerator</Generator>
......
255 248
  </ItemGroup>
256 249
  <ItemGroup>
257 250
    <None Include="packages.config" />
258
    <None Include="Properties\app.manifest" />
259 251
    <None Include="Properties\Settings.settings">
260 252
      <Generator>SettingsSingleFileGenerator</Generator>
261 253
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
DTI_PID/SPPIDConverter/SPPIDConverter_AutoModeling.cs
1
/*---------------------------------------------------------------------+\
2
|                                                                       |
3
|        Copyright 2016 Intergraph Corporation                          |
4
|        All Rights Reserved                                            |
5
|                                                                       |
6
|        Including software, file formats, and audio-visual displays;   |
7
|        may only be used pursuant to applicable software license       |
8
|        agreement; contains confidential and proprietary information of|
9
|        Intergraph and/or third parties which is protected by copyright|
10
|        and trade secret law and may not be provided or otherwise made |
11
|        available without proper authorization.                        |
12
|                                                                       |
13
|        Unpublished -- rights reserved under the Copyright Laws of the |
14
|        United States.                                                 |
15
|                                                                       |
16
|        Intergraph Corporation                                         |
17
|        Huntsville, Alabama         35894-0001                         |
18
|                                                                       |
19
\+---------------------------------------------------------------------*/
20

  
21
using System;
22

  
23
namespace Converter.SPPID
24
{
25
    /// <summary>
26
    /// This command class is the mechanism by which the Intergraph application
27
    /// communicates with the command.
28
    /// </summary>
29
    public class SPPIDConverter_AutoModeling : IDisposable
30
    {
31
        /// <remarks>
32
        /// Declare the form as member data of this class such that each new
33
        /// instance of the command gets its own form.
34
        /// </remarks>
35
        private ConverterForm run;
36

  
37
        /// <summary>
38

  
39
        /// Initialize the class and use the member form such that each new 
40
        /// instance of the command gets it own form.
41
        /// </summary>
42
        public SPPIDConverter_AutoModeling()
43
        {
44
            run = new ConverterForm();
45
        }
46

  
47
        /// <summary>
48
        /// This function lets the Intergraph application communicate with the command.
49
        /// </summary>
50
        /// <param name="basicCommand">The basic command.</param>
51
        public void Command_Initialize(object basicCommand)
52
        {
53
            run.commandControl.Command = basicCommand;
54
        }
55

  
56
        /// <summary>
57
        /// Gets the description.
58
        /// </summary>
59
        /// <value>
60
        /// The description of the command as assigned in the resources file.
61
        /// </value>
62
        public string Description
63
        {
64
            get
65
            {
66
                return ""; //Properties.Resources.ResourceManager.GetString("Description", System.Globalization.CultureInfo.CurrentCulture);
67
            }
68
        }
69

  
70
        /// <summary>
71
        /// Gets the tooltip of the command.
72
        /// </summary>
73
        /// <value>
74
        /// The tooltip of the command as assigned in the resources file.
75
        /// </value>
76
        public string GetTooltip
77
        {
78
            get
79
            {
80
                return "";// Properties.Resources.ResourceManager.GetString("Tooltip", System.Globalization.CultureInfo.CurrentCulture);
81
            }
82
        }
83

  
84
        /// <summary>
85
        /// Gets the toolbar image.
86
        /// </summary>
87
        /// <value>
88
        /// The toolbar image of the command as assigned in the resources file.
89
        /// </value>
90
        public System.Drawing.Image ToolbarImage
91
        {
92
            get
93
            {
94
                return null;// (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("ToolbarImage", System.Globalization.CultureInfo.CurrentCulture);
95
            }
96
        }
97
        /// <summary>
98
        /// All Command classes should implement IDisposable and call the dispose over the 
99
        /// Form on which our RADNetCommandControl lives(i.e Main Form)
100
        /// </summary>
101
        void IDisposable.Dispose()
102
        {
103
            /* http://stackoverflow.com/questions/3097364/c-sharp-form-close-vs-form-dispose
104
             * http://www.alwaysgetbetter.com/blog/2008/04/04/c-formclose-vs-formdispose/
105
             * From the above thread in case of Modal Forms we need to explicitly dispose
106
             * of the Form. Don't call run.Close() here. The form should only be closed
107
             * when user explicitly does it either via Code or Interactively. Using Close 
108
             * will cause re-entrance into the Form's close event handlers when form is 
109
             * closed explicitly and Done property is set to True. In all the other cases 
110
             * where it is Terminated this method is called by RADNetLoader.
111
             */
112
            run.Dispose(); // This helps in the destruction of underlying COM Command.
113
        }
114
    }
115
}
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverterWrapper.cs
204 204

  
205 205
                        #endregion
206 206

  
207

  
208
                        commandControl.Application.RADApplication.RunManagedMacro(@"Z:\HanKyouHo\Source\DTIPID\DTI_PID\SPPIDConverterDll\SPPIDConverter.dll", "Converter.SPPID.SPPIDConverter_AutoModeling");
209
                        return;
210

  
207 211
                        #region DialogBar Setting
208 212
                        try
209 213
                        {
......
244 248
            finally
245 249
            {
246 250
                commandControl.Application.RADApplication.Interactive = true;
247
                this.Hide();
248 251
                commandControl.Done = true;
249 252
            }
250 253

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)