프로젝트

일반

사용자정보

개정판 2cae7d1f

ID2cae7d1f311cf8bdccc1797bcbbc663edefbe423
상위 baade5a4
하위 57caa647

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

dev issue #826 : add DialogBar Wrapper

차이점 보기:

DTI_PID/DTI_PID.sln
11 11
EndProject
12 12
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPPIDConverter_AutoModeling", "SPPIDConverter_AutoModeling\SPPIDConverter_AutoModeling.csproj", "{650EF0EA-BD38-4DF8-9A76-0D13AA145F4D}"
13 13
EndProject
14
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPPIDConverter_DialogBarWrapper", "SPPIDConverter_DialogBarWrapper\SPPIDConverter_DialogBarWrapper.csproj", "{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}"
15
EndProject
14 16
Global
15 17
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 18
		Debug|Any CPU = Debug|Any CPU
......
47 49
		{650EF0EA-BD38-4DF8-9A76-0D13AA145F4D}.Release|Any CPU.Build.0 = Release|Any CPU
48 50
		{650EF0EA-BD38-4DF8-9A76-0D13AA145F4D}.Release|x64.ActiveCfg = Release|Any CPU
49 51
		{650EF0EA-BD38-4DF8-9A76-0D13AA145F4D}.Release|x64.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|x64.ActiveCfg = Debug|Any CPU
55
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Debug|x64.Build.0 = Debug|Any CPU
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|x64.ActiveCfg = Release|Any CPU
59
		{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}.Release|x64.Build.0 = Release|Any CPU
50 60
	EndGlobalSection
51 61
	GlobalSection(SolutionProperties) = preSolution
52 62
		HideSolutionNode = FALSE
DTI_PID/SPPIDConverter_AutoModeling/MainControl.Designer.cs
31 31
            Telerik.WinControls.UI.GridViewCheckBoxColumn gridViewCheckBoxColumn1 = new Telerik.WinControls.UI.GridViewCheckBoxColumn();
32 32
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
33 33
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn2 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
34
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition();
35 34
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn3 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
35
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition();
36 36
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn4 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
37 37
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn5 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
38
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn6 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
38 39
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition();
39 40
            this.panelMain = new System.Windows.Forms.Panel();
40 41
            this.pageView = new Telerik.WinControls.UI.RadPageView();
41
            this.telerikMetroBlueTheme = new Telerik.WinControls.Themes.TelerikMetroBlueTheme();
42
            this.materialBlueGreyTheme = new Telerik.WinControls.Themes.MaterialBlueGreyTheme();
43 42
            this.pageConverter = new Telerik.WinControls.UI.RadPageViewPage();
44 43
            this.radPanel2 = new Telerik.WinControls.UI.RadPanel();
45 44
            this.gridViewDrawingList = new Telerik.WinControls.UI.RadGridView();
......
53 52
            this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
54 53
            this.btnSitePath = new Telerik.WinControls.UI.RadBrowseEditor();
55 54
            this.pageReport = new Telerik.WinControls.UI.RadPageViewPage();
55
            this.telerikMetroBlueTheme = new Telerik.WinControls.Themes.TelerikMetroBlueTheme();
56
            this.materialBlueGreyTheme = new Telerik.WinControls.Themes.MaterialBlueGreyTheme();
56 57
            this.panelMain.SuspendLayout();
57 58
            ((System.ComponentModel.ISupportInitialize)(this.pageView)).BeginInit();
58 59
            this.pageView.SuspendLayout();
......
82 83
            this.panelMain.Dock = System.Windows.Forms.DockStyle.Fill;
83 84
            this.panelMain.Location = new System.Drawing.Point(0, 0);
84 85
            this.panelMain.Name = "panelMain";
85
            this.panelMain.Size = new System.Drawing.Size(361, 634);
86
            this.panelMain.Size = new System.Drawing.Size(361, 900);
86 87
            this.panelMain.TabIndex = 0;
87 88
            // 
88 89
            // pageView
......
93 94
            this.pageView.Dock = System.Windows.Forms.DockStyle.Fill;
94 95
            this.pageView.Location = new System.Drawing.Point(0, 0);
95 96
            this.pageView.Name = "pageView";
96
            this.pageView.SelectedPage = this.pageItemMapping;
97
            this.pageView.Size = new System.Drawing.Size(361, 634);
97
            this.pageView.SelectedPage = this.pageConverter;
98
            this.pageView.Size = new System.Drawing.Size(361, 900);
98 99
            this.pageView.TabIndex = 0;
99 100
            this.pageView.ThemeName = "TelerikMetroBlue";
100 101
            ((Telerik.WinControls.UI.RadPageViewStripElement)(this.pageView.GetChildAt(0))).StripButtons = Telerik.WinControls.UI.StripViewButtons.None;
......
107 108
            this.pageConverter.ItemSize = new System.Drawing.SizeF(98F, 40F);
108 109
            this.pageConverter.Location = new System.Drawing.Point(5, 46);
109 110
            this.pageConverter.Name = "pageConverter";
110
            this.pageConverter.Size = new System.Drawing.Size(351, 583);
111
            this.pageConverter.Size = new System.Drawing.Size(351, 849);
111 112
            this.pageConverter.Text = "Converter";
112 113
            // 
113 114
            // radPanel2
......
116 117
            this.radPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
117 118
            this.radPanel2.Location = new System.Drawing.Point(0, 33);
118 119
            this.radPanel2.Name = "radPanel2";
119
            this.radPanel2.Size = new System.Drawing.Size(351, 550);
120
            this.radPanel2.Size = new System.Drawing.Size(351, 816);
120 121
            this.radPanel2.TabIndex = 1;
121 122
            this.radPanel2.Text = "radPanel2";
122 123
            this.radPanel2.ThemeName = "MaterialBlueGrey";
......
131 132
            this.gridViewDrawingList.MasterTemplate.AllowAddNewRow = false;
132 133
            this.gridViewDrawingList.MasterTemplate.AllowCellContextMenu = false;
133 134
            this.gridViewDrawingList.MasterTemplate.AllowDeleteRow = false;
134
            this.gridViewDrawingList.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
135 135
            gridViewCheckBoxColumn1.EnableHeaderCheckBox = true;
136 136
            gridViewCheckBoxColumn1.HeaderCheckBoxAlignment = System.Drawing.ContentAlignment.MiddleCenter;
137 137
            gridViewCheckBoxColumn1.HeaderText = "";
......
140 140
            gridViewCheckBoxColumn1.Width = 41;
141 141
            gridViewTextBoxColumn1.HeaderText = "Drawing Name";
142 142
            gridViewTextBoxColumn1.Name = "colDrawingName";
143
            gridViewTextBoxColumn1.ReadOnly = true;
143 144
            gridViewTextBoxColumn1.RowSpan = 100;
144
            gridViewTextBoxColumn1.Width = 198;
145
            gridViewTextBoxColumn1.Width = 191;
145 146
            gridViewTextBoxColumn2.HeaderText = "Status";
147
            gridViewTextBoxColumn2.MinWidth = 100;
146 148
            gridViewTextBoxColumn2.Name = "colStatus";
149
            gridViewTextBoxColumn2.ReadOnly = true;
147 150
            gridViewTextBoxColumn2.RowSpan = 100;
148
            gridViewTextBoxColumn2.Width = 93;
151
            gridViewTextBoxColumn2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
152
            gridViewTextBoxColumn2.Width = 100;
153
            gridViewTextBoxColumn3.HeaderText = "DrawingFullName";
154
            gridViewTextBoxColumn3.IsVisible = false;
155
            gridViewTextBoxColumn3.Name = "colDrawingFullName";
156
            gridViewTextBoxColumn3.ReadOnly = true;
157
            gridViewTextBoxColumn3.Width = 43;
149 158
            this.gridViewDrawingList.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
150 159
            gridViewCheckBoxColumn1,
151 160
            gridViewTextBoxColumn1,
152
            gridViewTextBoxColumn2});
161
            gridViewTextBoxColumn2,
162
            gridViewTextBoxColumn3});
153 163
            this.gridViewDrawingList.MasterTemplate.EnableGrouping = false;
154 164
            this.gridViewDrawingList.MasterTemplate.ViewDefinition = tableViewDefinition1;
155 165
            this.gridViewDrawingList.Name = "gridViewDrawingList";
156
            this.gridViewDrawingList.Size = new System.Drawing.Size(351, 550);
166
            this.gridViewDrawingList.Size = new System.Drawing.Size(351, 816);
157 167
            this.gridViewDrawingList.TabIndex = 0;
158 168
            this.gridViewDrawingList.ThemeName = "TelerikMetroBlue";
159 169
            // 
......
178 188
            this.btnLoadFiles.Text = "Load Files ";
179 189
            this.btnLoadFiles.TextAlignment = System.Drawing.ContentAlignment.MiddleRight;
180 190
            this.btnLoadFiles.ThemeName = "TelerikMetroBlue";
191
            this.btnLoadFiles.Click += new System.EventHandler(this.btnLoadFiles_Click);
181 192
            // 
182 193
            // btnRun
183 194
            // 
......
220 231
            // 
221 232
            // 
222 233
            this.gridViewItemMapping.MasterTemplate.AllowAddNewRow = false;
223
            this.gridViewItemMapping.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
224
            gridViewTextBoxColumn3.HeaderText = "Item Name";
225
            gridViewTextBoxColumn3.Name = "colItemName";
226
            gridViewTextBoxColumn3.Width = 111;
227
            gridViewTextBoxColumn4.HeaderText = "SPPID Name";
228
            gridViewTextBoxColumn4.Name = "colSPPIDName";
234
            gridViewTextBoxColumn4.HeaderText = "Item Name";
235
            gridViewTextBoxColumn4.Name = "colItemName";
229 236
            gridViewTextBoxColumn4.Width = 111;
230
            gridViewTextBoxColumn5.HeaderText = "SPPID Full Name Path";
231
            gridViewTextBoxColumn5.Name = "colSPPIDFullNamePath";
232
            gridViewTextBoxColumn5.Width = 110;
237
            gridViewTextBoxColumn5.HeaderText = "SPPID Name";
238
            gridViewTextBoxColumn5.Name = "colSPPIDName";
239
            gridViewTextBoxColumn5.Width = 111;
240
            gridViewTextBoxColumn6.HeaderText = "SPPID Full Name Path";
241
            gridViewTextBoxColumn6.Name = "colSPPIDFullNamePath";
242
            gridViewTextBoxColumn6.Width = 110;
233 243
            this.gridViewItemMapping.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
234
            gridViewTextBoxColumn3,
235 244
            gridViewTextBoxColumn4,
236
            gridViewTextBoxColumn5});
245
            gridViewTextBoxColumn5,
246
            gridViewTextBoxColumn6});
237 247
            this.gridViewItemMapping.MasterTemplate.EnableGrouping = false;
238 248
            this.gridViewItemMapping.MasterTemplate.ViewDefinition = tableViewDefinition2;
239 249
            this.gridViewItemMapping.Name = "gridViewItemMapping";
......
269 279
            this.btnSitePath.DialogType = Telerik.WinControls.UI.BrowseEditorDialogType.FolderBrowseDialog;
270 280
            this.btnSitePath.Location = new System.Drawing.Point(80, 0);
271 281
            this.btnSitePath.Name = "btnSitePath";
272
            this.btnSitePath.Size = new System.Drawing.Size(271, 24);
282
            this.btnSitePath.Size = new System.Drawing.Size(271, 0);
273 283
            this.btnSitePath.TabIndex = 2;
274 284
            this.btnSitePath.ThemeName = "TelerikMetroBlue";
275 285
            // 
......
289 299
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
290 300
            this.Controls.Add(this.panelMain);
291 301
            this.Name = "MainControl";
292
            this.Size = new System.Drawing.Size(361, 634);
302
            this.Size = new System.Drawing.Size(361, 900);
293 303
            this.panelMain.ResumeLayout(false);
294 304
            ((System.ComponentModel.ISupportInitialize)(this.pageView)).EndInit();
295 305
            this.pageView.ResumeLayout(false);
DTI_PID/SPPIDConverter_AutoModeling/MainControl.cs
7 7
using System.Text;
8 8
using System.Threading.Tasks;
9 9
using System.Windows.Forms;
10
using Microsoft.Win32;
11
using Telerik.WinControls.UI;
12
using System.IO;
13
using System.Threading;
14
using SPPID.Modeling;
15
using SPPID.Model;
16
using SPPID.Utill;
10 17

  
11 18
namespace SPPIDConverter_AutoModeling
12 19
{
13 20
    public partial class MainControl : UserControl
14 21
    {
22
        private Dictionary<string, string> symbolMapping = new Dictionary<string, string>();
23
        private Dictionary<string, string> attributeMapping = new Dictionary<string, string>();
24
        Thread autoModelingThread;
25

  
15 26
        public MainControl()
16 27
        {
17 28
            InitializeComponent();
29
            SetPath();
30
        }
31

  
32
        private void btnLoadFiles_Click(object sender, EventArgs e)
33
        {
34
            OpenFileDialog dia = new OpenFileDialog();
35
            dia.Multiselect = true;
36
            dia.Filter = "Xml Files(*.xml)|*.xml";
37
            if (dia.ShowDialog() == DialogResult.OK)
38
            {
39
                SPPIDUtill.LoadMapping(symbolMapping, attributeMapping);
40

  
41
                foreach (string fileName in dia.FileNames)
42
                {
43
                    GridViewDataRowInfo row = new GridViewDataRowInfo(gridViewDrawingList.MasterView);
44
                    Document document = Document.Load(fileName, symbolMapping, attributeMapping);
45

  
46
                    row.Cells["colCheckBox"].Value = false;
47
                    row.Cells["colDrawingName"].Value = fileName;
48
                    row.Cells["colStatus"].Value = "Ready";
49
                    row.Cells["colDrawingFullName"].Value = fileName;
50
                    gridViewDrawingList.Rows.Add(row);
51
                }
52
            }
53
        }
54

  
55
        private void SetPath()
56
        {
57
            try
58
            {
59
                RegistryKey key = Registry.LocalMachine;
60
                RegistryKey software = key.OpenSubKey("SOFTWARE");
61
                RegistryKey DOFTECH = software.OpenSubKey("DOFTECH");
62
                if (DOFTECH != null)
63
                {
64
                    RegistryKey ID2 = DOFTECH.OpenSubKey("ID2");
65
                    if (ID2 != null)
66
                    {
67
                        SPPIDUtill.defaultPath = ID2.GetValue("Path").ToString();
68

  
69
                        Log.logPath = SPPIDUtill.defaultPath + @"Converter\SPPID Converter.log";
70
                        SPPIDUtill.mappingFilePath = SPPIDUtill.defaultPath + @"Converter\mapping.xml";
71
                        string dllPath = SPPIDUtill.defaultPath + @"Converter\SPPIDConverter.dll";
72
                    }
73
                }
74
            }
75
            catch (Exception ex)
76
            {
77

  
78
            }
18 79
        }
19 80
    }
20 81
}
DTI_PID/SPPIDConverter_AutoModeling/Utill/Log.cs
12 12
{
13 13
    public static class Log
14 14
    {
15
        private readonly static string logPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\SPPID Converter.log";
15
        public static string logPath = "";
16 16

  
17 17
        public static void WriteLine(Exception ex)
18 18
        {
DTI_PID/SPPIDConverter_DialogBarWrapper/Properties/AssemblyInfo.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.Reflection;
22
using System.Runtime.CompilerServices;
23
using System.Runtime.InteropServices;
24

  
25
// General Information about an assembly is controlled through the following 
26
// set of attributes. Change these attribute values to modify the information
27
// associated with an assembly.
28
[assembly: AssemblyTitle("SPPIDConverter_DialogBarWrapper")]
29
[assembly: AssemblyDescription("SPPIDConverter_DialogBarWrapper\nSPPIDConverter_DialogBarWrapper")]
30
[assembly: AssemblyConfiguration("")]
31
[assembly: AssemblyCompany("Intergraph")]
32
[assembly: AssemblyProduct("SPPIDConverter_DialogBarWrapper")]
33
[assembly: AssemblyCopyright("")]
34
[assembly: AssemblyTrademark("")]
35
[assembly: AssemblyCulture("")]
36

  
37
// Setting ComVisible to false makes the types in this assembly not visible 
38
// to COM components.  If you need to access a type in this assembly from 
39
// COM, set the ComVisible attribute to true on that type.
40
[assembly: ComVisible(false)]
41

  
42
// The following GUID is for the ID of the typelib if this project is exposed to COM
43
[assembly: Guid("b4b1b916-4e41-4546-abbf-69c1ea5be352")]
44

  
45
// Version information for an assembly consists of the following four values:
46
//
47
//      Major Version
48
//      Minor Version 
49
//      Build Number
50
//      Revision
51
//
52
// You can specify all the values or you can default the Build and Revision Numbers 
53
// by using the '*' as shown below:
54
// [assembly: AssemblyVersion("1.0.*")]
55
[assembly: AssemblyVersion("1.0.0.0")]
56
[assembly: AssemblyFileVersion("1.0.0.0")]
DTI_PID/SPPIDConverter_DialogBarWrapper/Properties/Resources.Designer.cs
1
//------------------------------------------------------------------------------
2
// <auto-generated>
3
//     이 코드는 도구를 사용하여 생성되었습니다.
4
//     런타임 버전:4.0.30319.42000
5
//
6
//     파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
7
//     이러한 변경 내용이 손실됩니다.
8
// </auto-generated>
9
//------------------------------------------------------------------------------
10

  
11
namespace SPPIDConverter_DialogBarWrapper.Properties {
12
    using System;
13
    
14
    
15
    /// <summary>
16
    ///   지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
17
    /// </summary>
18
    // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
19
    // 클래스에서 자동으로 생성되었습니다.
20
    // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
21
    // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
22
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25
    internal class Resources {
26
        
27
        private static global::System.Resources.ResourceManager resourceMan;
28
        
29
        private static global::System.Globalization.CultureInfo resourceCulture;
30
        
31
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32
        internal Resources() {
33
        }
34
        
35
        /// <summary>
36
        ///   이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
37
        /// </summary>
38
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39
        internal static global::System.Resources.ResourceManager ResourceManager {
40
            get {
41
                if (object.ReferenceEquals(resourceMan, null)) {
42
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SPPIDConverter_DialogBarWrapper.Properties.Resources", typeof(Resources).Assembly);
43
                    resourceMan = temp;
44
                }
45
                return resourceMan;
46
            }
47
        }
48
        
49
        /// <summary>
50
        ///   이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
51
        ///   재정의합니다.
52
        /// </summary>
53
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54
        internal static global::System.Globalization.CultureInfo Culture {
55
            get {
56
                return resourceCulture;
57
            }
58
            set {
59
                resourceCulture = value;
60
            }
61
        }
62
        
63
        /// <summary>
64
        ///   ID2 to SPPID Converter과(와) 유사한 지역화된 문자열을 찾습니다.
65
        /// </summary>
66
        internal static string Description {
67
            get {
68
                return ResourceManager.GetString("Description", resourceCulture);
69
            }
70
        }
71
        
72
        /// <summary>
73
        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
74
        /// </summary>
75
        internal static System.Drawing.Bitmap ToolbarImage {
76
            get {
77
                object obj = ResourceManager.GetObject("ToolbarImage", resourceCulture);
78
                return ((System.Drawing.Bitmap)(obj));
79
            }
80
        }
81
        
82
        /// <summary>
83
        ///   ID2 to SPPID Converter과(와) 유사한 지역화된 문자열을 찾습니다.
84
        /// </summary>
85
        internal static string Tooltip {
86
            get {
87
                return ResourceManager.GetString("Tooltip", resourceCulture);
88
            }
89
        }
90
    }
91
}
DTI_PID/SPPIDConverter_DialogBarWrapper/Properties/Resources.resx
1
<?xml version="1.0" encoding="utf-8"?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
    <resheader name="version">2.0</resheader>
18
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of "resheader" rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
    <xsd:element name="root" msdata:IsDataSet="true">
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs="unbounded">
67
          <xsd:element name="metadata">
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
              </xsd:sequence>
72
              <xsd:attribute name="name" use="required" type="xsd:string" />
73
              <xsd:attribute name="type" type="xsd:string" />
74
              <xsd:attribute name="mimetype" type="xsd:string" />
75
              <xsd:attribute ref="xml:space" />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name="assembly">
79
            <xsd:complexType>
80
              <xsd:attribute name="alias" type="xsd:string" />
81
              <xsd:attribute name="name" type="xsd:string" />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name="data">
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
              </xsd:sequence>
90
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
              <xsd:attribute ref="xml:space" />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name="resheader">
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
              </xsd:sequence>
101
              <xsd:attribute name="name" type="xsd:string" use="required" />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name="resmimetype">
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name="version">
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name="reader">
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name="writer">
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <data name="Description" xml:space="preserve">
121
    <value>ID2 to SPPID Converter</value>
122
  </data>
123
  <data name="Tooltip" xml:space="preserve">
124
    <value>ID2 to SPPID Converter</value>
125
  </data>
126
  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
127
  <data name="ToolbarImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
128
    <value>..\Resources\ToolbarImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129
  </data>
130
</root>
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverterDialogBarWrapper.Designer.cs
1
namespace SPPIDConverter_DialogBarWrapper
2
{
3
    partial class SPPIDConverterDialogBarWrapper
4
    {
5
        /// <summary>
6
        /// Required designer variable.
7
        /// </summary>
8
        private System.ComponentModel.IContainer components = null;
9

  
10
        /// <summary>
11
        /// Clean up any resources being used.
12
        /// </summary>
13
        /// <param name="disposing">true if managed resources should be disposed; otherwise, 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 Windows Form Designer generated code
24

  
25
        /// <summary>
26
        /// Required method for Designer support - do not modify
27
        /// the contents of this method with the code editor.
28
        /// </summary>
29
        private void InitializeComponent()
30
        {
31
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SPPIDConverterDialogBarWrapper));
32
            this.commandControl = new Ingr.RAD2D.MacroControls.CmdCtrl.IgCommand();
33
            ((System.ComponentModel.ISupportInitialize)(this.commandControl)).BeginInit();
34
            this.SuspendLayout();
35
            // 
36
            // commandControl
37
            // 
38
            this.commandControl.Enabled = true;
39
            this.commandControl.Location = new System.Drawing.Point(0, 0);
40
            this.commandControl.Name = "commandControl";
41
            this.commandControl.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("commandControl.OcxState")));
42
            this.commandControl.Size = new System.Drawing.Size(28, 28);
43
            this.commandControl.TabIndex = 0;
44
            this.commandControl.Activate += new System.EventHandler(this.commandControl_Activate);
45
            this.commandControl.Deactivate += new System.EventHandler(this.commandControl_Deactivate);
46
            this.commandControl.Terminate += new System.EventHandler(this.commandControl_Terminate);
47
            this.commandControl.Initialize += new System.EventHandler(this.commandControl_Initialize);
48
            // 
49
            // FormName
50
            // 
51
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
52
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
53
            this.ClientSize = new System.Drawing.Size(282, 255);
54
            this.Controls.Add(this.commandControl);
55
            this.Name = "SPPIDConverterDialogBarWrapper";
56
            this.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation;
57
            this.Text = "SPPIDConverter_DialogBarWrapper";
58
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SPPIDConverterDialogBarWrapper_FormClosing);
59
            ((System.ComponentModel.ISupportInitialize)(this.commandControl)).EndInit();
60
            this.ResumeLayout(false);
61

  
62
        }
63
        
64
        #endregion
65

  
66
        public Ingr.RAD2D.MacroControls.CmdCtrl.IgCommand commandControl;
67
    }
68
}
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverterDialogBarWrapper.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
using System.ComponentModel;
23
using System.Windows.Forms;
24
using Microsoft.Win32;
25
using Ingr.RAD2D;
26

  
27
namespace SPPIDConverter_DialogBarWrapper
28
{
29
    /// <summary>
30
    /// This is the primary form.
31
    /// This command may be built as an executable (EXE) or as a dynamic link 
32
    /// library (DLL).
33
    /// 
34
    /// When you implement the code that dismisses your form, e.g., an OK
35
    /// button or a Stop Processing button, you should include the following:
36
    /// 
37
    ///     Hide the form, for example
38
    ///         sPPIDConverterDialogBarWrapper.Hide
39
    ///         
40
    ///     Set the Application's Interactive property to True, for example
41
    ///         commandControl.Application.Interactive = True
42
    ///         
43
    ///     Set Intergraph Command Control Done property to True, for example
44
    ///         commandControl.Done = True
45
    /// </summary>
46
    public partial class SPPIDConverterDialogBarWrapper : Form
47
    {
48
        const string DialogBarName = "Auto Converter";
49

  
50
        /// <summary>
51
        /// Constructor for the form.
52
        /// </summary>
53
        public SPPIDConverterDialogBarWrapper()
54
        {
55
            InitializeComponent();
56
        }
57

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

  
72
        /// <summary>
73
        /// Gets the toolbar image.
74
        /// </summary>
75
        /// <value>
76
        /// The toolbar image of the command as assigned in the resources file.
77
        /// </value>
78
        public System.Drawing.Image ToolbarImage
79
        {
80
            get
81
            {
82
                return (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("ToolbarImage", System.Globalization.CultureInfo.CurrentCulture);
83
            }
84
        }
85

  
86
        /// <summary>
87
        /// The Activate Event is where the command should show its form
88
        /// if it should be displayed.
89
        /// </summary>
90
        /// <param name="sender">The sender of the event</param>
91
        /// <param name="e">The event's arguments</param>
92
        private void commandControl_Activate(object sender, EventArgs e)
93
        {
94

  
95
        }
96

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

  
109
        }
110

  
111
        /// <summary>
112
        /// The Initialize event is where the command should perform 1 time 
113
        /// initialization, for example it might save a reference to the 
114
        /// active document in private global data.
115
        /// </summary>
116
        /// <param name="sender">The sender of the event</param>
117
        /// <param name="e">The event's arguments</param>
118
        private void commandControl_Initialize(object sender, EventArgs e)
119
        {
120
            Ingr.RAD2D.Application application = commandControl.Application.RADApplication;
121

  
122
            #region DialogBar Setting
123
            try
124
            {
125
                bool bExist = false;
126
                foreach (DialogBar dialogBar in application.DialogBars)
127
                {
128
                    if (dialogBar.Name == DialogBarName)
129
                    {
130
                        bExist = true;
131
                        break;
132
                    }
133
                }
134
                if (!bExist)
135
                {
136
                    DialogBar dlgBar = application.DialogBars.Add("Auto Converter", DockingFlagsConstants.igDockableOnLeft, DockingLocationConstants.igDockOnLeft, DialogBarStyleConstants.igDialogBarStyleShowCaption | DialogBarStyleConstants.igDialogBarStyleStretchToFitHorizontal | DialogBarStyleConstants.igDialogBarStyleStretchToFitVertical | DialogBarStyleConstants.igDialogBarStyleResizeable, 0, 0);
137
                    DialogbarControl dialogBarControl_UserControl = dlgBar.Controls.AddManaged(@"Z:\????\Source\DTIPID\DTI_PID\SPPIDConverter_AutoModeling\bin\Debug\SPPIDConverter_AutoModeling.dll", "SPPIDConverter_AutoModeling.MainControl", 361, 900);
138
                }
139
            }
140
            catch (Exception ex)
141
            {
142

  
143
            }
144
            #endregion
145

  
146
            try
147
            {
148
                RegistryKey key = Registry.LocalMachine;
149
                RegistryKey software = key.OpenSubKey("SOFTWARE");
150
                RegistryKey DOFTECH = software.OpenSubKey("DOFTECH");
151
                if (DOFTECH != null)
152
                {
153
                    RegistryKey ID2 = DOFTECH.OpenSubKey("ID2");
154
                    if (ID2 != null)
155
                    {
156
                        string dllPath = @"Z:\????\Source\DTIPID\DTI_PID\SPPIDConverter_DialogBarWrapper\bin\Debug\SPPIDConverter_DialogBarWrapper.dll";//ID2.GetValue("Path").ToString() + @"Converter\SPPIDConverter_DialogBarWrapper.dll";
157
                        #region Set ToolBar and Menu
158
                        ToolBars toolBars = application.ToolBars;
159
                        bool find = true;
160
                        while (find)
161
                        {
162
                            find = false;
163
                            foreach (ToolbarControl item in toolBars["Main"].Controls)
164
                            {
165
                                if (item.DLLName.Contains("SPPIDConverter_DialogBarWrapper.dll"))
166
                                {
167
                                    item.Delete();
168
                                    find = true;
169
                                    break;
170
                                }
171
                            }
172
                        }
173

  
174
                        ToolbarControl toolBarControl = toolBars["Main"].Controls.AppendMacroCommand(dllPath);
175
                        toolBarControl.ToolTipText = GetTooltip;
176
                        toolBarControl.Picture = ToolbarImage;
177

  
178
                        Menus menu = application.Menus;
179
                        find = true;
180
                        while (find)
181
                        {
182
                            find = false;
183
                            foreach (MenuControl item in menu["&Tools"].Controls)
184
                            {
185
                                if (item.Caption == GetTooltip)
186
                                {
187
                                    item.Delete();
188
                                    find = true;
189
                                    break;
190
                                }
191
                            }
192
                        }
193
                        MenuControl menuControl = application.Menus["&Tools"].Controls.AppendMacroCommand(GetTooltip, dllPath);
194
                        menuControl.ToolTipText = GetTooltip;
195

  
196
                        #endregion
197
                    }
198
                }
199
                else
200
                {
201
                    MessageBox.Show("Please SetUp ID2", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
202
                }
203
            }
204
            catch (Exception ex)
205
            {
206
                MessageBox.Show(ex.Message);
207
            }
208
        }
209

  
210
        /// <summary>
211
        /// The Terminate event is where the command can clean up any command
212
        /// specific allocated resources.
213
        /// </summary>
214
        /// <param name="sender">The sender of the event</param>
215
        /// <param name="e">The event's arguments</param>
216
        public void commandControl_Terminate(object sender, EventArgs e)
217
        {
218

  
219
        }
220

  
221
        /// <summary>
222
        /// The primary form should not simply be unloaded.  You should set 
223
        /// the Intergraph Command Control Done property to True when you 
224
        /// want the form to be unloaded.  Then unload the form in the
225
        /// dispose method.
226
        /// </summary>
227
        /// <param name="sender">The sender of the event</param>
228
        /// <param name="e">The event's arguments</param>
229
        private void SPPIDConverterDialogBarWrapper_FormClosing(object sender, FormClosingEventArgs e)
230
        {
231
            commandControl.Application.RADApplication.Interactive = true;
232
            commandControl.Done = true;
233
        }
234

  
235
    }
236
}
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverterDialogBarWrapper.resx
1
<?xml version="1.0" encoding="utf-8"?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
    <resheader name="version">2.0</resheader>
18
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of "resheader" rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
    <xsd:element name="root" msdata:IsDataSet="true">
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs="unbounded">
67
          <xsd:element name="metadata">
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
              </xsd:sequence>
72
              <xsd:attribute name="name" use="required" type="xsd:string" />
73
              <xsd:attribute name="type" type="xsd:string" />
74
              <xsd:attribute name="mimetype" type="xsd:string" />
75
              <xsd:attribute ref="xml:space" />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name="assembly">
79
            <xsd:complexType>
80
              <xsd:attribute name="alias" type="xsd:string" />
81
              <xsd:attribute name="name" type="xsd:string" />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name="data">
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
              </xsd:sequence>
90
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
              <xsd:attribute ref="xml:space" />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name="resheader">
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
              </xsd:sequence>
101
              <xsd:attribute name="name" type="xsd:string" use="required" />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name="resmimetype">
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name="version">
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name="reader">
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name="writer">
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <data name="commandControl.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
121
    <value>
122
        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
123
        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
124
        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJwAAAAIB
125
        AAAAAQAAAAAAAAAAAAAAABIAAAAFAAIAUQIAAFECAAAAAAAAAQEL
126
</value>
127
  </data>
128
  <data name="mouseControl.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
129
    <value>
130
        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
131
        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
132
        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAfAAAAAIB
133
        AAAAAQAAAAAAAAAAAAAAAGcAAAAFAAIAUQIAAFECAABAAAAAAQAAAQAAAAEAAAAAAAAAAAQAAAAAAAAA
134
        AAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
135
        AAAACw==
136
</value>
137
  </data>
138
</root>
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverter_DialogBarWrapper.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 SPPIDConverter_DialogBarWrapper
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_DialogBarWrapper : IDisposable
30
    {
31

  
32
        /// <remark>
33
        /// Declare the form as member data of this class such that each new
34
        /// instance of the command gets its own form.
35
        /// </remark>
36
        private SPPIDConverterDialogBarWrapper sPPIDConverterDialogBarWrapper;
37

  
38
        /// <summary>
39

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

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

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

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

  
86
        /// <summary>
87
        /// Gets the toolbar image.
88
        /// </summary>
89
        /// <value>
90
        /// The toolbar image of the command as assigned in the resources file.
91
        /// </value>
92
        public System.Drawing.Image ToolbarImage
93
        {
94
            get
95
            {
96
                return (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("ToolbarImage", System.Globalization.CultureInfo.CurrentCulture);
97
            }
98
        }
99

  
100
        /// <summary>
101
        /// All Macro classes should implement IDisposable and call the dispose over the 
102
        /// Form on which our RADNetCommandControl lives(i.e Main Form)
103
        /// </summary>
104
        void IDisposable.Dispose()
105
        {
106
            /* http://stackoverflow.com/questions/3097364/c-sharp-form-close-vs-form-dispose
107
             * http://www.alwaysgetbetter.com/blog/2008/04/04/c-formclose-vs-formdispose/
108
             * From the above thread in case of Modal forms we need to explicitly dispose 
109
             * the form. Don't call Close here. Form should only be closed when user 
110
             * explicitly does it either via Code or Interactively. Using Close will cause 
111
             * re-entrance in the form's close event handlers when the form is closed 
112
             * explicitly and Done property is set to True. In all the other cases where 
113
             * Macro is Terminated this method is called by RADNetLoader.
114
             */
115
            sPPIDConverterDialogBarWrapper.Dispose(); // This helps in the destruction of underlying COM Command.
116
        }
117
    }
118
}
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverter_DialogBarWrapper.csproj
1
<?xml version="1.0" encoding="utf-8"?>
2
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
  <PropertyGroup>
5
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
    <ProjectGuid>{50BEB77D-9842-4C35-8369-0B5BD5C69EFA}</ProjectGuid>
8
    <OutputType>Library</OutputType>
9
    <AppDesignerFolder>Properties</AppDesignerFolder>
10
    <RootNamespace>SPPIDConverter_DialogBarWrapper</RootNamespace>
11
    <AssemblyName>SPPIDConverter_DialogBarWrapper</AssemblyName>
12
    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13
    <FileAlignment>512</FileAlignment>
14
  </PropertyGroup>
15
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16
    <DebugSymbols>true</DebugSymbols>
17
    <DebugType>full</DebugType>
18
    <Optimize>false</Optimize>
19
    <OutputPath>bin\Debug\</OutputPath>
20
    <DefineConstants>DEBUG;TRACE</DefineConstants>
21
    <ErrorReport>prompt</ErrorReport>
22
    <WarningLevel>4</WarningLevel>
23
  </PropertyGroup>
24
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25
    <DebugType>pdbonly</DebugType>
26
    <Optimize>true</Optimize>
27
    <OutputPath>bin\Release\</OutputPath>
28
    <DefineConstants>TRACE</DefineConstants>
29
    <ErrorReport>prompt</ErrorReport>
30
    <WarningLevel>4</WarningLevel>
31
  </PropertyGroup>
32
  <ItemGroup>
33
    <Reference Include="Interop.RAD2D">
34
      <HintPath>C:\Program Files (x86)\SmartPlant\P&amp;ID Workstation\bin\Interop.RAD2D.dll</HintPath>
35
      <EmbedInteropTypes>True</EmbedInteropTypes>
36
    </Reference>
37
    <Reference Include="RadNetAutomation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5f600089cf0eaec9, processorArchitecture=MSIL">
38
      <SpecificVersion>False</SpecificVersion>
39
      <HintPath>C:\Program Files (x86)\SmartPlant\P&amp;ID Workstation\bin\RadNetAutomation.dll</HintPath>
40
    </Reference>
41
    <Reference Include="RadNetCmdCtrl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5f600089cf0eaec9, processorArchitecture=MSIL">
42
      <SpecificVersion>False</SpecificVersion>
43
      <HintPath>C:\Program Files (x86)\SmartPlant\P&amp;ID Workstation\bin\RadNetCmdCtrl.dll</HintPath>
44
    </Reference>
45
    <Reference Include="System">
46
      <Private>False</Private>
47
    </Reference>
48
    <Reference Include="System.Core">
49
      <Private>False</Private>
50
    </Reference>
51
    <Reference Include="System.Drawing">
52
      <Private>False</Private>
53
    </Reference>
54
    <Reference Include="System.Windows.Forms">
55
      <Private>False</Private>
56
    </Reference>
57
    <Reference Include="Microsoft.CSharp">
58
      <Private>False</Private>
59
    </Reference>
60
    <Reference Include="System.Data">
61
      <Private>False</Private>
62
    </Reference>
63
    <Reference Include="System.Xml">
64
      <Private>False</Private>
65
    </Reference>
66
  </ItemGroup>
67
  <ItemGroup>
68
    <Compile Include="SPPIDConverter_DialogBarWrapper.cs" />
69
    <Compile Include="SPPIDConverterDialogBarWrapper.cs">
70
      <SubType>Form</SubType>
71
    </Compile>
72
    <Compile Include="SPPIDConverterDialogBarWrapper.Designer.cs">
73
      <DependentUpon>SPPIDConverterDialogBarWrapper.cs</DependentUpon>
74
    </Compile>
75
    <Compile Include="Properties\AssemblyInfo.cs" />
76
    <Compile Include="Properties\Resources.Designer.cs">
77
      <AutoGen>True</AutoGen>
78
      <DesignTime>True</DesignTime>
79
      <DependentUpon>Resources.resx</DependentUpon>
80
    </Compile>
81
  </ItemGroup>
82
  <ItemGroup>
83
    <EmbeddedResource Include="SPPIDConverterDialogBarWrapper.resx">
84
      <DependentUpon>SPPIDConverterDialogBarWrapper.cs</DependentUpon>
85
      <SubType>Designer</SubType>
86
    </EmbeddedResource>
87
    <EmbeddedResource Include="Properties\Resources.resx">
88
      <Generator>ResXFileCodeGenerator</Generator>
89
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
90
    </EmbeddedResource>
91
  </ItemGroup>
92
  <ItemGroup>
93
    <None Include="Resources\ToolbarImage.png" />
94
  </ItemGroup>
95
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
96
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
97
       Other similar extension points exist, see Microsoft.Common.targets.
98
  <Target Name="BeforeBuild">
99
  </Target>
100
  <Target Name="AfterBuild">
101
  </Target>
102
  -->
103
</Project>

내보내기 Unified diff

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