프로젝트

일반

사용자정보

개정판 aac983d3

IDaac983d33a1c184ac67fc0ab4221602ab66e75dc
상위 4348ac83
하위 bb1a9df5

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

dev issue #000 : devexpress로 개발 및 reducer 입력 창 개발

차이점 보기:

DTI_PID/PDF_TO_IMAGE/App.config
6 6
        </sectionGroup>
7 7
    </configSections>
8 8
    <startup> 
9
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
9
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
10 10
    </startup>
11 11
    <userSettings>
12 12
        <PDF_TO_IMAGE.Properties.Settings>
DTI_PID/PDF_TO_IMAGE/PDF_TO_IMAGE.csproj
8 8
    <OutputType>WinExe</OutputType>
9 9
    <RootNamespace>PDF_TO_IMAGE</RootNamespace>
10 10
    <AssemblyName>PDF_TO_IMAGE</AssemblyName>
11
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
11
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12 12
    <FileAlignment>512</FileAlignment>
13 13
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14 14
    <TargetFrameworkProfile />
......
72 72
    <Prefer32Bit>true</Prefer32Bit>
73 73
  </PropertyGroup>
74 74
  <ItemGroup>
75
    <Reference Include="DevExpress.Data.v18.1, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
76
    <Reference Include="DevExpress.Docs.v18.1, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
77
    <Reference Include="DevExpress.Pdf.v18.1.Core, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
78
    <Reference Include="DevExpress.Printing.v18.1.Core, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
79
    <Reference Include="DevExpress.Sparkline.v18.1.Core, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
80
    <Reference Include="DevExpress.Utils.v18.1, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
81
    <Reference Include="DevExpress.XtraEditors.v18.1, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
75
    <Reference Include="DevExpress.Data.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
76
    <Reference Include="DevExpress.Docs.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
77
    <Reference Include="DevExpress.Pdf.v18.2.Core, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
78
    <Reference Include="DevExpress.Printing.v18.2.Core, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
79
    <Reference Include="DevExpress.Sparkline.v18.2.Core, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
80
    <Reference Include="DevExpress.Utils.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
81
    <Reference Include="DevExpress.XtraEditors.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
82 82
    <Reference Include="Microsoft.VisualBasic" />
83 83
    <Reference Include="System" />
84 84
    <Reference Include="System.ComponentModel.DataAnnotations" />
DTI_PID/PDF_TO_IMAGE/Properties/Resources.Designer.cs
19 19
    // 클래스에서 자동으로 생성되었습니다.
20 20
    // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
21 21
    // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
22
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 23
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 24
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 25
    internal class Resources {
......
47 47
        }
48 48
        
49 49
        /// <summary>
50
        ///   이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture
51
        ///   속성을 재정의합니다.
50
        ///   이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
51
        ///   재정의합니다.
52 52
        /// </summary>
53 53
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 54
        internal static global::System.Globalization.CultureInfo Culture {
DTI_PID/SPPIDConverter_AutoModeling/App.config
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<configuration>
3 3
  <configSections>
4
    <section name="oracle.manageddataaccess.client"
5
      type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
6
    </configSections>
4
    <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342" />
5
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
6
      <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection" requirePermission="false" />
7
    </sectionGroup>
8
  </configSections>
9
  <applicationSettings>
10
    <DevExpress.LookAndFeel.Design.AppSettings>
11
      <setting name="DefaultAppSkin" serializeAs="String">
12
        <value>Skin/Office 2016 Colorful</value>
13
      </setting>
14
      <setting name="DefaultPalette" serializeAs="String">
15
        <value></value>
16
      </setting>
17
      <setting name="TouchUI" serializeAs="String">
18
        <value></value>
19
      </setting>
20
      <setting name="TouchScaleFactor" serializeAs="String">
21
        <value></value>
22
      </setting>
23
      <setting name="DirectX" serializeAs="String">
24
        <value></value>
25
      </setting>
26
      <setting name="RegisterUserSkins" serializeAs="String">
27
        <value></value>
28
      </setting>
29
      <setting name="FontBehavior" serializeAs="String">
30
        <value></value>
31
      </setting>
32
      <setting name="DefaultAppFont" serializeAs="String">
33
        <value></value>
34
      </setting>
35
      <setting name="DPIAwarenessMode" serializeAs="String">
36
        <value></value>
37
      </setting>
38
    </DevExpress.LookAndFeel.Design.AppSettings>
39
  </applicationSettings>
7 40
  <system.data>
8 41
    <DbProviderFactories>
9
      <remove invariant="Oracle.ManagedDataAccess.Client"/>
10
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver"
11
        type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
42
      <remove invariant="Oracle.ManagedDataAccess.Client" />
43
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342" />
12 44
    </DbProviderFactories>
13 45
  </system.data>
14 46
  <runtime>
15 47
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
16 48
      <dependentAssembly>
17
        <publisherPolicy apply="no"/>
18
        <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral"/>
19
        <bindingRedirect oldVersion="4.122.0.0 - 4.65535.65535.65535" newVersion="4.122.18.3"/>
49
        <publisherPolicy apply="no" />
50
        <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
51
        <bindingRedirect oldVersion="4.122.0.0 - 4.65535.65535.65535" newVersion="4.122.18.3" />
20 52
      </dependentAssembly>
21 53
    </assemblyBinding>
22 54
  </runtime>
23 55
  <oracle.manageddataaccess.client>
24 56
    <version number="*">
25 57
      <dataSources>
26
        <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/>
58
        <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
27 59
      </dataSources>
28 60
    </version>
29 61
  </oracle.manageddataaccess.client>
DTI_PID/SPPIDConverter_AutoModeling/DB/DB.cs
98 98
            return bResult;
99 99
        }
100 100

  
101
        public static bool SetPlantDBSetting()
102
        {
103
            bool bResult = false;
104
            DBInformation dbInfo = DBInformation.GetInstance();
105
            try
106
            {
107
                if (dbInfo.DBType == "ORACLE")
108
                {
109
                    string connString = string.Format(oConnString, dbInfo.ServerIP, dbInfo.Port, dbInfo.Service);
110
                    connString = "Data Source=" + connString + ";User Id=" + dbInfo.DBUser + ";Password=" + dbInfo.DBPassword;
111

  
112
                    using (OracleConnection conn = new OracleConnection(connString))
113
                    {
114
                        conn.Open();
115
                        if (conn.State == System.Data.ConnectionState.Open)
116
                        {
117
                            using (OracleCommand cmd = new OracleCommand())
118
                            {
119
                                cmd.Connection = conn;
120
                                cmd.CommandText = string.Format(CultureInfo.CurrentCulture, @"SELECT SP_SCHEMA_TYPE, USERNAME
121
                                                FROM {0}.T_DB_DATA DB_DATA 
122
                                                INNER JOIN {0}.T_ROOTITEM ROOTITEM ON DB_DATA.SP_ROOTITEMID = ROOTITEM.SP_ID 
123
                                                WHERE ROOTITEM.NAME = '{1}'", dbInfo.Site, dbInfo.Plant);
124
                                using (OracleDataAdapter adapter = new OracleDataAdapter())
125
                                {
126
                                    DataTable dt = new DataTable();
127
                                    adapter.SelectCommand = cmd;
128
                                    adapter.Fill(dt);
129

  
130
                                    foreach (DataRow row in dt.Rows)
131
                                    {
132
                                        string sType = row["SP_SCHEMA_TYPE"].ToString();
133
                                        switch (sType)
134
                                        {
135
                                            case "SPPIDDATA_DICTIONARY":
136
                                                dbInfo.PlantPIDDic = row["USERNAME"].ToString();
137
                                                break;
138
                                            case "DATA_DICTIONARY":
139
                                                dbInfo.PlantDic = row["USERNAME"].ToString();
140
                                                break;
141
                                            case "SPAPLANT":
142
                                                dbInfo.Plant = row["USERNAME"].ToString();
143
                                                break;
144
                                            case "SPPID":
145
                                                dbInfo.PlantPID = row["USERNAME"].ToString();
146
                                                break;
147
                                            default:
148
                                                break;
149
                                        }
150
                                    }
151
                                    bResult = true;
152
                                }
153
                            }
154
                        }
155
                    }
156
                }
157
                else
158
                {
159

  
160
                }
161
            }
162
            catch (Exception ex)
163
            {
164

  
165
            }
166

  
167
            return bResult;
168
        }
169

  
170
        public static List<string> GetPlantList()
171
        {
172
            DBInformation dbInfo = DBInformation.GetInstance();
173
            List<string> plantList = new List<string>();
174
            try
175
            {
176
                if (dbInfo.DBType == "ORACLE")
177
                {
178
                    string connString = string.Format(oConnString, dbInfo.ServerIP, dbInfo.Port, dbInfo.Service);
179
                    connString = "Data Source=" + connString + ";User Id=" + dbInfo.DBUser + ";Password=" + dbInfo.DBPassword;
180

  
181
                    using (OracleConnection conn = new OracleConnection(connString))
182
                    {
183
                        conn.Open();
184
                        if (conn.State == System.Data.ConnectionState.Open)
185
                        {
186
                            using (OracleCommand cmd = new OracleCommand())
187
                            {
188
                                cmd.Connection = conn;
189
                                cmd.CommandText = string.Format(CultureInfo.CurrentCulture, "SELECT NAME, PATH FROM {0}.T_ROOTITEM", dbInfo.Site);
190

  
191
                                using (OracleDataReader reader = cmd.ExecuteReader())
192
                                {
193
                                    while (reader.Read())
194
                                    {
195
                                        plantList.Add(reader["NAME"].ToString());
196
                                    }
197
                                }
198
                            }
199
                        }
200
                    }
201
                }
202
                else
203
                {
204

  
205
                }
206
            }
207
            catch (Exception ex)
208
            {
209

  
210
            }
211

  
212
            return plantList;
213
        }
214

  
101 215
        public static DataTable GetUnitTree()
102 216
        {
103 217
            DataTable dt = new DataTable();
......
115 229
                        conn.Open();
116 230
                        if (conn.State == System.Data.ConnectionState.Open)
117 231
                        {
118
                            string sQuery = string.Format(CultureInfo.CurrentCulture, 
119
                                @"SELECT LEVEL, SP_ID, NAME, PARENTID 
232
                            string sQuery = string.Format(CultureInfo.CurrentCulture,
233
                                @"SELECT SP_ID, PARENTID, NAME
120 234
                                    FROM {0}.T_PLANTGROUP 
121 235
                                    START WITH PARENTID='-1'
122 236
                                    CONNECT BY PRIOR SP_ID=PARENTID", dbInfo.Plant);
DTI_PID/SPPIDConverter_AutoModeling/DB/DBInformation.cs
17 17
        private string _Port = string.Empty;
18 18
        private string _DBUser = string.Empty;
19 19
        private string _DBPassword = string.Empty;
20
        private List<string> _PlantList = new List<string>();
21
        private string _SelectedPlant = string.Empty;
20 22

  
21 23
        private string _PlantPath = string.Empty;
22 24
        private string _Plant = string.Empty;
......
39 41
        public string PlantPIDDic { get => _PlantPIDDic; set => _PlantPIDDic = value; }
40 42
        public string Plant { get => _Plant; set => _Plant = value; }
41 43
        public bool Status { get => _Status; set => _Status = value; }
44
        public string SelectedPlant { get => _SelectedPlant; set => _SelectedPlant = value; }
45
        public List<string> PlantList { get => _PlantList; set => _PlantList = value; }
42 46

  
43 47
        public static DBInformation GetInstance()
44 48
        {
DTI_PID/SPPIDConverter_AutoModeling/ItemMapData.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 SPPIDConverter_AutoModeling
8
{
9
    public class ItemMapData
10
    {
11

  
12
    }
13
}
DTI_PID/SPPIDConverter_AutoModeling/MainControl.Designer.cs
50 50
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition4 = new Telerik.WinControls.UI.TableViewDefinition();
51 51
            this.panelMain = new System.Windows.Forms.Panel();
52 52
            this.pageView = new Telerik.WinControls.UI.RadPageView();
53
            this.telerikMetroBlueTheme = new Telerik.WinControls.Themes.TelerikMetroBlueTheme();
54
            this.materialBlueGreyTheme = new Telerik.WinControls.Themes.MaterialBlueGreyTheme();
53 55
            this.pageConverter = new Telerik.WinControls.UI.RadPageViewPage();
54 56
            this.radPanel2 = new Telerik.WinControls.UI.RadPanel();
55 57
            this.gridViewDrawingList = new Telerik.WinControls.UI.RadGridView();
......
73 75
            this.radPanel6 = new Telerik.WinControls.UI.RadPanel();
74 76
            this.btnMappingSave = new Telerik.WinControls.UI.RadButton();
75 77
            this.pageReport = new Telerik.WinControls.UI.RadPageViewPage();
76
            this.telerikMetroBlueTheme = new Telerik.WinControls.Themes.TelerikMetroBlueTheme();
77
            this.materialBlueGreyTheme = new Telerik.WinControls.Themes.MaterialBlueGreyTheme();
78 78
            this.panelMain.SuspendLayout();
79 79
            ((System.ComponentModel.ISupportInitialize)(this.pageView)).BeginInit();
80 80
            this.pageView.SuspendLayout();
......
133 133
            this.pageView.Dock = System.Windows.Forms.DockStyle.Fill;
134 134
            this.pageView.Location = new System.Drawing.Point(0, 0);
135 135
            this.pageView.Name = "pageView";
136
            this.pageView.SelectedPage = this.pageConverter;
136
            this.pageView.SelectedPage = this.pageItemMapping;
137 137
            this.pageView.Size = new System.Drawing.Size(735, 900);
138 138
            this.pageView.TabIndex = 0;
139 139
            this.pageView.ThemeName = "TelerikMetroBlue";
......
426 426
            this.splitPanel1.TabIndex = 0;
427 427
            this.splitPanel1.TabStop = false;
428 428
            this.splitPanel1.Text = "splitPanel1";
429
            this.splitPanel1.ThemeName = "TelerikMetroBlue";
429 430
            // 
430 431
            // gridViewItemMapping
431 432
            // 
......
475 476
            this.splitPanel2.TabIndex = 1;
476 477
            this.splitPanel2.TabStop = false;
477 478
            this.splitPanel2.Text = "splitPanel2";
479
            this.splitPanel2.ThemeName = "TelerikMetroBlue";
478 480
            // 
479 481
            // gridViewAttribute
480 482
            // 
DTI_PID/SPPIDConverter_AutoModeling/MainControl.cs
105 105
            gridViewItemMapping.BestFitColumns();
106 106
            gridViewItemMapping.EndUpdate();
107 107

  
108

  
109 108
            // Attribute
110 109
            GridViewComboBoxColumn colSPPIDAttribute = gridViewAttribute.Columns["colSPPIDAttribute"] as GridViewComboBoxColumn;
111 110
            colSPPIDAttribute.DataSource = DB.GetSPPIDAttribute();
DTI_PID/SPPIDConverter_AutoModeling/MainControl2.Designer.cs
1
namespace SPPIDConverter_AutoModeling
2
{
3
    partial class MainControl2
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.components = new System.ComponentModel.Container();
32
            this.tabControl = new DevExpress.XtraTab.XtraTabControl();
33
            this.pageConverter = new DevExpress.XtraTab.XtraTabPage();
34
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
35
            this.btnLoadFiles = new DevExpress.XtraEditors.SimpleButton();
36
            this.btnRun = new DevExpress.XtraEditors.SimpleButton();
37
            this.gridControlConverter = new DevExpress.XtraGrid.GridControl();
38
            this.gridViewConverter = new DevExpress.XtraGrid.Views.Grid.GridView();
39
            this.pageDBSetting = new DevExpress.XtraTab.XtraTabPage();
40
            this.btnSave = new DevExpress.XtraEditors.SimpleButton();
41
            this.comboBoxPlantList = new DevExpress.XtraEditors.ComboBoxEdit();
42
            this.btnDBTest = new DevExpress.XtraEditors.SimpleButton();
43
            this.labelControl8 = new DevExpress.XtraEditors.LabelControl();
44
            this.tbDBPassword = new DevExpress.XtraEditors.TextEdit();
45
            this.labelControl6 = new DevExpress.XtraEditors.LabelControl();
46
            this.tbDBUser = new DevExpress.XtraEditors.TextEdit();
47
            this.labelControl7 = new DevExpress.XtraEditors.LabelControl();
48
            this.tbPort = new DevExpress.XtraEditors.TextEdit();
49
            this.labelControl5 = new DevExpress.XtraEditors.LabelControl();
50
            this.tbServerIP = new DevExpress.XtraEditors.TextEdit();
51
            this.labelControl4 = new DevExpress.XtraEditors.LabelControl();
52
            this.tbSiteName = new DevExpress.XtraEditors.TextEdit();
53
            this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
54
            this.tbServiceName = new DevExpress.XtraEditors.TextEdit();
55
            this.tbDBType = new DevExpress.XtraEditors.TextEdit();
56
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
57
            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
58
            this.btnLoadPlantiniFile = new DevExpress.XtraEditors.SimpleButton();
59
            this.pageItemMapping = new DevExpress.XtraTab.XtraTabPage();
60
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
61
            this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
62
            this.groupReducer = new DevExpress.XtraEditors.GroupControl();
63
            this.labelControl9 = new DevExpress.XtraEditors.LabelControl();
64
            this.textBoxFittingSymbolPath = new DevExpress.XtraEditors.ButtonEdit();
65
            this.radioGroupReducer = new DevExpress.XtraEditors.RadioGroup();
66
            this.label1 = new System.Windows.Forms.Label();
67
            this.panelControl3 = new DevExpress.XtraEditors.PanelControl();
68
            this.gridControlAttribute = new DevExpress.XtraGrid.GridControl();
69
            this.gridViewAttribute = new DevExpress.XtraGrid.Views.Grid.GridView();
70
            this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
71
            this.btnMappingSave = new DevExpress.XtraEditors.SimpleButton();
72
            this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
73
            this.gridControlSymbol = new DevExpress.XtraGrid.GridControl();
74
            this.gridViewSymbol = new DevExpress.XtraGrid.Views.Grid.GridView();
75
            this.pageReport = new DevExpress.XtraTab.XtraTabPage();
76
            this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
77
            ((System.ComponentModel.ISupportInitialize)(this.tabControl)).BeginInit();
78
            this.tabControl.SuspendLayout();
79
            this.pageConverter.SuspendLayout();
80
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
81
            this.splitContainer1.Panel1.SuspendLayout();
82
            this.splitContainer1.Panel2.SuspendLayout();
83
            this.splitContainer1.SuspendLayout();
84
            ((System.ComponentModel.ISupportInitialize)(this.gridControlConverter)).BeginInit();
85
            ((System.ComponentModel.ISupportInitialize)(this.gridViewConverter)).BeginInit();
86
            this.pageDBSetting.SuspendLayout();
87
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxPlantList.Properties)).BeginInit();
88
            ((System.ComponentModel.ISupportInitialize)(this.tbDBPassword.Properties)).BeginInit();
89
            ((System.ComponentModel.ISupportInitialize)(this.tbDBUser.Properties)).BeginInit();
90
            ((System.ComponentModel.ISupportInitialize)(this.tbPort.Properties)).BeginInit();
91
            ((System.ComponentModel.ISupportInitialize)(this.tbServerIP.Properties)).BeginInit();
92
            ((System.ComponentModel.ISupportInitialize)(this.tbSiteName.Properties)).BeginInit();
93
            ((System.ComponentModel.ISupportInitialize)(this.tbServiceName.Properties)).BeginInit();
94
            ((System.ComponentModel.ISupportInitialize)(this.tbDBType.Properties)).BeginInit();
95
            this.pageItemMapping.SuspendLayout();
96
            this.tableLayoutPanel1.SuspendLayout();
97
            ((System.ComponentModel.ISupportInitialize)(this.panelControl4)).BeginInit();
98
            this.panelControl4.SuspendLayout();
99
            ((System.ComponentModel.ISupportInitialize)(this.groupReducer)).BeginInit();
100
            this.groupReducer.SuspendLayout();
101
            ((System.ComponentModel.ISupportInitialize)(this.textBoxFittingSymbolPath.Properties)).BeginInit();
102
            ((System.ComponentModel.ISupportInitialize)(this.radioGroupReducer.Properties)).BeginInit();
103
            ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).BeginInit();
104
            this.panelControl3.SuspendLayout();
105
            ((System.ComponentModel.ISupportInitialize)(this.gridControlAttribute)).BeginInit();
106
            ((System.ComponentModel.ISupportInitialize)(this.gridViewAttribute)).BeginInit();
107
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
108
            this.panelControl2.SuspendLayout();
109
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
110
            this.panelControl1.SuspendLayout();
111
            ((System.ComponentModel.ISupportInitialize)(this.gridControlSymbol)).BeginInit();
112
            ((System.ComponentModel.ISupportInitialize)(this.gridViewSymbol)).BeginInit();
113
            this.SuspendLayout();
114
            // 
115
            // tabControl
116
            // 
117
            this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
118
            this.tabControl.Location = new System.Drawing.Point(0, 0);
119
            this.tabControl.Name = "tabControl";
120
            this.tabControl.SelectedTabPage = this.pageConverter;
121
            this.tabControl.Size = new System.Drawing.Size(735, 900);
122
            this.tabControl.TabIndex = 0;
123
            this.tabControl.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
124
            this.pageConverter,
125
            this.pageDBSetting,
126
            this.pageItemMapping,
127
            this.pageReport});
128
            this.tabControl.SelectedPageChanged += new DevExpress.XtraTab.TabPageChangedEventHandler(this.tabControl_SelectedPageChanged);
129
            // 
130
            // pageConverter
131
            // 
132
            this.pageConverter.Controls.Add(this.splitContainer1);
133
            this.pageConverter.ImageOptions.Image = global::SPPIDConverter_AutoModeling.Properties.Resources.Convert;
134
            this.pageConverter.Name = "pageConverter";
135
            this.pageConverter.Size = new System.Drawing.Size(733, 856);
136
            this.pageConverter.Text = "Converter";
137
            // 
138
            // splitContainer1
139
            // 
140
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
141
            this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
142
            this.splitContainer1.IsSplitterFixed = true;
143
            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
144
            this.splitContainer1.Name = "splitContainer1";
145
            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
146
            // 
147
            // splitContainer1.Panel1
148
            // 
149
            this.splitContainer1.Panel1.Controls.Add(this.btnLoadFiles);
150
            this.splitContainer1.Panel1.Controls.Add(this.btnRun);
151
            // 
152
            // splitContainer1.Panel2
153
            // 
154
            this.splitContainer1.Panel2.Controls.Add(this.gridControlConverter);
155
            this.splitContainer1.Size = new System.Drawing.Size(733, 856);
156
            this.splitContainer1.SplitterDistance = 33;
157
            this.splitContainer1.SplitterWidth = 1;
158
            this.splitContainer1.TabIndex = 3;
159
            // 
160
            // btnLoadFiles
161
            // 
162
            this.btnLoadFiles.ImageOptions.Image = global::SPPIDConverter_AutoModeling.Properties.Resources.Open;
163
            this.btnLoadFiles.Location = new System.Drawing.Point(3, 3);
164
            this.btnLoadFiles.Name = "btnLoadFiles";
165
            this.btnLoadFiles.Size = new System.Drawing.Size(84, 26);
166
            this.btnLoadFiles.TabIndex = 0;
167
            this.btnLoadFiles.Text = "Load Files";
168
            this.btnLoadFiles.Click += new System.EventHandler(this.btnLoadFiles_Click);
169
            // 
170
            // btnRun
171
            // 
172
            this.btnRun.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
173
            this.btnRun.ImageOptions.Image = global::SPPIDConverter_AutoModeling.Properties.Resources.Start;
174
            this.btnRun.Location = new System.Drawing.Point(677, 3);
175
            this.btnRun.Name = "btnRun";
176
            this.btnRun.Size = new System.Drawing.Size(53, 26);
177
            this.btnRun.TabIndex = 1;
178
            this.btnRun.Text = "Run";
179
            this.btnRun.Click += new System.EventHandler(this.btnRun_Click);
180
            // 
181
            // gridControlConverter
182
            // 
183
            this.gridControlConverter.Dock = System.Windows.Forms.DockStyle.Fill;
184
            this.gridControlConverter.Location = new System.Drawing.Point(0, 0);
185
            this.gridControlConverter.MainView = this.gridViewConverter;
186
            this.gridControlConverter.Name = "gridControlConverter";
187
            this.gridControlConverter.Size = new System.Drawing.Size(733, 822);
188
            this.gridControlConverter.TabIndex = 0;
189
            this.gridControlConverter.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
190
            this.gridViewConverter});
191
            // 
192
            // gridViewConverter
193
            // 
194
            this.gridViewConverter.GridControl = this.gridControlConverter;
195
            this.gridViewConverter.Name = "gridViewConverter";
196
            this.gridViewConverter.OptionsView.ShowGroupPanel = false;
197
            this.gridViewConverter.CellValueChanged += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.gridViewConverter_CellValueChanged);
198
            // 
199
            // pageDBSetting
200
            // 
201
            this.pageDBSetting.Controls.Add(this.btnSave);
202
            this.pageDBSetting.Controls.Add(this.comboBoxPlantList);
203
            this.pageDBSetting.Controls.Add(this.btnDBTest);
204
            this.pageDBSetting.Controls.Add(this.labelControl8);
205
            this.pageDBSetting.Controls.Add(this.tbDBPassword);
206
            this.pageDBSetting.Controls.Add(this.labelControl6);
207
            this.pageDBSetting.Controls.Add(this.tbDBUser);
208
            this.pageDBSetting.Controls.Add(this.labelControl7);
209
            this.pageDBSetting.Controls.Add(this.tbPort);
210
            this.pageDBSetting.Controls.Add(this.labelControl5);
211
            this.pageDBSetting.Controls.Add(this.tbServerIP);
212
            this.pageDBSetting.Controls.Add(this.labelControl4);
213
            this.pageDBSetting.Controls.Add(this.tbSiteName);
214
            this.pageDBSetting.Controls.Add(this.labelControl3);
215
            this.pageDBSetting.Controls.Add(this.tbServiceName);
216
            this.pageDBSetting.Controls.Add(this.tbDBType);
217
            this.pageDBSetting.Controls.Add(this.labelControl2);
218
            this.pageDBSetting.Controls.Add(this.labelControl1);
219
            this.pageDBSetting.Controls.Add(this.btnLoadPlantiniFile);
220
            this.pageDBSetting.ImageOptions.Image = global::SPPIDConverter_AutoModeling.Properties.Resources.Setting;
221
            this.pageDBSetting.Name = "pageDBSetting";
222
            this.pageDBSetting.Size = new System.Drawing.Size(733, 856);
223
            this.pageDBSetting.Text = "DB Setting";
224
            // 
225
            // btnSave
226
            // 
227
            this.btnSave.Location = new System.Drawing.Point(287, 240);
228
            this.btnSave.Name = "btnSave";
229
            this.btnSave.Size = new System.Drawing.Size(71, 23);
230
            this.btnSave.TabIndex = 22;
231
            this.btnSave.Text = "Save";
232
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
233
            // 
234
            // comboBoxPlantList
235
            // 
236
            this.comboBoxPlantList.Location = new System.Drawing.Point(101, 214);
237
            this.comboBoxPlantList.Name = "comboBoxPlantList";
238
            this.comboBoxPlantList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
239
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
240
            this.comboBoxPlantList.Size = new System.Drawing.Size(257, 20);
241
            this.comboBoxPlantList.TabIndex = 21;
242
            // 
243
            // btnDBTest
244
            // 
245
            this.btnDBTest.Location = new System.Drawing.Point(287, 3);
246
            this.btnDBTest.Name = "btnDBTest";
247
            this.btnDBTest.Size = new System.Drawing.Size(71, 23);
248
            this.btnDBTest.TabIndex = 20;
249
            this.btnDBTest.Text = "DB Test";
250
            this.btnDBTest.Click += new System.EventHandler(this.btnDBTest_Click);
251
            // 
252
            // labelControl8
253
            // 
254
            this.labelControl8.Location = new System.Drawing.Point(12, 217);
255
            this.labelControl8.Name = "labelControl8";
256
            this.labelControl8.Size = new System.Drawing.Size(27, 14);
257
            this.labelControl8.TabIndex = 18;
258
            this.labelControl8.Text = "Plant";
259
            // 
260
            // tbDBPassword
261
            // 
262
            this.tbDBPassword.Location = new System.Drawing.Point(101, 188);
263
            this.tbDBPassword.Name = "tbDBPassword";
264
            this.tbDBPassword.Properties.PasswordChar = '*';
265
            this.tbDBPassword.Size = new System.Drawing.Size(257, 20);
266
            this.tbDBPassword.TabIndex = 16;
267
            // 
268
            // labelControl6
269
            // 
270
            this.labelControl6.Location = new System.Drawing.Point(12, 191);
271
            this.labelControl6.Name = "labelControl6";
272
            this.labelControl6.Size = new System.Drawing.Size(70, 14);
273
            this.labelControl6.TabIndex = 15;
274
            this.labelControl6.Text = "DB Password";
275
            // 
276
            // tbDBUser
277
            // 
278
            this.tbDBUser.Location = new System.Drawing.Point(101, 162);
279
            this.tbDBUser.Name = "tbDBUser";
280
            this.tbDBUser.Size = new System.Drawing.Size(257, 20);
281
            this.tbDBUser.TabIndex = 14;
282
            // 
283
            // labelControl7
284
            // 
285
            this.labelControl7.Location = new System.Drawing.Point(12, 165);
286
            this.labelControl7.Name = "labelControl7";
287
            this.labelControl7.Size = new System.Drawing.Size(43, 14);
288
            this.labelControl7.TabIndex = 13;
289
            this.labelControl7.Text = "DB User";
290
            // 
291
            // tbPort
292
            // 
293
            this.tbPort.Location = new System.Drawing.Point(101, 136);
294
            this.tbPort.Name = "tbPort";
295
            this.tbPort.Size = new System.Drawing.Size(257, 20);
296
            this.tbPort.TabIndex = 12;
297
            // 
298
            // labelControl5
299
            // 
300
            this.labelControl5.Location = new System.Drawing.Point(12, 139);
301
            this.labelControl5.Name = "labelControl5";
302
            this.labelControl5.Size = new System.Drawing.Size(23, 14);
303
            this.labelControl5.TabIndex = 11;
304
            this.labelControl5.Text = "Port";
305
            // 
306
            // tbServerIP
307
            // 
308
            this.tbServerIP.Location = new System.Drawing.Point(101, 110);
309
            this.tbServerIP.Name = "tbServerIP";
310
            this.tbServerIP.Size = new System.Drawing.Size(257, 20);
311
            this.tbServerIP.TabIndex = 10;
312
            // 
313
            // labelControl4
314
            // 
315
            this.labelControl4.Location = new System.Drawing.Point(12, 113);
316
            this.labelControl4.Name = "labelControl4";
317
            this.labelControl4.Size = new System.Drawing.Size(50, 14);
318
            this.labelControl4.TabIndex = 9;
319
            this.labelControl4.Text = "Server IP";
320
            // 
321
            // tbSiteName
322
            // 
323
            this.tbSiteName.Enabled = false;
324
            this.tbSiteName.Location = new System.Drawing.Point(101, 84);
325
            this.tbSiteName.Name = "tbSiteName";
326
            this.tbSiteName.Size = new System.Drawing.Size(257, 20);
327
            this.tbSiteName.TabIndex = 8;
328
            // 
329
            // labelControl3
330
            // 
331
            this.labelControl3.Location = new System.Drawing.Point(12, 87);
332
            this.labelControl3.Name = "labelControl3";
333
            this.labelControl3.Size = new System.Drawing.Size(56, 14);
334
            this.labelControl3.TabIndex = 7;
335
            this.labelControl3.Text = "Site Name";
336
            // 
337
            // tbServiceName
338
            // 
339
            this.tbServiceName.Enabled = false;
340
            this.tbServiceName.Location = new System.Drawing.Point(101, 58);
341
            this.tbServiceName.Name = "tbServiceName";
342
            this.tbServiceName.Size = new System.Drawing.Size(257, 20);
343
            this.tbServiceName.TabIndex = 6;
344
            // 
345
            // tbDBType
346
            // 
347
            this.tbDBType.Enabled = false;
348
            this.tbDBType.Location = new System.Drawing.Point(101, 32);
349
            this.tbDBType.Name = "tbDBType";
350
            this.tbDBType.Size = new System.Drawing.Size(257, 20);
351
            this.tbDBType.TabIndex = 5;
352
            // 
353
            // labelControl2
354
            // 
355
            this.labelControl2.Location = new System.Drawing.Point(12, 61);
356
            this.labelControl2.Name = "labelControl2";
357
            this.labelControl2.Size = new System.Drawing.Size(74, 14);
358
            this.labelControl2.TabIndex = 4;
359
            this.labelControl2.Text = "Service Name";
360
            // 
361
            // labelControl1
362
            // 
363
            this.labelControl1.Location = new System.Drawing.Point(13, 35);
364
            this.labelControl1.Name = "labelControl1";
365
            this.labelControl1.Size = new System.Drawing.Size(47, 14);
366
            this.labelControl1.TabIndex = 3;
367
            this.labelControl1.Text = "DB Type";
368
            // 
369
            // btnLoadPlantiniFile
370
            // 
371
            this.btnLoadPlantiniFile.Location = new System.Drawing.Point(12, 3);
372
            this.btnLoadPlantiniFile.Name = "btnLoadPlantiniFile";
373
            this.btnLoadPlantiniFile.Size = new System.Drawing.Size(113, 23);
374
            this.btnLoadPlantiniFile.TabIndex = 2;
375
            this.btnLoadPlantiniFile.Text = "Load Plant ini FIle";
376
            this.btnLoadPlantiniFile.Click += new System.EventHandler(this.LoadPlantiniFile_Click);
377
            // 
378
            // pageItemMapping
379
            // 
380
            this.pageItemMapping.Controls.Add(this.tableLayoutPanel1);
381
            this.pageItemMapping.ImageOptions.Image = global::SPPIDConverter_AutoModeling.Properties.Resources.ItemMapping;
382
            this.pageItemMapping.Name = "pageItemMapping";
383
            this.pageItemMapping.Size = new System.Drawing.Size(733, 856);
384
            this.pageItemMapping.Text = "Item Mapping";
385
            // 
386
            // tableLayoutPanel1
387
            // 
388
            this.tableLayoutPanel1.ColumnCount = 1;
389
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.75034F));
390
            this.tableLayoutPanel1.Controls.Add(this.panelControl4, 0, 3);
391
            this.tableLayoutPanel1.Controls.Add(this.panelControl3, 0, 2);
392
            this.tableLayoutPanel1.Controls.Add(this.panelControl2, 0, 0);
393
            this.tableLayoutPanel1.Controls.Add(this.panelControl1, 0, 1);
394
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
395
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
396
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
397
            this.tableLayoutPanel1.RowCount = 4;
398
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.48718F));
399
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 90.51282F));
400
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 215F));
401
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 250F));
402
            this.tableLayoutPanel1.Size = new System.Drawing.Size(733, 856);
403
            this.tableLayoutPanel1.TabIndex = 0;
404
            // 
405
            // panelControl4
406
            // 
407
            this.panelControl4.Controls.Add(this.groupReducer);
408
            this.panelControl4.Dock = System.Windows.Forms.DockStyle.Fill;
409
            this.panelControl4.Location = new System.Drawing.Point(3, 608);
410
            this.panelControl4.Name = "panelControl4";
411
            this.panelControl4.Size = new System.Drawing.Size(727, 245);
412
            this.panelControl4.TabIndex = 3;
413
            // 
414
            // groupReducer
415
            // 
416
            this.groupReducer.Controls.Add(this.labelControl9);
417
            this.groupReducer.Controls.Add(this.radioGroupReducer);
418
            this.groupReducer.Controls.Add(this.textBoxFittingSymbolPath);
419
            this.groupReducer.Controls.Add(this.label1);
420
            this.groupReducer.Location = new System.Drawing.Point(5, 5);
421
            this.groupReducer.Name = "groupReducer";
422
            this.groupReducer.Size = new System.Drawing.Size(343, 78);
423
            this.groupReducer.TabIndex = 0;
424
            this.groupReducer.Text = "Reducer Setting";
425
            // 
426
            // labelControl9
427
            // 
428
            this.labelControl9.Location = new System.Drawing.Point(5, 24);
429
            this.labelControl9.Name = "labelControl9";
430
            this.labelControl9.Size = new System.Drawing.Size(99, 14);
431
            this.labelControl9.TabIndex = 3;
432
            this.labelControl9.Text = "Size Symbol Name";
433
            // 
434
            // textBoxFittingSymbolPath
435
            // 
436
            this.textBoxFittingSymbolPath.Location = new System.Drawing.Point(110, 21);
437
            this.textBoxFittingSymbolPath.Name = "textBoxFittingSymbolPath";
438
            this.textBoxFittingSymbolPath.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
439
            new DevExpress.XtraEditors.Controls.EditorButton()});
440
            this.textBoxFittingSymbolPath.Size = new System.Drawing.Size(224, 20);
441
            this.textBoxFittingSymbolPath.TabIndex = 2;
442
            this.textBoxFittingSymbolPath.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.textBoxSymbolPath_ButtonClick);
443
            // 
444
            // radioGroupReducer
445
            // 
446
            this.radioGroupReducer.EditValue = true;
447
            this.radioGroupReducer.Location = new System.Drawing.Point(110, 47);
448
            this.radioGroupReducer.Name = "radioGroupReducer";
449
            this.radioGroupReducer.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] {
450
            new DevExpress.XtraEditors.Controls.RadioGroupItem(true, "End 1 Nom Dia", true, "PipingPoint1.NominalDiameter"),
451
            new DevExpress.XtraEditors.Controls.RadioGroupItem(true, "End 2 Nom Dia", true, "PipingPoint2.NominalDiameter")});
452
            this.radioGroupReducer.Size = new System.Drawing.Size(224, 23);
453
            this.radioGroupReducer.TabIndex = 1;
454
            // 
455
            // label1
456
            // 
457
            this.label1.AutoSize = true;
458
            this.label1.Location = new System.Drawing.Point(2, 51);
459
            this.label1.Name = "label1";
460
            this.label1.Size = new System.Drawing.Size(92, 14);
461
            this.label1.TabIndex = 0;
462
            this.label1.Text = "Large Size Attr.";
463
            // 
464
            // panelControl3
465
            // 
466
            this.panelControl3.Controls.Add(this.gridControlAttribute);
467
            this.panelControl3.Dock = System.Windows.Forms.DockStyle.Fill;
468
            this.panelControl3.Location = new System.Drawing.Point(3, 393);
469
            this.panelControl3.Name = "panelControl3";
470
            this.panelControl3.Size = new System.Drawing.Size(727, 209);
471
            this.panelControl3.TabIndex = 2;
472
            // 
473
            // gridControlAttribute
474
            // 
475
            this.gridControlAttribute.Dock = System.Windows.Forms.DockStyle.Fill;
476
            this.gridControlAttribute.Location = new System.Drawing.Point(2, 2);
477
            this.gridControlAttribute.MainView = this.gridViewAttribute;
478
            this.gridControlAttribute.Name = "gridControlAttribute";
479
            this.gridControlAttribute.Size = new System.Drawing.Size(723, 205);
480
            this.gridControlAttribute.TabIndex = 1;
481
            this.gridControlAttribute.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
482
            this.gridViewAttribute});
483
            // 
484
            // gridViewAttribute
485
            // 
486
            this.gridViewAttribute.GridControl = this.gridControlAttribute;
487
            this.gridViewAttribute.Name = "gridViewAttribute";
488
            this.gridViewAttribute.OptionsView.ShowGroupPanel = false;
489
            // 
490
            // panelControl2
491
            // 
492
            this.panelControl2.Controls.Add(this.btnMappingSave);
493
            this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
494
            this.panelControl2.Location = new System.Drawing.Point(3, 3);
495
            this.panelControl2.Name = "panelControl2";
496
            this.panelControl2.Size = new System.Drawing.Size(727, 31);
497
            this.panelControl2.TabIndex = 1;
498
            // 
499
            // btnMappingSave
500
            // 
501
            this.btnMappingSave.Location = new System.Drawing.Point(650, 5);
502
            this.btnMappingSave.Name = "btnMappingSave";
503
            this.btnMappingSave.Size = new System.Drawing.Size(75, 23);
504
            this.btnMappingSave.TabIndex = 0;
505
            this.btnMappingSave.Text = "Save";
506
            this.btnMappingSave.Click += new System.EventHandler(this.btnMappingSave_Click);
507
            // 
508
            // panelControl1
509
            // 
510
            this.panelControl1.Controls.Add(this.gridControlSymbol);
511
            this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
512
            this.panelControl1.Location = new System.Drawing.Point(3, 40);
513
            this.panelControl1.Name = "panelControl1";
514
            this.panelControl1.Size = new System.Drawing.Size(727, 347);
515
            this.panelControl1.TabIndex = 0;
516
            // 
517
            // gridControlSymbol
518
            // 
519
            this.gridControlSymbol.Dock = System.Windows.Forms.DockStyle.Fill;
520
            this.gridControlSymbol.Location = new System.Drawing.Point(2, 2);
521
            this.gridControlSymbol.MainView = this.gridViewSymbol;
522
            this.gridControlSymbol.Name = "gridControlSymbol";
523
            this.gridControlSymbol.Size = new System.Drawing.Size(723, 343);
524
            this.gridControlSymbol.TabIndex = 0;
525
            this.gridControlSymbol.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
526
            this.gridViewSymbol});
527
            // 
528
            // gridViewSymbol
529
            // 
530
            this.gridViewSymbol.GridControl = this.gridControlSymbol;
531
            this.gridViewSymbol.Name = "gridViewSymbol";
532
            this.gridViewSymbol.OptionsView.ShowGroupPanel = false;
533
            // 
534
            // pageReport
535
            // 
536
            this.pageReport.ImageOptions.Image = global::SPPIDConverter_AutoModeling.Properties.Resources.Report;
537
            this.pageReport.Name = "pageReport";
538
            this.pageReport.Size = new System.Drawing.Size(733, 856);
539
            this.pageReport.Text = "Report";
540
            // 
541
            // defaultLookAndFeel
542
            // 
543
            this.defaultLookAndFeel.EnableBonusSkins = true;
544
            this.defaultLookAndFeel.LookAndFeel.SkinName = "Office 2016 Colorful";
545
            // 
546
            // MainControl2
547
            // 
548
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
549
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
550
            this.Controls.Add(this.tabControl);
551
            this.Name = "MainControl2";
552
            this.Size = new System.Drawing.Size(735, 900);
553
            ((System.ComponentModel.ISupportInitialize)(this.tabControl)).EndInit();
554
            this.tabControl.ResumeLayout(false);
555
            this.pageConverter.ResumeLayout(false);
556
            this.splitContainer1.Panel1.ResumeLayout(false);
557
            this.splitContainer1.Panel2.ResumeLayout(false);
558
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
559
            this.splitContainer1.ResumeLayout(false);
560
            ((System.ComponentModel.ISupportInitialize)(this.gridControlConverter)).EndInit();
561
            ((System.ComponentModel.ISupportInitialize)(this.gridViewConverter)).EndInit();
562
            this.pageDBSetting.ResumeLayout(false);
563
            this.pageDBSetting.PerformLayout();
564
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxPlantList.Properties)).EndInit();
565
            ((System.ComponentModel.ISupportInitialize)(this.tbDBPassword.Properties)).EndInit();
566
            ((System.ComponentModel.ISupportInitialize)(this.tbDBUser.Properties)).EndInit();
567
            ((System.ComponentModel.ISupportInitialize)(this.tbPort.Properties)).EndInit();
568
            ((System.ComponentModel.ISupportInitialize)(this.tbServerIP.Properties)).EndInit();
569
            ((System.ComponentModel.ISupportInitialize)(this.tbSiteName.Properties)).EndInit();
570
            ((System.ComponentModel.ISupportInitialize)(this.tbServiceName.Properties)).EndInit();
571
            ((System.ComponentModel.ISupportInitialize)(this.tbDBType.Properties)).EndInit();
572
            this.pageItemMapping.ResumeLayout(false);
573
            this.tableLayoutPanel1.ResumeLayout(false);
574
            ((System.ComponentModel.ISupportInitialize)(this.panelControl4)).EndInit();
575
            this.panelControl4.ResumeLayout(false);
576
            ((System.ComponentModel.ISupportInitialize)(this.groupReducer)).EndInit();
577
            this.groupReducer.ResumeLayout(false);
578
            this.groupReducer.PerformLayout();
579
            ((System.ComponentModel.ISupportInitialize)(this.textBoxFittingSymbolPath.Properties)).EndInit();
580
            ((System.ComponentModel.ISupportInitialize)(this.radioGroupReducer.Properties)).EndInit();
581
            ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).EndInit();
582
            this.panelControl3.ResumeLayout(false);
583
            ((System.ComponentModel.ISupportInitialize)(this.gridControlAttribute)).EndInit();
584
            ((System.ComponentModel.ISupportInitialize)(this.gridViewAttribute)).EndInit();
585
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
586
            this.panelControl2.ResumeLayout(false);
587
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
588
            this.panelControl1.ResumeLayout(false);
589
            ((System.ComponentModel.ISupportInitialize)(this.gridControlSymbol)).EndInit();
590
            ((System.ComponentModel.ISupportInitialize)(this.gridViewSymbol)).EndInit();
591
            this.ResumeLayout(false);
592

  
593
        }
594

  
595
        #endregion
596

  
597
        private DevExpress.XtraTab.XtraTabControl tabControl;
598
        private DevExpress.XtraTab.XtraTabPage pageConverter;
599
        private DevExpress.XtraTab.XtraTabPage pageDBSetting;
600
        private DevExpress.XtraTab.XtraTabPage pageItemMapping;
601
        private DevExpress.XtraTab.XtraTabPage pageReport;
602
        private DevExpress.LookAndFeel.DefaultLookAndFeel defaultLookAndFeel;
603
        private DevExpress.XtraEditors.SimpleButton btnLoadFiles;
604
        private DevExpress.XtraEditors.SimpleButton btnRun;
605
        private System.Windows.Forms.SplitContainer splitContainer1;
606
        private DevExpress.XtraGrid.GridControl gridControlConverter;
607
        private DevExpress.XtraGrid.Views.Grid.GridView gridViewConverter;
608
        private DevExpress.XtraEditors.SimpleButton btnLoadPlantiniFile;
609
        private DevExpress.XtraEditors.LabelControl labelControl8;
610
        private DevExpress.XtraEditors.TextEdit tbDBPassword;
611
        private DevExpress.XtraEditors.LabelControl labelControl6;
612
        private DevExpress.XtraEditors.TextEdit tbDBUser;
613
        private DevExpress.XtraEditors.LabelControl labelControl7;
614
        private DevExpress.XtraEditors.TextEdit tbPort;
615
        private DevExpress.XtraEditors.LabelControl labelControl5;
616
        private DevExpress.XtraEditors.TextEdit tbServerIP;
617
        private DevExpress.XtraEditors.LabelControl labelControl4;
618
        private DevExpress.XtraEditors.TextEdit tbSiteName;
619
        private DevExpress.XtraEditors.LabelControl labelControl3;
620
        private DevExpress.XtraEditors.TextEdit tbServiceName;
621
        private DevExpress.XtraEditors.TextEdit tbDBType;
622
        private DevExpress.XtraEditors.LabelControl labelControl2;
623
        private DevExpress.XtraEditors.LabelControl labelControl1;
624
        private DevExpress.XtraEditors.SimpleButton btnDBTest;
625
        private DevExpress.XtraEditors.ComboBoxEdit comboBoxPlantList;
626
        private DevExpress.XtraEditors.SimpleButton btnSave;
627
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
628
        private DevExpress.XtraEditors.PanelControl panelControl4;
629
        private DevExpress.XtraEditors.PanelControl panelControl3;
630
        private DevExpress.XtraEditors.PanelControl panelControl2;
631
        private DevExpress.XtraEditors.PanelControl panelControl1;
632
        private DevExpress.XtraEditors.SimpleButton btnMappingSave;
633
        private DevExpress.XtraGrid.GridControl gridControlAttribute;
634
        private DevExpress.XtraGrid.Views.Grid.GridView gridViewAttribute;
635
        private DevExpress.XtraGrid.GridControl gridControlSymbol;
636
        private DevExpress.XtraGrid.Views.Grid.GridView gridViewSymbol;
637
        private DevExpress.XtraEditors.GroupControl groupReducer;
638
        private DevExpress.XtraEditors.RadioGroup radioGroupReducer;
639
        private System.Windows.Forms.Label label1;
640
        private DevExpress.XtraEditors.LabelControl labelControl9;
641
        private DevExpress.XtraEditors.ButtonEdit textBoxFittingSymbolPath;
642
    }
643
}
DTI_PID/SPPIDConverter_AutoModeling/MainControl2.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.Windows.Forms;
10
using Microsoft.Win32;
11
using System.IO;
12
using System.Threading;
13
using SPPID.Modeling;
14
using SPPID.Model;
15
using SPPID.Utill;
16
using SPPID.DB;
17
using Microsoft.VisualBasic;
18
using Newtonsoft.Json;
19
using DevExpress.XtraEditors.Repository;
20
using DevExpress.XtraEditors.Controls;
21
using DevExpress.XtraEditors;
22

  
23
namespace SPPIDConverter_AutoModeling
24
{
25
    public partial class MainControl2 : UserControl
26
    {
27
        const string _Ready = "Ready";
28
        const string _LoadFail = "Can't Load";
29
        const string _NeedMapping = "Need Mapping";
30
        const string _NeedUnit = "Select Unit";
31
        const string _NeedTemplate = "Select Template";
32
        const string _Error = "Error";
33
        const string _EndProcess = "End Process";
34
        const string _Processing = "Processing";
35

  
36
        Thread autoModelingThread;
37
        Dictionary<string, Document> dicDocument = new Dictionary<string, Document>();
38
        private Dictionary<string, string> symbolMapping = new Dictionary<string, string>();
39
        private Dictionary<string, string> attributeMapping = new Dictionary<string, string>();
40
        List<string> needSymbolMapping = new List<string>();
41
        List<string> needAttributeMapping = new List<string>();
42
        private DataTable dUnit = new DataTable();
43
        private string TemplatePath;
44
        private string SymbolPath;
45

  
46
        DataTable converterDT = new DataTable();
47
        DataTable symbolDT = new DataTable();
48
        DataTable attributeDT = new DataTable();
49
        DataTable symbolPathDT = new DataTable();
50
        RepositoryItemComboBox templateComboBox;
51
        RepositoryItemComboBox attributeComboBox;
52

  
53
        public MainControl2()
54
        {
55
            InitializeComponent();
56

  
57
            if (InitPath())
58
            {
59
                InitDBSettingPage();
60
                if (SPPIDUtill.LoadDB())
61
                {
62
                    InitGridControl();
63
                    InitDBInformation();
64
                }
65
                else
66
                    MessageBox.Show("Please Check DB Setting", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
67
            }
68
            else
69
            {
70

  
71
            }
72
        }
73

  
74
        private void InitGridControl()
75
        {
76
            #region Converter Page
77
            gridViewConverter.OptionsSelection.MultiSelect = true;
78
            gridViewConverter.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
79

  
80
            DataColumn col = converterDT.Columns.Add("colDrawingFileName");
81
            col.Caption = "Drawing File Name";
82
            col = converterDT.Columns.Add("colUnit");
83
            col.Caption = "Unit";
84
            col = converterDT.Columns.Add("colTemplate");
85
            col.Caption = "Template";
86
            col = converterDT.Columns.Add("colDrawingNumber");
87
            col.Caption = "Drawing Number";
88
            col = converterDT.Columns.Add("colDrawingName");
89
            col.Caption = "Drawing Name";
90
            col = converterDT.Columns.Add("colStatus");
91
            col.Caption = "Status";
92
            col = converterDT.Columns.Add("colUID");
93
            gridControlConverter.DataSource = converterDT;
94

  
95
            templateComboBox = new RepositoryItemComboBox();
96
            templateComboBox.TextEditStyle = TextEditStyles.DisableTextEditor;
97
            gridControlConverter.RepositoryItems.Add(templateComboBox);
98
            gridViewConverter.Columns["colTemplate"].ColumnEdit = templateComboBox;
99

  
100
            RepositoryItemButtonEdit unitButton = new RepositoryItemButtonEdit();
101
            unitButton.ButtonClick += UnitButton_ButtonClick;
102
            unitButton.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
103
            gridControlConverter.RepositoryItems.Add(unitButton);
104
            gridViewConverter.Columns["colUnit"].ColumnEdit = unitButton;
105

  
106
            gridViewConverter.Columns["colDrawingFileName"].OptionsColumn.AllowEdit = false;
107
            gridViewConverter.Columns["colUnit"].OptionsColumn.ReadOnly = true;
108
            gridViewConverter.Columns["colStatus"].OptionsColumn.AllowEdit = false;
109
            gridViewConverter.Columns["colUID"].Visible = false;
110

  
111
            gridViewConverter.BestFitColumns();
112
            #endregion
113

  
114
            #region Mapping Page
115
            col = symbolDT.Columns.Add("colItemName");
116
            col.Caption = "Item Name";
117
            col = symbolDT.Columns.Add("colSPPIDName");
118
            col.Caption = "SPPID Name";
119
            gridControlSymbol.DataSource = symbolDT;
120
            RepositoryItemButtonEdit symbolButton = new RepositoryItemButtonEdit();
121
            symbolButton.ButtonClick += SymbolButton_ButtonClick;
122
            symbolButton.TextEditStyle = TextEditStyles.DisableTextEditor;
123
            gridControlSymbol.RepositoryItems.Add(symbolButton);
124
            gridViewSymbol.Columns["colSPPIDName"].ColumnEdit = symbolButton;
125
            gridViewSymbol.Columns["colItemName"].OptionsColumn.AllowEdit = false;
126

  
127
            col = attributeDT.Columns.Add("colAttribute");
128
            col.Caption = "Attribute Name";
129
            col = attributeDT.Columns.Add("colSPPIDAttribute");
130
            col.Caption = "SPPID Attribute Name";
131
            gridControlAttribute.DataSource = attributeDT;
132
            attributeComboBox = new RepositoryItemComboBox();
133
            attributeComboBox.TextEditStyle = TextEditStyles.DisableTextEditor;
134
            gridControlAttribute.RepositoryItems.Add(attributeComboBox);
135
            gridViewAttribute.Columns["colSPPIDAttribute"].ColumnEdit = attributeComboBox;
136
            gridViewAttribute.Columns["colAttribute"].OptionsColumn.AllowEdit = false;
137
            #endregion
138
        }
139

  
140
        private bool InitPath()
141
        {
142
            try
143
            {
144
                RegistryKey key = Registry.LocalMachine;
145
                RegistryKey software = key.OpenSubKey("SOFTWARE");
146
                RegistryKey DOFTECH = software.OpenSubKey("DOFTECH");
147
                if (DOFTECH != null)
148
                {
149
                    RegistryKey ID2 = DOFTECH.OpenSubKey("ID2");
150
                    if (ID2 != null)
151
                    {
152
                        SPPIDUtill.defaultPath = ID2.GetValue("Path").ToString();
153
                        Log.logPath = SPPIDUtill.defaultPath + @"Converter\SPPID Converter.log";
154
                        SPPIDUtill.mappingFilePath = SPPIDUtill.defaultPath + @"Converter\mapping.xml";
155
                        SPPIDUtill.dbFilePath = SPPIDUtill.defaultPath + @"Converter\DB.config";
156

  
157
                        return true;
158
                    }
159
                }
160
            }
161
            catch (Exception ex)
162
            {
163

  
164
            }
165

  
166
            return false;
167
        }
168

  
169
        public void InitDBInformation()
170
        {
171
            try
172
            {
173
                DBInformation dbInfo = DBInformation.GetInstance();
174
                if (dbInfo.Status)
175
                {
176
                    tbDBType.Text = dbInfo.DBType;
177
                    tbServiceName.Text = dbInfo.Service;
178
                    tbSiteName.Text = dbInfo.Site;
179
                    tbServerIP.Text = dbInfo.ServerIP;
180
                    tbPort.Text = dbInfo.Port;
181
                    tbDBUser.Text = dbInfo.DBUser;
182
                    tbDBPassword.Text = dbInfo.DBPassword;
183
                    comboBoxPlantList.Properties.Items.AddRange(dbInfo.PlantList);
184
                    comboBoxPlantList.SelectedIndex = dbInfo.PlantList.FindIndex(x => x == dbInfo.Plant);
185
                }
186

  
187
                // Unit DataTable
188
                dUnit = DB.GetUnitTree();
189

  
190
                // Template List
191
                TemplatePath = DB.GetPlantPID_T_OPTIONSETTING_Value("PID Template Path");
192
                if (!string.IsNullOrEmpty(TemplatePath))
193
                {
194
                    templateComboBox.Items.Clear();
195
                    templateComboBox.Items.AddRange(Directory.GetFiles(TemplatePath, "*.pid").ToList().Select(filePath => Path.GetFileName(filePath)).ToList());
196
                }
197

  
198
                // Symbol Path
199
                SymbolPath = DB.GetPlantPID_T_OPTIONSETTING_Value("Catalog Explorer root path");
200
                SetPathDataTable();
201

  
202
                // Load Mapping
203
                SPPIDUtill.LoadMapping(symbolMapping, attributeMapping);
204
                foreach (var item in symbolMapping)
205
                    symbolDT.Rows.Add(item.Key, item.Value);
206
                gridViewSymbol.BestFitColumns();
207

  
208
                // Attribute
209
                attributeComboBox.Items.Clear();
210
                attributeComboBox.Items.AddRange(DB.GetSPPIDAttribute());
211

  
212
                // Load Attribute
213
                foreach (var item in attributeMapping)
214
                    attributeDT.Rows.Add(new object[] { item.Key, item.Value });
215
            }
216
            catch (Exception ex)
217
            {
218

  
219
            }
220
        }
221

  
222
        private void SetPathDataTable()
223
        {
224
            symbolPathDT = new DataTable();
225
            symbolPathDT.Columns.Add("ID");
226
            symbolPathDT.Columns.Add("Parent");
227
            symbolPathDT.Columns.Add("Name");
228
            symbolPathDT.Columns.Add("FullPath");
229

  
230
            DirectoryInfo info = new DirectoryInfo(SymbolPath);
231
            symbolPathDT.Rows.Add(new object[] { "0", "-1", info.Name });
232
            loop(info, "0");
233
        }
234

  
235
        private void loop(DirectoryInfo parentInfo, string parentUID)
236
        {
237
            DirectoryInfo[] infos = parentInfo.GetDirectories();
238
            foreach (DirectoryInfo info in infos)
239
            {
240
                string uid = Guid.NewGuid().ToString();
241
                symbolPathDT.Rows.Add(new object[] { uid, parentUID, info.Name });
242
                loop(info, uid);
243

  
244
                FileInfo[] files = info.GetFiles("*.sym");
245
                foreach (FileInfo fileInfo in files)
246
                {
247
                    symbolPathDT.Rows.Add(new object[] { Guid.NewGuid().ToString(), uid, fileInfo.Name, fileInfo.FullName.Replace(SymbolPath, "") });
248
                }
249
            }
250
        }
251

  
252
        public void InitDBSettingPage()
253
        {
254
            comboBoxPlantList.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
255
            textBoxFittingSymbolPath.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
256
        }
257

  
258
        private void tabControl_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
259
        {
260
            if (e.Page.Name == "pageItemMapping")
261
            {
262
                gridViewSymbol.BeginUpdate();
263
                gridViewAttribute.BeginUpdate();
264

  
265
                symbolDT.Rows.Clear();
266
                attributeDT.Rows.Clear();
267

  
268
                foreach (var item in symbolMapping)
269
                {
270
                    if (item.Key == "FittingSymbolPath")
271
                    {
272
                        textBoxFittingSymbolPath.EditValue = item.Value;
273
                    }
274
                    else
275
                    {
276
                        symbolDT.Rows.Add(item.Key, item.Value);
277
                    }
278
                }
279
                foreach (var item in attributeMapping)
280
                {
281
                    if (item.Key == "LargeSize")
282
                    {
283
                        if (radioGroupReducer.Properties.Items[0].Tag.ToString() == item.Value)
284
                            radioGroupReducer.SelectedIndex = 0;
285
                        else
286
                            radioGroupReducer.SelectedIndex = 1;
287
                    }
288
                    else if (item.Key != "SmallSize")
289
                    {
290
                        attributeDT.Rows.Add(new object[] { item.Key, item.Value });
291
                    }
292
                }
293

  
294
                needSymbolMapping = needSymbolMapping.Distinct().ToList();
295
                foreach (string item in needSymbolMapping)
296
                {
297
                    if (!symbolMapping.ContainsKey(item))
298
                        symbolDT.Rows.Add(item, "");
299
                }
300
                needAttributeMapping = needAttributeMapping.Distinct().ToList();
301
                foreach (string item in needAttributeMapping)
302
                {
303
                    if (!attributeMapping.ContainsKey(item))
304
                        attributeDT.Rows.Add(item, "");
305
                }
306

  
307
                gridViewSymbol.EndUpdate();
308
                gridViewAttribute.EndUpdate();
309
            }
310
        }
311

  
312

  
313
        #region Converter Page
314

  
315
        private void RefreshGridViewDrawingList()
316
        {
317
            if (gridControlConverter.InvokeRequired)
318
            {
319
                gridControlConverter.BeginInvoke(new Action(() => gridControlConverter.Refresh()));
320
                Thread.Sleep(1);
321
            }
322
            else
323
            {
324
                gridControlConverter.Refresh();
325
            }
326
        }
327

  
328
        private void btnLoadFiles_Click(object sender, EventArgs e)
329
        {
330
            OpenFileDialog dia = new OpenFileDialog();
331
            dia.Multiselect = true;
332
            dia.Filter = "Xml Files(*.xml)|*.xml";
333
            if (dia.ShowDialog() == DialogResult.OK)
334
            {
335
                foreach (string fileName in dia.FileNames)
336
                {
337
                    try
338
                    {
339
                        DataRow row = converterDT.NewRow();
340
                        Document document = Document.Load(fileName, symbolMapping, attributeMapping);
341

  
342
                        if (document == null)
343
                        {
344
                            row[""] = fileName;
345
                            row["colDrawingFileName"] = fileName;
346
                            row["colStatus"] = _LoadFail;
347
                        }
348
                        else
349
                        {
350
                            row["colDrawingFileName"] = document.DWGNAME;
351
                            row["colDrawingNumber"] = document.DWGNAME;
352
                            row["colDrawingName"] = document.DWGNAME;
353
                        }
354
                        string sUID = Guid.NewGuid().ToString();
355
                        row["colUID"] = sUID;
356
                        dicDocument.Add(sUID, document);
357
                        converterDT.Rows.Add(row);
358
                        gridViewConverter.BestFitColumns();
359
                    }
360
                    catch (Exception ex)
361
                    {
362

  
363
                    }
364
                }
365
            }
366
        }
367

  
368
        private void btnRun_Click(object sender, EventArgs e)
369
        {
370
            if (!CheckDB())
371
            {
372
                MessageBox.Show("Please Check DB Setting", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
373
                return;
374
            }
375

  
376
            if (gridViewConverter.SelectedRowsCount > 0)
377
            {
378
                if (DialogResult.OK == MessageBox.Show("SPPID Converter를 실행하시겠습니까?", "Question", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
379
                {
380
                    try
381
                    {
382
                        ProgressForm.stop = false;
383
                        foreach (int rowHandle in gridViewConverter.GetSelectedRows())
384
                        {
385
                            try
386
                            {
387
                                
388

  
389
                                string sStatus = gridViewConverter.GetRowCellDisplayText(rowHandle, "colStatus");
390

  
391
                                if (sStatus == _Ready && !ProgressForm.stop)
392
                                {
393
                                    gridViewConverter.SetRowCellValue(rowHandle, "colStatus", _Processing);
394
                                    RefreshGridViewDrawingList();
395

  
396
                                    string sUnit = gridViewConverter.GetRowCellDisplayText(rowHandle, "colUnit");
397
                                    string sTemplate = TemplatePath + @"\" + gridViewConverter.GetRowCellDisplayText(rowHandle, "colTemplate");
398
                                    string sDrawingNumber = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingNumber");
399
                                    string sDrawingName = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingName");
400

  
401
                                    //
402
                                    dynamic application = Interaction.GetObject("", "PIDAutomation.Application");
403
                                    dynamic newDrawing = application.Drawings.Add(sUnit, sTemplate, sDrawingNumber, sDrawingName);
404
                                    application.ActiveWindow.Fit();
405
                                    Thread.Sleep(100);
406
                                    application.ActiveWindow.Zoom = 2000;
407
                                    Thread.Sleep(100);
408
                                    //
409

  
410
                                    Document document = dicDocument[gridViewConverter.GetRowCellDisplayText(rowHandle, "colUID")];
411
                                    autoModelingThread = new Thread(Func =>
412
                                    {
413
                                        try
414
                                        {
415
                                            Thread.Sleep(500);
416
                                            ProgressForm.UpdateDocument(document.DWGNAME);
417
                                            AutoModeling auto = new AutoModeling(document);
418
                                            auto.Run();
419
                                            ProgressForm.End();
420
                                        }
421
                                        catch (Exception ex)
422
                                        {
423
                                            Log.WriteLine(ex);
424
                                        }
425
                                    });
426
                                    ProgressForm.Start(autoModelingThread);
427

  
428
                                    gridViewConverter.SetRowCellValue(rowHandle, "colStatus", _EndProcess);
429
                                    RefreshGridViewDrawingList();
430
                                    application.ActiveWindow.Fit();
431
                                    Thread.Sleep(100);
432
                                    newDrawing.CloseDrawing(true);
433
                                    Thread.Sleep(100);
434
                                }
435
                            }
436
                            catch (Exception ex)
437
                            {
438
                                gridViewConverter.SetRowCellValue(rowHandle, "colStatus", _Error);
439
                            }
440
                        }
441
                    }
442
                    catch (Exception ex)
443
                    {
444
                        MessageBox.Show(ex.Message);
445
                    }
446
                }
447
            }
448
            else
449
            {
450
                MessageBox.Show("도면을 선택해주세요!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
451
            }
452
        }
453

  
454
        private void UnitButton_ButtonClick(object sender, ButtonPressedEventArgs e)
455
        {
456
            UnitForm unitForm = new UnitForm(dUnit);
457
            if (unitForm.ShowDialog() == DialogResult.OK)
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff