프로젝트

일반

사용자정보

개정판 8562d7dc

ID8562d7dc80f8cda2abeaafd60c4c81e1cdf1d987
상위 fdb1367e
하위 43541380

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #1228 : project info instance 수정

Change-Id: I10814cbad7b00860649805cd6ddd4d6dd103422e

차이점 보기:

DTI_PID/APIDConverter/Form/APIDConverter.Designer.cs
33 33
            this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl();
34 34
            this.defaultLookAndFeel1 = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
35 35
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
36
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
37
            this.btnLoadFile = new DevExpress.XtraEditors.SimpleButton();
38
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
39
            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
36
            this.btnRun = new DevExpress.XtraEditors.SimpleButton();
40 37
            this.gridControlConverter = new DevExpress.XtraGrid.GridControl();
41 38
            this.gridViewConverter = new DevExpress.XtraGrid.Views.Grid.GridView();
39
            this.btnLoadFile = new DevExpress.XtraEditors.SimpleButton();
40
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
41
            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
42 42
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
43
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
43 44
            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
44
            this.btnRun = new DevExpress.XtraEditors.SimpleButton();
45 45
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
46 46
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
47 47
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
48 48
            this.layoutControl1.SuspendLayout();
49
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
50
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
51
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
52 49
            ((System.ComponentModel.ISupportInitialize)(this.gridControlConverter)).BeginInit();
53 50
            ((System.ComponentModel.ISupportInitialize)(this.gridViewConverter)).BeginInit();
51
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
52
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
54 53
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
54
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
55 55
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
56 56
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
57 57
            this.SuspendLayout();
......
88 88
            this.layoutControl1.TabIndex = 1;
89 89
            this.layoutControl1.Text = "layoutControl1";
90 90
            // 
91
            // Root
91
            // btnRun
92 92
            // 
93
            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
94
            this.Root.GroupBordersVisible = false;
95
            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
96
            this.layoutControlGroup1});
97
            this.Root.Name = "Root";
98
            this.Root.Size = new System.Drawing.Size(856, 437);
99
            this.Root.TextVisible = false;
93
            this.btnRun.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnRun.ImageOptions.SvgImage")));
94
            this.btnRun.Location = new System.Drawing.Point(753, 58);
95
            this.btnRun.Name = "btnRun";
96
            this.btnRun.Size = new System.Drawing.Size(79, 36);
97
            this.btnRun.StyleController = this.layoutControl1;
98
            this.btnRun.TabIndex = 6;
99
            this.btnRun.Text = "  Run  ";
100
            // 
101
            // gridControlConverter
102
            // 
103
            this.gridControlConverter.Location = new System.Drawing.Point(24, 98);
104
            this.gridControlConverter.MainView = this.gridViewConverter;
105
            this.gridControlConverter.MenuManager = this.ribbonControl;
106
            this.gridControlConverter.Name = "gridControlConverter";
107
            this.gridControlConverter.Size = new System.Drawing.Size(808, 315);
108
            this.gridControlConverter.TabIndex = 5;
109
            this.gridControlConverter.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
110
            this.gridViewConverter});
111
            // 
112
            // gridViewConverter
113
            // 
114
            this.gridViewConverter.GridControl = this.gridControlConverter;
115
            this.gridViewConverter.Name = "gridViewConverter";
116
            this.gridViewConverter.OptionsView.ShowGroupPanel = false;
100 117
            // 
101 118
            // btnLoadFile
102 119
            // 
103
            this.btnLoadFile.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("simpleButton1.ImageOptions.SvgImage")));
120
            this.btnLoadFile.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnLoadFile.ImageOptions.SvgImage")));
104 121
            this.btnLoadFile.Location = new System.Drawing.Point(24, 58);
105 122
            this.btnLoadFile.Name = "btnLoadFile";
106 123
            this.btnLoadFile.Size = new System.Drawing.Size(110, 36);
......
109 126
            this.btnLoadFile.Text = "  Load Files  ";
110 127
            this.btnLoadFile.Click += new System.EventHandler(this.btnLoadFile_Click);
111 128
            // 
112
            // layoutControlItem1
129
            // Root
113 130
            // 
114
            this.layoutControlItem1.Control = this.btnLoadFile;
115
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
116
            this.layoutControlItem1.MaxSize = new System.Drawing.Size(114, 40);
117
            this.layoutControlItem1.MinSize = new System.Drawing.Size(114, 40);
118
            this.layoutControlItem1.Name = "layoutControlItem1";
119
            this.layoutControlItem1.Size = new System.Drawing.Size(114, 40);
120
            this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
121
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
122
            this.layoutControlItem1.TextVisible = false;
131
            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
132
            this.Root.GroupBordersVisible = false;
133
            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
134
            this.layoutControlGroup1});
135
            this.Root.Name = "Root";
136
            this.Root.Size = new System.Drawing.Size(856, 437);
137
            this.Root.TextVisible = false;
123 138
            // 
124 139
            // layoutControlGroup1
125 140
            // 
......
135 150
            this.layoutControlGroup1.Size = new System.Drawing.Size(836, 417);
136 151
            this.layoutControlGroup1.Text = "Auto Converter";
137 152
            // 
138
            // gridControlConverter
139
            // 
140
            this.gridControlConverter.Location = new System.Drawing.Point(24, 98);
141
            this.gridControlConverter.MainView = this.gridViewConverter;
142
            this.gridControlConverter.MenuManager = this.ribbonControl;
143
            this.gridControlConverter.Name = "gridControlConverter";
144
            this.gridControlConverter.Size = new System.Drawing.Size(808, 315);
145
            this.gridControlConverter.TabIndex = 5;
146
            this.gridControlConverter.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
147
            this.gridViewConverter});
148
            // 
149
            // gridViewConverter
150
            // 
151
            this.gridViewConverter.GridControl = this.gridControlConverter;
152
            this.gridViewConverter.Name = "gridViewConverter";
153
            this.gridViewConverter.OptionsView.ShowGroupPanel = false;
154
            // 
155 153
            // layoutControlItem2
156 154
            // 
157 155
            this.layoutControlItem2.Control = this.gridControlConverter;
......
161 159
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
162 160
            this.layoutControlItem2.TextVisible = false;
163 161
            // 
162
            // layoutControlItem1
163
            // 
164
            this.layoutControlItem1.Control = this.btnLoadFile;
165
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
166
            this.layoutControlItem1.MaxSize = new System.Drawing.Size(114, 40);
167
            this.layoutControlItem1.MinSize = new System.Drawing.Size(114, 40);
168
            this.layoutControlItem1.Name = "layoutControlItem1";
169
            this.layoutControlItem1.Size = new System.Drawing.Size(114, 40);
170
            this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
171
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
172
            this.layoutControlItem1.TextVisible = false;
173
            // 
164 174
            // emptySpaceItem1
165 175
            // 
166 176
            this.emptySpaceItem1.AllowHotTrack = false;
......
169 179
            this.emptySpaceItem1.Size = new System.Drawing.Size(615, 40);
170 180
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
171 181
            // 
172
            // btnRun
173
            // 
174
            this.btnRun.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnRun.ImageOptions.SvgImage")));
175
            this.btnRun.Location = new System.Drawing.Point(753, 58);
176
            this.btnRun.Name = "btnRun";
177
            this.btnRun.Size = new System.Drawing.Size(79, 36);
178
            this.btnRun.StyleController = this.layoutControl1;
179
            this.btnRun.TabIndex = 6;
180
            this.btnRun.Text = "  Run  ";
181
            // 
182 182
            // layoutControlItem3
183 183
            // 
184 184
            this.layoutControlItem3.Control = this.btnRun;
......
202 202
            this.Ribbon = this.ribbonControl;
203 203
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
204 204
            this.Text = "APID Converter";
205
            this.Load += new System.EventHandler(this.APIDConverter_Load);
205 206
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit();
206 207
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
207 208
            this.layoutControl1.ResumeLayout(false);
208
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
209
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
210
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
211 209
            ((System.ComponentModel.ISupportInitialize)(this.gridControlConverter)).EndInit();
212 210
            ((System.ComponentModel.ISupportInitialize)(this.gridViewConverter)).EndInit();
211
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
212
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
213 213
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
214
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
214 215
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
215 216
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
216 217
            this.ResumeLayout(false);
DTI_PID/APIDConverter/Form/APIDConverter.cs
37 37
                }
38 38
            }
39 39
        }
40

  
41
        private void APIDConverter_Load(object sender, EventArgs e)
42
        {
43
            Project_Info project = Project_Info.GetInstance();
44
            if (!project.Enable)
45
            {
46
                MessageBox.Show("Check Project Setting!", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Warning);
47
            }
48
        }
40 49
    }
41 50
}
DTI_PID/APIDConverter/Form/APIDConverter.resx
135 135
        RDciIGNsYXNzPSJCbHVlIiAvPg0KPC9zdmc+Cw==
136 136
</value>
137 137
  </data>
138
  <data name="simpleButton1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v18.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
138
  <data name="btnLoadFile.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v18.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
139 139
    <value>
140 140
        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE4LjIsIFZlcnNpb249MTguMi43
141 141
        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
DTI_PID/APIDConverter/Form/MappingForm.Designer.cs
57 57
            this.Ribbon = this.ribbonControl;
58 58
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
59 59
            this.Text = "Item Mapping";
60
            this.Load += new System.EventHandler(this.MappingForm_Load);
60 61
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit();
61 62
            this.ResumeLayout(false);
62 63
            this.PerformLayout();
DTI_PID/APIDConverter/Form/MappingForm.cs
7 7
using System.Text;
8 8
using System.Threading.Tasks;
9 9
using System.Windows.Forms;
10
using AVEVA.PID.CustomizationUtility.DB;
11
using AVEVA.PID.CustomizationUtility.Model;
12
using AVEVA.PID.CustomizationUtility.Properties;
10 13

  
11 14
namespace AVEVA.PID.CustomizationUtility
12 15
{
......
16 19
        {
17 20
            InitializeComponent();
18 21
        }
22

  
23
        private void MappingForm_Load(object sender, EventArgs e)
24
        {
25
            Project_Info project = Project_Info.GetInstance();
26
            if (!project.Enable)
27
            {
28
                MessageBox.Show("Check Project Setting!", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Warning);
29
            }
30
        }
19 31
    }
20 32
}
DTI_PID/APIDConverter/PIDCustomization.cs
20 20
using Autodesk.AutoCAD.Runtime;
21 21
using Autodesk.AutoCAD.Windows;
22 22
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
23
using AVEVA.PID.CustomizationUtility.DB;
24
using AVEVA.PID.CustomizationUtility.Model;
25
using AVEVA.PID.CustomizationUtility.Properties;
26

  
23 27
#endregion using namespaces
24 28
namespace AVEVA.PID.CustomizationUtility
25 29
{
......
117 121
            ProjectForm form = new ProjectForm();
118 122
            if (AcadApp.ShowModalDialog(form) == DialogResult.OK)
119 123
            {
124
                Project_Info _ProjectInfo = Project_Info.GetInstance();
125
                _ProjectInfo.DefaultPath = Settings.Default.ProjectPath;
126
                _ProjectInfo.DBType = (ID2DB_Type)Settings.Default.ProjectDBType;
127
                _ProjectInfo.ServerIP = Settings.Default.ProjectServerIP;
128
                _ProjectInfo.Port = Settings.Default.ProjectPort;
129
                _ProjectInfo.DBUser = Settings.Default.ProjectDBUser;
130
                _ProjectInfo.DBPassword = Settings.Default.ProjectDBPassword;
120 131

  
132
                if (Project_DB.ConnTestAndCreateTable())
133
                {
134
                    _ProjectInfo.Enable = true;
135
                    MessageBox.Show("Success project setting", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Information);
136
                }
137
                else
138
                {
139
                    _ProjectInfo.Enable = false;
140
                    MessageBox.Show("Fail project setting", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Error);
141
                }
142
                    
121 143
            }
122 144
        }
123 145
        [CommandMethod("MappingForm")]
......
314 336
            {
315 337
                if (objIdBlockId != ObjectId.Null)
316 338
                {
317
                    Document doc = AcadApp.DocumentManager.MdiActiveDocument;
339
                    Autodesk.AutoCAD.ApplicationServices.Document doc = AcadApp.DocumentManager.MdiActiveDocument;
318 340
                    Database db = HostApplicationServices.WorkingDatabase;
319 341
                    trans = doc.TransactionManager.StartTransaction();
320 342
                    using (doc.LockDocument())

내보내기 Unified diff

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