개정판 53a4ebb8
dev issue #1228 : project setting form
Change-Id: Ib345dc422a8430a22726e69e53ab322492b42d7a
DTI_PID/APIDConverter/AVEVA.PID.CustomizationUtility_ACAD2018_x64.csproj | ||
---|---|---|
17 | 17 |
<SccAuxPath>SAK</SccAuxPath> |
18 | 18 |
<SccProvider>SAK</SccProvider> |
19 | 19 |
<TargetFrameworkProfile /> |
20 |
<NuGetPackageImportStamp> |
|
21 |
</NuGetPackageImportStamp> |
|
20 | 22 |
</PropertyGroup> |
21 | 23 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> |
22 | 24 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
71 | 73 |
<Private>False</Private> |
72 | 74 |
</Reference> |
73 | 75 |
<Reference Include="DevExpress.Data.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
76 |
<Reference Include="DevExpress.Dialogs.v18.2.Core, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
|
74 | 77 |
<Reference Include="DevExpress.Printing.v18.2.Core, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
75 | 78 |
<Reference Include="DevExpress.Utils.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> |
76 | 79 |
<Reference Include="DevExpress.XtraBars.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> |
80 |
<Reference Include="DevExpress.XtraDialogs.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> |
|
77 | 81 |
<Reference Include="DevExpress.XtraEditors.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
82 |
<Reference Include="DevExpress.XtraGrid.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
|
83 |
<Reference Include="DevExpress.XtraLayout.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> |
|
84 |
<Reference Include="DevExpress.XtraTreeList.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
|
78 | 85 |
<Reference Include="Microsoft.VisualBasic" /> |
86 |
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|
87 |
<SpecificVersion>False</SpecificVersion> |
|
88 |
<HintPath>C:\Program Files\AVEVA\P&ID 12.2.SP1\Install\Exe\Newtonsoft.Json.dll</HintPath> |
|
89 |
</Reference> |
|
79 | 90 |
<Reference Include="PresentationCore" /> |
80 | 91 |
<Reference Include="PresentationFramework" /> |
81 | 92 |
<Reference Include="System" /> |
82 | 93 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
83 | 94 |
<Reference Include="System.Core" /> |
95 |
<Reference Include="System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> |
|
96 |
<HintPath>..\packages\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll</HintPath> |
|
97 |
</Reference> |
|
84 | 98 |
<Reference Include="System.Drawing" /> |
85 | 99 |
<Reference Include="System.Runtime.Remoting" /> |
86 | 100 |
<Reference Include="System.Windows.Forms" /> |
... | ... | |
93 | 107 |
<Reference Include="WindowsBase" /> |
94 | 108 |
</ItemGroup> |
95 | 109 |
<ItemGroup> |
110 |
<Compile Include="DB\Project_DB.cs" /> |
|
111 |
<Compile Include="Form\ID2DBSetting.cs"> |
|
112 |
<SubType>Form</SubType> |
|
113 |
</Compile> |
|
114 |
<Compile Include="Form\ID2DBSetting.Designer.cs"> |
|
115 |
<DependentUpon>ID2DBSetting.cs</DependentUpon> |
|
116 |
</Compile> |
|
96 | 117 |
<Compile Include="Model\PlantItem\Document.cs" /> |
97 | 118 |
<Compile Include="Model\PlantItem\Equipment.cs" /> |
98 |
<Compile Include="Model\Project_DB.cs" /> |
|
99 | 119 |
<Compile Include="Model\Project_Info.cs" /> |
120 |
<Compile Include="Properties\Settings.Designer.cs"> |
|
121 |
<AutoGen>True</AutoGen> |
|
122 |
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|
123 |
<DependentUpon>Settings.settings</DependentUpon> |
|
124 |
</Compile> |
|
100 | 125 |
<Compile Include="Utils\APIDUtils.cs" /> |
101 | 126 |
<Compile Include="Form\APIDConverter.cs"> |
102 | 127 |
<SubType>Form</SubType> |
... | ... | |
132 | 157 |
<EmbeddedResource Include="Form\APIDConverter.resx"> |
133 | 158 |
<DependentUpon>APIDConverter.cs</DependentUpon> |
134 | 159 |
</EmbeddedResource> |
160 |
<EmbeddedResource Include="Form\ID2DBSetting.resx"> |
|
161 |
<DependentUpon>ID2DBSetting.cs</DependentUpon> |
|
162 |
</EmbeddedResource> |
|
135 | 163 |
<EmbeddedResource Include="Form\ProjectForm.resx"> |
136 | 164 |
<DependentUpon>ProjectForm.cs</DependentUpon> |
137 | 165 |
</EmbeddedResource> |
... | ... | |
140 | 168 |
</EmbeddedResource> |
141 | 169 |
<EmbeddedResource Include="Properties\licenses.licx" /> |
142 | 170 |
</ItemGroup> |
171 |
<ItemGroup> |
|
172 |
<None Include="packages.config" /> |
|
173 |
<None Include="Properties\Settings.settings"> |
|
174 |
<Generator>SettingsSingleFileGenerator</Generator> |
|
175 |
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|
176 |
</None> |
|
177 |
</ItemGroup> |
|
143 | 178 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
179 |
<Import Project="..\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets')" /> |
|
180 |
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
|
181 |
<PropertyGroup> |
|
182 |
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText> |
|
183 |
</PropertyGroup> |
|
184 |
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets'))" /> |
|
185 |
</Target> |
|
144 | 186 |
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
145 | 187 |
Other similar extension points exist, see Microsoft.Common.targets. |
146 | 188 |
<Target Name="BeforeBuild"> |
DTI_PID/APIDConverter/DB/Project_DB.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
using System.Globalization; |
|
7 |
using System.Data.SQLite; |
|
8 |
using System.Data; |
|
9 |
using System.Data.SqlClient; |
|
10 |
using System.IO; |
|
11 |
using Newtonsoft.Json; |
|
12 |
using AVEVA.PID.CustomizationUtility; |
|
13 |
using AVEVA.PID.CustomizationUtility.Model; |
|
14 |
|
|
15 |
namespace AVEVA.PID.CustomizationUtility.DB |
|
16 |
{ |
|
17 |
public class Project_DB |
|
18 |
{ |
|
19 |
const string SPPID_DB_INFO_TABLE = "T_SPPID_CONNECTION_INFO"; |
|
20 |
const string SPPID_SYMBOL_MAPPING_TABLE = "T_SPPID_SYMBOL_MAPPING"; |
|
21 |
const string SPPID_ATTRIBUTE_MAPPING_TABLE = "T_SPPID_ATTRIBUTE_MAPPING"; |
|
22 |
const string SPPID_SETTING_TABLE = "T_SPPID_SETTING_TABLE"; |
|
23 |
const string SPPID_LABEL_INFO_TABLE = "T_SPPID_LABEL_INFO"; |
|
24 |
const string SPPID_DRAWING_INFO = "T_SPPID_DRAWING_INFO"; |
|
25 |
const string SPPID_OPC_INFO = "T_SPPID_OPC_INFO"; |
|
26 |
|
|
27 |
const string LineProperties_TABLE = "LineProperties"; |
|
28 |
const string LineTypes_TABLE = "LineTypes"; |
|
29 |
const string SymbolType_TABLE = "SymbolType"; |
|
30 |
const string SymbolAttribute_TABLE = "SymbolAttribute"; |
|
31 |
const string Symbol_TABLE = "Symbol"; |
|
32 |
const string OPCRelations_TABLE = "OPCRelations"; |
|
33 |
|
|
34 |
private static SqlConnection GetSqlConnection() |
|
35 |
{ |
|
36 |
Project_Info projectInfo = Project_Info.GetInstance(); |
|
37 |
SqlConnection connection = null; |
|
38 |
try |
|
39 |
{ |
|
40 |
connection = new SqlConnection(string.Format(CultureInfo.CurrentCulture, |
|
41 |
@"Data Source = {0},{1}; Initial CataLog = {2}; User ID = {3}; Password = {4};", |
|
42 |
projectInfo.ServerIP, |
|
43 |
projectInfo.Port, |
|
44 |
System.IO.Path.GetFileName(projectInfo.DefaultPath), |
|
45 |
projectInfo.DBUser, |
|
46 |
projectInfo.DBPassword)); |
|
47 |
|
|
48 |
connection.Open(); |
|
49 |
} |
|
50 |
catch (Exception ex) |
|
51 |
{ |
|
52 |
//Log.Write(ex.Message + "\r\n" + ex.StackTrace); |
|
53 |
if (connection != null) |
|
54 |
connection.Dispose(); |
|
55 |
connection = null; |
|
56 |
} |
|
57 |
|
|
58 |
return connection; |
|
59 |
} |
|
60 |
|
|
61 |
public static bool ConnTestAndCreateTable() |
|
62 |
{ |
|
63 |
bool result = false; |
|
64 |
Project_Info projectInfo = Project_Info.GetInstance(); |
|
65 |
if (projectInfo.DBType == ID2DB_Type.SQLite) |
|
66 |
{ |
|
67 |
using (SQLiteConnection connection = new SQLiteConnection(string.Format(CultureInfo.CurrentCulture, @"Data Source = {0}", projectInfo.DBFilePath))) |
|
68 |
{ |
|
69 |
try |
|
70 |
{ |
|
71 |
connection.Open(); |
|
72 |
if (connection.State == ConnectionState.Open) |
|
73 |
{ |
|
74 |
using (SQLiteCommand cmd = connection.CreateCommand()) |
|
75 |
{ |
|
76 |
|
|
77 |
} |
|
78 |
result = true; |
|
79 |
} |
|
80 |
connection.Close(); |
|
81 |
} |
|
82 |
catch (Exception ex) |
|
83 |
{ |
|
84 |
//Log.Write(ex.Message + "\r\n" + ex.StackTrace); |
|
85 |
} |
|
86 |
finally |
|
87 |
{ |
|
88 |
connection.Dispose(); |
|
89 |
} |
|
90 |
} |
|
91 |
} |
|
92 |
else if (projectInfo.DBType == ID2DB_Type.MSSQL) |
|
93 |
{ |
|
94 |
using (SqlConnection connection = GetSqlConnection()) |
|
95 |
{ |
|
96 |
try |
|
97 |
{ |
|
98 |
if (connection != null && connection.State == ConnectionState.Open) |
|
99 |
{ |
|
100 |
using (SqlCommand cmd = connection.CreateCommand()) |
|
101 |
{ |
|
102 |
|
|
103 |
} |
|
104 |
result = true; |
|
105 |
} |
|
106 |
} |
|
107 |
catch (Exception ex) |
|
108 |
{ |
|
109 |
//Log.Write(ex.Message + "\r\n" + ex.StackTrace); |
|
110 |
} |
|
111 |
finally |
|
112 |
{ |
|
113 |
if (connection != null) |
|
114 |
connection.Dispose(); |
|
115 |
} |
|
116 |
} |
|
117 |
} |
|
118 |
|
|
119 |
return result; |
|
120 |
} |
|
121 |
|
|
122 |
} |
|
123 |
} |
DTI_PID/APIDConverter/Form/ProjectForm.Designer.cs | ||
---|---|---|
1 | 1 |
namespace AVEVA.PID.CustomizationUtility |
2 | 2 |
{ |
3 |
partial class ProjectForm
|
|
3 |
partial class ID2DBSetting
|
|
4 | 4 |
{ |
5 | 5 |
/// <summary> |
6 | 6 |
/// Required designer variable. |
... | ... | |
28 | 28 |
/// </summary> |
29 | 29 |
private void InitializeComponent() |
30 | 30 |
{ |
31 |
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ID2DBSetting)); |
|
31 | 32 |
this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl(); |
33 |
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); |
|
34 |
this.textBoxPort = new DevExpress.XtraEditors.TextEdit(); |
|
35 |
this.textBoxDBPassword = new DevExpress.XtraEditors.TextEdit(); |
|
36 |
this.textBoxDBUser = new DevExpress.XtraEditors.TextEdit(); |
|
37 |
this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); |
|
38 |
this.btnSave = new DevExpress.XtraEditors.SimpleButton(); |
|
39 |
this.textBoxProjectDriectory = new DevExpress.XtraEditors.ButtonEdit(); |
|
40 |
this.radioGroup = new DevExpress.XtraEditors.RadioGroup(); |
|
41 |
this.textBoxServerIP = new DevExpress.XtraEditors.TextEdit(); |
|
42 |
this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
|
43 |
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
44 |
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
45 |
this.layoutControlInfo = new DevExpress.XtraLayout.LayoutControlGroup(); |
|
46 |
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
47 |
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
48 |
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
49 |
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
50 |
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); |
|
51 |
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
52 |
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
53 |
this.xtraFolderBrowserDialog = new DevExpress.XtraEditors.XtraFolderBrowserDialog(); |
|
32 | 54 |
((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit(); |
55 |
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); |
|
56 |
this.layoutControl1.SuspendLayout(); |
|
57 |
((System.ComponentModel.ISupportInitialize)(this.textBoxPort.Properties)).BeginInit(); |
|
58 |
((System.ComponentModel.ISupportInitialize)(this.textBoxDBPassword.Properties)).BeginInit(); |
|
59 |
((System.ComponentModel.ISupportInitialize)(this.textBoxDBUser.Properties)).BeginInit(); |
|
60 |
((System.ComponentModel.ISupportInitialize)(this.textBoxProjectDriectory.Properties)).BeginInit(); |
|
61 |
((System.ComponentModel.ISupportInitialize)(this.radioGroup.Properties)).BeginInit(); |
|
62 |
((System.ComponentModel.ISupportInitialize)(this.textBoxServerIP.Properties)).BeginInit(); |
|
63 |
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); |
|
64 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); |
|
65 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); |
|
66 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlInfo)).BeginInit(); |
|
67 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); |
|
68 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); |
|
69 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); |
|
70 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); |
|
71 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit(); |
|
72 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); |
|
73 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); |
|
33 | 74 |
this.SuspendLayout(); |
34 | 75 |
// |
35 | 76 |
// ribbonControl |
... | ... | |
44 | 85 |
this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False; |
45 | 86 |
this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; |
46 | 87 |
this.ribbonControl.ShowToolbarCustomizeItem = false; |
47 |
this.ribbonControl.Size = new System.Drawing.Size(467, 32);
|
|
88 |
this.ribbonControl.Size = new System.Drawing.Size(413, 32);
|
|
48 | 89 |
this.ribbonControl.Toolbar.ShowCustomizeItem = false; |
49 | 90 |
// |
50 |
// ProjectForm |
|
91 |
// layoutControl1 |
|
92 |
// |
|
93 |
this.layoutControl1.Controls.Add(this.textBoxPort); |
|
94 |
this.layoutControl1.Controls.Add(this.textBoxDBPassword); |
|
95 |
this.layoutControl1.Controls.Add(this.textBoxDBUser); |
|
96 |
this.layoutControl1.Controls.Add(this.btnCancel); |
|
97 |
this.layoutControl1.Controls.Add(this.btnSave); |
|
98 |
this.layoutControl1.Controls.Add(this.textBoxProjectDriectory); |
|
99 |
this.layoutControl1.Controls.Add(this.radioGroup); |
|
100 |
this.layoutControl1.Controls.Add(this.textBoxServerIP); |
|
101 |
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; |
|
102 |
this.layoutControl1.Location = new System.Drawing.Point(0, 32); |
|
103 |
this.layoutControl1.Name = "layoutControl1"; |
|
104 |
this.layoutControl1.Root = this.Root; |
|
105 |
this.layoutControl1.Size = new System.Drawing.Size(413, 334); |
|
106 |
this.layoutControl1.TabIndex = 1; |
|
107 |
this.layoutControl1.Text = "layoutControl1"; |
|
108 |
// |
|
109 |
// textBoxPort |
|
110 |
// |
|
111 |
this.textBoxPort.Location = new System.Drawing.Point(119, 202); |
|
112 |
this.textBoxPort.MenuManager = this.ribbonControl; |
|
113 |
this.textBoxPort.Name = "textBoxPort"; |
|
114 |
this.textBoxPort.Size = new System.Drawing.Size(270, 20); |
|
115 |
this.textBoxPort.StyleController = this.layoutControl1; |
|
116 |
this.textBoxPort.TabIndex = 13; |
|
117 |
// |
|
118 |
// textBoxDBPassword |
|
119 |
// |
|
120 |
this.textBoxDBPassword.Location = new System.Drawing.Point(119, 250); |
|
121 |
this.textBoxDBPassword.MenuManager = this.ribbonControl; |
|
122 |
this.textBoxDBPassword.Name = "textBoxDBPassword"; |
|
123 |
this.textBoxDBPassword.Properties.PasswordChar = '*'; |
|
124 |
this.textBoxDBPassword.Size = new System.Drawing.Size(270, 20); |
|
125 |
this.textBoxDBPassword.StyleController = this.layoutControl1; |
|
126 |
this.textBoxDBPassword.TabIndex = 12; |
|
127 |
// |
|
128 |
// textBoxDBUser |
|
129 |
// |
|
130 |
this.textBoxDBUser.Location = new System.Drawing.Point(119, 226); |
|
131 |
this.textBoxDBUser.MenuManager = this.ribbonControl; |
|
132 |
this.textBoxDBUser.Name = "textBoxDBUser"; |
|
133 |
this.textBoxDBUser.Size = new System.Drawing.Size(270, 20); |
|
134 |
this.textBoxDBUser.StyleController = this.layoutControl1; |
|
135 |
this.textBoxDBUser.TabIndex = 11; |
|
136 |
// |
|
137 |
// btnCancel |
|
138 |
// |
|
139 |
this.btnCancel.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnCancel.ImageOptions.SvgImage"))); |
|
140 |
this.btnCancel.Location = new System.Drawing.Point(208, 286); |
|
141 |
this.btnCancel.Name = "btnCancel"; |
|
142 |
this.btnCancel.Size = new System.Drawing.Size(193, 36); |
|
143 |
this.btnCancel.StyleController = this.layoutControl1; |
|
144 |
this.btnCancel.TabIndex = 8; |
|
145 |
this.btnCancel.Text = "Cancel"; |
|
146 |
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); |
|
147 |
// |
|
148 |
// btnSave |
|
149 |
// |
|
150 |
this.btnSave.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnSave.ImageOptions.SvgImage"))); |
|
151 |
this.btnSave.Location = new System.Drawing.Point(12, 286); |
|
152 |
this.btnSave.Name = "btnSave"; |
|
153 |
this.btnSave.Size = new System.Drawing.Size(192, 36); |
|
154 |
this.btnSave.StyleController = this.layoutControl1; |
|
155 |
this.btnSave.TabIndex = 7; |
|
156 |
this.btnSave.Text = "Save"; |
|
157 |
this.btnSave.Click += new System.EventHandler(this.btnSave_Click); |
|
158 |
// |
|
159 |
// textBoxProjectDriectory |
|
160 |
// |
|
161 |
this.textBoxProjectDriectory.Location = new System.Drawing.Point(119, 96); |
|
162 |
this.textBoxProjectDriectory.MenuManager = this.ribbonControl; |
|
163 |
this.textBoxProjectDriectory.Name = "textBoxProjectDriectory"; |
|
164 |
this.textBoxProjectDriectory.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
|
165 |
new DevExpress.XtraEditors.Controls.EditorButton()}); |
|
166 |
this.textBoxProjectDriectory.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; |
|
167 |
this.textBoxProjectDriectory.Size = new System.Drawing.Size(270, 20); |
|
168 |
this.textBoxProjectDriectory.StyleController = this.layoutControl1; |
|
169 |
this.textBoxProjectDriectory.TabIndex = 5; |
|
170 |
this.textBoxProjectDriectory.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.btnProjectDriectory_ButtonClick); |
|
171 |
// |
|
172 |
// radioGroup |
|
173 |
// |
|
174 |
this.radioGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
|
175 |
| System.Windows.Forms.AnchorStyles.Right))); |
|
176 |
this.radioGroup.AutoSizeInLayoutControl = true; |
|
177 |
this.radioGroup.Location = new System.Drawing.Point(119, 58); |
|
178 |
this.radioGroup.MenuManager = this.ribbonControl; |
|
179 |
this.radioGroup.Name = "radioGroup"; |
|
180 |
this.radioGroup.Properties.GlyphAlignment = DevExpress.Utils.HorzAlignment.Default; |
|
181 |
this.radioGroup.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] { |
|
182 |
new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "SQLite"), |
|
183 |
new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "MS SQL")}); |
|
184 |
this.radioGroup.Size = new System.Drawing.Size(270, 34); |
|
185 |
this.radioGroup.StyleController = this.layoutControl1; |
|
186 |
this.radioGroup.TabIndex = 4; |
|
187 |
this.radioGroup.SelectedIndexChanged += new System.EventHandler(this.radioGroup_SelectedIndexChanged); |
|
188 |
// |
|
189 |
// textBoxServerIP |
|
190 |
// |
|
191 |
this.textBoxServerIP.Location = new System.Drawing.Point(119, 178); |
|
192 |
this.textBoxServerIP.MenuManager = this.ribbonControl; |
|
193 |
this.textBoxServerIP.Name = "textBoxServerIP"; |
|
194 |
this.textBoxServerIP.Size = new System.Drawing.Size(270, 20); |
|
195 |
this.textBoxServerIP.StyleController = this.layoutControl1; |
|
196 |
this.textBoxServerIP.TabIndex = 9; |
|
197 |
// |
|
198 |
// Root |
|
199 |
// |
|
200 |
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
|
201 |
this.Root.GroupBordersVisible = false; |
|
202 |
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
|
203 |
this.layoutControlItem3, |
|
204 |
this.layoutControlItem4, |
|
205 |
this.layoutControlInfo, |
|
206 |
this.layoutControlGroup2}); |
|
207 |
this.Root.Name = "Root"; |
|
208 |
this.Root.Size = new System.Drawing.Size(413, 334); |
|
209 |
this.Root.TextVisible = false; |
|
210 |
// |
|
211 |
// layoutControlItem3 |
|
212 |
// |
|
213 |
this.layoutControlItem3.Control = this.btnSave; |
|
214 |
this.layoutControlItem3.Location = new System.Drawing.Point(0, 274); |
|
215 |
this.layoutControlItem3.Name = "layoutControlItem3"; |
|
216 |
this.layoutControlItem3.Size = new System.Drawing.Size(196, 40); |
|
217 |
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); |
|
218 |
this.layoutControlItem3.TextVisible = false; |
|
219 |
// |
|
220 |
// layoutControlItem4 |
|
221 |
// |
|
222 |
this.layoutControlItem4.Control = this.btnCancel; |
|
223 |
this.layoutControlItem4.Location = new System.Drawing.Point(196, 274); |
|
224 |
this.layoutControlItem4.Name = "layoutControlItem4"; |
|
225 |
this.layoutControlItem4.Size = new System.Drawing.Size(197, 40); |
|
226 |
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); |
|
227 |
this.layoutControlItem4.TextVisible = false; |
|
228 |
// |
|
229 |
// layoutControlInfo |
|
230 |
// |
|
231 |
this.layoutControlInfo.CaptionImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("layoutControlInfo.CaptionImageOptions.SvgImage"))); |
|
232 |
this.layoutControlInfo.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
|
233 |
this.layoutControlItem5, |
|
234 |
this.layoutControlItem7, |
|
235 |
this.layoutControlItem8, |
|
236 |
this.layoutControlItem6}); |
|
237 |
this.layoutControlInfo.Location = new System.Drawing.Point(0, 120); |
|
238 |
this.layoutControlInfo.Name = "layoutControlInfo"; |
|
239 |
this.layoutControlInfo.Size = new System.Drawing.Size(393, 154); |
|
240 |
this.layoutControlInfo.Text = "DB Information"; |
|
241 |
// |
|
242 |
// layoutControlItem5 |
|
243 |
// |
|
244 |
this.layoutControlItem5.Control = this.textBoxServerIP; |
|
245 |
this.layoutControlItem5.Location = new System.Drawing.Point(0, 0); |
|
246 |
this.layoutControlItem5.Name = "layoutControlItem5"; |
|
247 |
this.layoutControlItem5.Size = new System.Drawing.Size(369, 24); |
|
248 |
this.layoutControlItem5.Text = "Server IP"; |
|
249 |
this.layoutControlItem5.TextSize = new System.Drawing.Size(92, 14); |
|
250 |
// |
|
251 |
// layoutControlItem7 |
|
252 |
// |
|
253 |
this.layoutControlItem7.Control = this.textBoxDBUser; |
|
254 |
this.layoutControlItem7.Location = new System.Drawing.Point(0, 48); |
|
255 |
this.layoutControlItem7.Name = "layoutControlItem7"; |
|
256 |
this.layoutControlItem7.Size = new System.Drawing.Size(369, 24); |
|
257 |
this.layoutControlItem7.Text = "DB User"; |
|
258 |
this.layoutControlItem7.TextSize = new System.Drawing.Size(92, 14); |
|
259 |
// |
|
260 |
// layoutControlItem8 |
|
261 |
// |
|
262 |
this.layoutControlItem8.Control = this.textBoxDBPassword; |
|
263 |
this.layoutControlItem8.Location = new System.Drawing.Point(0, 72); |
|
264 |
this.layoutControlItem8.Name = "layoutControlItem8"; |
|
265 |
this.layoutControlItem8.Size = new System.Drawing.Size(369, 24); |
|
266 |
this.layoutControlItem8.Text = "DB Password"; |
|
267 |
this.layoutControlItem8.TextSize = new System.Drawing.Size(92, 14); |
|
268 |
// |
|
269 |
// layoutControlItem6 |
|
270 |
// |
|
271 |
this.layoutControlItem6.Control = this.textBoxPort; |
|
272 |
this.layoutControlItem6.Location = new System.Drawing.Point(0, 24); |
|
273 |
this.layoutControlItem6.Name = "layoutControlItem6"; |
|
274 |
this.layoutControlItem6.Size = new System.Drawing.Size(369, 24); |
|
275 |
this.layoutControlItem6.Text = "Port"; |
|
276 |
this.layoutControlItem6.TextSize = new System.Drawing.Size(92, 14); |
|
277 |
// |
|
278 |
// layoutControlGroup2 |
|
279 |
// |
|
280 |
this.layoutControlGroup2.CaptionImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("layoutControlGroup2.CaptionImageOptions.SvgImage"))); |
|
281 |
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
|
282 |
this.layoutControlItem1, |
|
283 |
this.layoutControlItem2}); |
|
284 |
this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0); |
|
285 |
this.layoutControlGroup2.Name = "layoutControlGroup2"; |
|
286 |
this.layoutControlGroup2.Size = new System.Drawing.Size(393, 120); |
|
287 |
this.layoutControlGroup2.Text = "ID2 Project Infomation"; |
|
288 |
// |
|
289 |
// layoutControlItem1 |
|
290 |
// |
|
291 |
this.layoutControlItem1.Control = this.radioGroup; |
|
292 |
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); |
|
293 |
this.layoutControlItem1.MaxSize = new System.Drawing.Size(369, 38); |
|
294 |
this.layoutControlItem1.MinSize = new System.Drawing.Size(369, 38); |
|
295 |
this.layoutControlItem1.Name = "layoutControlItem1"; |
|
296 |
this.layoutControlItem1.Size = new System.Drawing.Size(369, 38); |
|
297 |
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; |
|
298 |
this.layoutControlItem1.Text = "DB Type"; |
|
299 |
this.layoutControlItem1.TextSize = new System.Drawing.Size(92, 14); |
|
300 |
// |
|
301 |
// layoutControlItem2 |
|
302 |
// |
|
303 |
this.layoutControlItem2.Control = this.textBoxProjectDriectory; |
|
304 |
this.layoutControlItem2.Location = new System.Drawing.Point(0, 38); |
|
305 |
this.layoutControlItem2.Name = "layoutControlItem2"; |
|
306 |
this.layoutControlItem2.Size = new System.Drawing.Size(369, 24); |
|
307 |
this.layoutControlItem2.Text = "Project Directory"; |
|
308 |
this.layoutControlItem2.TextSize = new System.Drawing.Size(92, 14); |
|
309 |
// |
|
310 |
// xtraFolderBrowserDialog |
|
311 |
// |
|
312 |
this.xtraFolderBrowserDialog.SelectedPath = "xtraFolderBrowserDialog1"; |
|
313 |
// |
|
314 |
// ID2DBSetting |
|
51 | 315 |
// |
52 | 316 |
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); |
53 | 317 |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
54 |
this.ClientSize = new System.Drawing.Size(467, 530); |
|
318 |
this.ClientSize = new System.Drawing.Size(413, 366); |
|
319 |
this.Controls.Add(this.layoutControl1); |
|
55 | 320 |
this.Controls.Add(this.ribbonControl); |
56 |
this.Name = "ProjectForm"; |
|
321 |
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; |
|
322 |
this.MaximizeBox = false; |
|
323 |
this.Name = "ID2DBSetting"; |
|
57 | 324 |
this.Ribbon = this.ribbonControl; |
58 | 325 |
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; |
59 |
this.Text = "Project Setting"; |
|
326 |
this.Text = "ID2 Project Setting";
|
|
60 | 327 |
((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit(); |
328 |
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); |
|
329 |
this.layoutControl1.ResumeLayout(false); |
|
330 |
((System.ComponentModel.ISupportInitialize)(this.textBoxPort.Properties)).EndInit(); |
|
331 |
((System.ComponentModel.ISupportInitialize)(this.textBoxDBPassword.Properties)).EndInit(); |
|
332 |
((System.ComponentModel.ISupportInitialize)(this.textBoxDBUser.Properties)).EndInit(); |
|
333 |
((System.ComponentModel.ISupportInitialize)(this.textBoxProjectDriectory.Properties)).EndInit(); |
|
334 |
((System.ComponentModel.ISupportInitialize)(this.radioGroup.Properties)).EndInit(); |
|
335 |
((System.ComponentModel.ISupportInitialize)(this.textBoxServerIP.Properties)).EndInit(); |
|
336 |
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); |
|
337 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); |
|
338 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); |
|
339 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlInfo)).EndInit(); |
|
340 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); |
|
341 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); |
|
342 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); |
|
343 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); |
|
344 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit(); |
|
345 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); |
|
346 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); |
|
61 | 347 |
this.ResumeLayout(false); |
62 | 348 |
this.PerformLayout(); |
63 | 349 |
|
... | ... | |
66 | 352 |
#endregion |
67 | 353 |
|
68 | 354 |
private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl; |
355 |
private DevExpress.XtraLayout.LayoutControl layoutControl1; |
|
356 |
private DevExpress.XtraLayout.LayoutControlGroup Root; |
|
357 |
private DevExpress.XtraEditors.RadioGroup radioGroup; |
|
358 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; |
|
359 |
private DevExpress.XtraEditors.ButtonEdit textBoxProjectDriectory; |
|
360 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; |
|
361 |
private DevExpress.XtraEditors.SimpleButton btnCancel; |
|
362 |
private DevExpress.XtraEditors.SimpleButton btnSave; |
|
363 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; |
|
364 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; |
|
365 |
private DevExpress.XtraEditors.TextEdit textBoxServerIP; |
|
366 |
private DevExpress.XtraLayout.LayoutControlGroup layoutControlInfo; |
|
367 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
|
368 |
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; |
|
369 |
private DevExpress.XtraEditors.TextEdit textBoxDBPassword; |
|
370 |
private DevExpress.XtraEditors.TextEdit textBoxDBUser; |
|
371 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; |
|
372 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; |
|
373 |
private DevExpress.XtraEditors.TextEdit textBoxPort; |
|
374 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; |
|
375 |
private DevExpress.XtraEditors.XtraFolderBrowserDialog xtraFolderBrowserDialog; |
|
69 | 376 |
} |
70 | 377 |
} |
DTI_PID/APIDConverter/Form/ProjectForm.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 |
{ |
13 |
public partial class ProjectForm : DevExpress.XtraBars.Ribbon.RibbonForm
|
|
16 |
public partial class ID2DBSetting : DevExpress.XtraBars.Ribbon.RibbonForm
|
|
14 | 17 |
{ |
15 |
public ProjectForm()
|
|
18 |
public ID2DBSetting()
|
|
16 | 19 |
{ |
17 | 20 |
InitializeComponent(); |
21 |
|
|
22 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
|
23 |
textBoxProjectDriectory.Text = Settings.Default.ProjectPath; |
|
24 |
radioGroup.SelectedIndex = Settings.Default.ProjectDBType; |
|
25 |
textBoxServerIP.Text = Settings.Default.ProjectServerIP; |
|
26 |
textBoxPort.Text = Settings.Default.ProjectPort; |
|
27 |
textBoxDBUser.Text = Settings.Default.ProjectDBUser; |
|
28 |
textBoxDBPassword.Text = Settings.Default.ProjectDBPassword; |
|
29 |
} |
|
30 |
|
|
31 |
private void radioGroup_SelectedIndexChanged(object sender, EventArgs e) |
|
32 |
{ |
|
33 |
ChangeUI(); |
|
34 |
} |
|
35 |
|
|
36 |
private void ChangeUI() |
|
37 |
{ |
|
38 |
if (radioGroup.SelectedIndex == 0) |
|
39 |
{ |
|
40 |
Size = new Size(415, 214); |
|
41 |
layoutControlInfo.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
|
42 |
} |
|
43 |
else if (radioGroup.SelectedIndex == 1) |
|
44 |
{ |
|
45 |
Size = new Size(415, 367); |
|
46 |
layoutControlInfo.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; |
|
47 |
} |
|
48 |
} |
|
49 |
|
|
50 |
private void btnProjectDriectory_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
|
51 |
{ |
|
52 |
if (xtraFolderBrowserDialog.ShowDialog() == DialogResult.OK) |
|
53 |
{ |
|
54 |
if (xtraFolderBrowserDialog.SelectedPath[xtraFolderBrowserDialog.SelectedPath.Length - 1] == '\\') |
|
55 |
xtraFolderBrowserDialog.SelectedPath = xtraFolderBrowserDialog.SelectedPath.Remove(xtraFolderBrowserDialog.SelectedPath.Length - 1); |
|
56 |
textBoxProjectDriectory.Text = xtraFolderBrowserDialog.SelectedPath; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
private void btnSave_Click(object sender, EventArgs e) |
|
61 |
{ |
|
62 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
|
63 |
if (radioGroup.SelectedIndex == 0) |
|
64 |
{ |
|
65 |
_ProjectInfo.DBType = ID2DB_Type.SQLite; |
|
66 |
_ProjectInfo.ServerIP = string.Empty; |
|
67 |
_ProjectInfo.Port = string.Empty; |
|
68 |
_ProjectInfo.DBUser = string.Empty; |
|
69 |
_ProjectInfo.DBPassword = string.Empty; |
|
70 |
} |
|
71 |
else if (radioGroup.SelectedIndex == 1) |
|
72 |
{ |
|
73 |
_ProjectInfo.DBType = ID2DB_Type.MSSQL; |
|
74 |
_ProjectInfo.ServerIP = textBoxServerIP.Text; |
|
75 |
_ProjectInfo.Port = textBoxPort.Text; |
|
76 |
_ProjectInfo.DBUser = textBoxDBUser.Text; |
|
77 |
_ProjectInfo.DBPassword = textBoxDBPassword.Text; |
|
78 |
} |
|
79 |
_ProjectInfo.DefaultPath = textBoxProjectDriectory.Text; |
|
80 |
|
|
81 |
if (Project_DB.ConnTestAndCreateTable()) |
|
82 |
{ |
|
83 |
Settings.Default.ProjectPath = _ProjectInfo.DefaultPath; |
|
84 |
Settings.Default.ProjectDBType = (int)_ProjectInfo.DBType; |
|
85 |
Settings.Default.ProjectServerIP = _ProjectInfo.ServerIP; |
|
86 |
Settings.Default.ProjectPort = _ProjectInfo.Port; |
|
87 |
Settings.Default.ProjectDBUser = _ProjectInfo.DBUser; |
|
88 |
Settings.Default.ProjectDBPassword = _ProjectInfo.DBPassword; |
|
89 |
Settings.Default.Save(); |
|
90 |
DialogResult = DialogResult.OK; |
|
91 |
} |
|
92 |
else |
|
93 |
{ |
|
94 |
//MessageBox.Show(Msg.FailProjectSelect, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning); |
|
95 |
} |
|
96 |
} |
|
97 |
|
|
98 |
private void btnCancel_Click(object sender, EventArgs e) |
|
99 |
{ |
|
100 |
DialogResult = DialogResult.Cancel; |
|
18 | 101 |
} |
19 | 102 |
} |
20 | 103 |
} |
DTI_PID/APIDConverter/Form/ProjectForm.resx | ||
---|---|---|
117 | 117 |
<resheader name="writer"> |
118 | 118 |
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
119 | 119 |
</resheader> |
120 |
<assembly alias="DevExpress.Data.v18.2" name="DevExpress.Data.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
|
121 |
<data name="btnCancel.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v18.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
122 |
<value> |
|
123 |
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE4LjIsIFZlcnNpb249MTguMi43 |
|
124 |
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
|
125 |
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJUCAAAC77u/ |
|
126 |
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi |
|
127 |
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv |
|
128 |
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUt |
|
129 |
YmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaWQ9IkxheWVyXzEi |
|
130 |
Pg0KICA8ZyBpZD0iQ2xvc2UiPg0KICAgIDxwYXRoIGQ9Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4z |
|
131 |
LDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYsMnogTTIzLjcsMjEuN2MwLjQsMC40LDAuNCwx |
|
132 |
LDAsMS40bC0wLjYsMC42ICAgYy0wLjQsMC40LTEsMC40LTEuNCwwTDE2LDE4bC01LjcsNS43Yy0wLjQs |
|
133 |
MC40LTEsMC40LTEuNCwwbC0wLjYtMC42Yy0wLjQtMC40LTAuNC0xLDAtMS40TDE0LDE2bC01LjctNS43 |
|
134 |
Yy0wLjQtMC40LTAuNC0xLDAtMS40ICAgbDAuNi0wLjZjMC40LTAuNCwxLTAuNCwxLjQsMEwxNiwxNGw1 |
|
135 |
LjctNS43YzAuNC0wLjQsMS0wLjQsMS40LDBsMC42LDAuNmMwLjQsMC40LDAuNCwxLDAsMS40TDE4LDE2 |
|
136 |
TDIzLjcsMjEuN3oiIGZpbGw9IiNEMTFDMUMiIGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs= |
|
137 |
</value> |
|
138 |
</data> |
|
139 |
<data name="btnSave.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v18.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
140 |
<value> |
|
141 |
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE4LjIsIFZlcnNpb249MTguMi43 |
|
142 |
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
|
143 |
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALwBAAAC77u/ |
|
144 |
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi |
|
145 |
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv |
|
146 |
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUt |
|
147 |
YmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaWQ9IlNhdmUiPg0K |
|
148 |
ICA8cGF0aCBkPSJNMjcsNGgtM3YxMEg4VjRINUM0LjQsNCw0LDQuNCw0LDV2MjJjMCwwLjYsMC40LDEs |
|
149 |
MSwxaDIyYzAuNiwwLDEtMC40LDEtMVY1QzI4LDQuNCwyNy42LDQsMjcsNHogTTI0LDI0SDh2LTYgIGgx |
|
150 |
NlYyNHogTTEwLDR2OGgxMFY0SDEweiBNMTQsMTBoLTJWNmgyVjEweiIgZmlsbD0iIzcyNzI3MiIgY2xh |
|
151 |
c3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw== |
|
152 |
</value> |
|
153 |
</data> |
|
154 |
<data name="layoutControlInfo.CaptionImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v18.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
155 |
<value> |
|
156 |
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE4LjIsIFZlcnNpb249MTguMi43 |
|
157 |
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
|
158 |
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJsCAAAC77u/ |
|
159 |
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi |
|
160 |
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv |
|
161 |
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUt |
|
162 |
YmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaWQ9IkxheWVyXzEi |
|
163 |
Pg0KICA8ZyBpZD0iRGF0YWJhc2UiPg0KICAgIDxwYXRoIGQ9Ik0xNiwyNGMtNS41LDAtMTAtMS44LTEw |
|
164 |
LTR2NGMwLDIuMiw0LjUsNCwxMCw0czEwLTEuOCwxMC00di00QzI2LDIyLjIsMjEuNSwyNCwxNiwyNHoi |
|
165 |
IGZpbGw9IiNGRkIxMTUiIGNsYXNzPSJZZWxsb3ciIC8+DQogICAgPHBhdGggZD0iTTE2LDE4Yy01LjUs |
|
166 |
MC0xMC0xLjgtMTAtNHY0YzAsMi4yLDQuNSw0LDEwLDRzMTAtMS44LDEwLTR2LTRDMjYsMTYuMiwyMS41 |
|
167 |
LDE4LDE2LDE4eiIgZmlsbD0iI0ZGQjExNSIgY2xhc3M9IlllbGxvdyIgLz4NCiAgICA8cGF0aCBkPSJN |
|
168 |
MTYsNEMxMC41LDQsNiw1LjgsNiw4djRjMCwyLjIsNC41LDQsMTAsNHMxMC0xLjgsMTAtNFY4QzI2LDUu |
|
169 |
OCwyMS41LDQsMTYsNHoiIGZpbGw9IiNGRkIxMTUiIGNsYXNzPSJZZWxsb3ciIC8+DQogIDwvZz4NCjwv |
|
170 |
c3ZnPgs= |
|
171 |
</value> |
|
172 |
</data> |
|
173 |
<data name="layoutControlGroup2.CaptionImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v18.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
174 |
<value> |
|
175 |
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE4LjIsIFZlcnNpb249MTguMi43 |
|
176 |
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
|
177 |
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAA0DAAAC77u/ |
|
178 |
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi |
|
179 |
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv |
|
180 |
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUt |
|
181 |
YmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaWQ9IkxheWVyXzEi |
|
182 |
Pg0KICA8ZyBpZD0iUHJvcGVydGllcyI+DQogICAgPHBhdGggZD0iTTMwLDE4di00bC00LjQtMC43Yy0w |
|
183 |
LjItMC44LTAuNS0xLjUtMC45LTIuMWwyLjYtMy42bC0yLjgtMi44bC0zLjYsMi42Yy0wLjctMC40LTEu |
|
184 |
NC0wLjctMi4xLTAuOUwxOCwyaC00ICAgbC0wLjcsNC40Yy0wLjgsMC4yLTEuNSwwLjUtMi4xLDAuOUw3 |
|
185 |
LjUsNC43TDQuNyw3LjVsMi42LDMuNmMtMC40LDAuNy0wLjcsMS40LTAuOSwyLjFMMiwxNHY0bDQuNCww |
|
186 |
LjdjMC4yLDAuOCwwLjUsMS41LDAuOSwyLjEgICBsLTIuNiwzLjZsMi44LDIuOGwzLjYtMi42YzAuNyww |
|
187 |
LjQsMS40LDAuNywyLjEsMC45TDE0LDMwaDRsMC43LTQuNGMwLjgtMC4yLDEuNS0wLjUsMi4xLTAuOWwz |
|
188 |
LjYsMi42bDIuOC0yLjhsLTIuNi0zLjYgICBjMC40LTAuNywwLjctMS40LDAuOS0yLjFMMzAsMTh6IE0x |
|
189 |
NiwyMGMtMi4yLDAtNC0xLjgtNC00YzAtMi4yLDEuOC00LDQtNHM0LDEuOCw0LDRDMjAsMTguMiwxOC4y |
|
190 |
LDIwLDE2LDIweiIgZmlsbD0iIzExNzdENyIgY2xhc3M9IkJsdWUiIC8+DQogIDwvZz4NCjwvc3ZnPgs= |
|
191 |
</value> |
|
192 |
</data> |
|
193 |
<metadata name="xtraFolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|
194 |
<value>17, 17</value> |
|
195 |
</metadata> |
|
120 | 196 |
</root> |
DTI_PID/APIDConverter/Properties/Settings.Designer.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 도구를 사용하여 생성되었습니다. |
|
4 |
// 런타임 버전:4.0.30319.42000 |
|
5 |
// |
|
6 |
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 |
|
7 |
// 이러한 변경 내용이 손실됩니다. |
|
8 |
// </auto-generated> |
|
9 |
//------------------------------------------------------------------------------ |
|
10 |
|
|
11 |
namespace AVEVA.PID.CustomizationUtility.Properties { |
|
12 |
|
|
13 |
|
|
14 |
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|
15 |
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] |
|
16 |
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
|
17 |
|
|
18 |
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|
19 |
|
|
20 |
public static Settings Default { |
|
21 |
get { |
|
22 |
return defaultInstance; |
|
23 |
} |
|
24 |
} |
|
25 |
|
|
26 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
27 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
28 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
29 |
public string ProjectPath { |
|
30 |
get { |
|
31 |
return ((string)(this["ProjectPath"])); |
|
32 |
} |
|
33 |
set { |
|
34 |
this["ProjectPath"] = value; |
|
35 |
} |
|
36 |
} |
|
37 |
|
|
38 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
39 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
40 |
[global::System.Configuration.DefaultSettingValueAttribute("0")] |
|
41 |
public double DrawingX { |
|
42 |
get { |
|
43 |
return ((double)(this["DrawingX"])); |
|
44 |
} |
|
45 |
set { |
|
46 |
this["DrawingX"] = value; |
|
47 |
} |
|
48 |
} |
|
49 |
|
|
50 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
51 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
52 |
[global::System.Configuration.DefaultSettingValueAttribute("0")] |
|
53 |
public double DrawingY { |
|
54 |
get { |
|
55 |
return ((double)(this["DrawingY"])); |
|
56 |
} |
|
57 |
set { |
|
58 |
this["DrawingY"] = value; |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
63 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
64 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
65 |
public string DefaultTemplate { |
|
66 |
get { |
|
67 |
return ((string)(this["DefaultTemplate"])); |
|
68 |
} |
|
69 |
set { |
|
70 |
this["DefaultTemplate"] = value; |
|
71 |
} |
|
72 |
} |
|
73 |
|
|
74 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
75 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
76 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
77 |
public string DefaultUnit { |
|
78 |
get { |
|
79 |
return ((string)(this["DefaultUnit"])); |
|
80 |
} |
|
81 |
set { |
|
82 |
this["DefaultUnit"] = value; |
|
83 |
} |
|
84 |
} |
|
85 |
|
|
86 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
87 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
88 |
[global::System.Configuration.DefaultSettingValueAttribute("0")] |
|
89 |
public int ProjectDBType { |
|
90 |
get { |
|
91 |
return ((int)(this["ProjectDBType"])); |
|
92 |
} |
|
93 |
set { |
|
94 |
this["ProjectDBType"] = value; |
|
95 |
} |
|
96 |
} |
|
97 |
|
|
98 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
99 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
100 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
101 |
public string ProjectServerIP { |
|
102 |
get { |
|
103 |
return ((string)(this["ProjectServerIP"])); |
|
104 |
} |
|
105 |
set { |
|
106 |
this["ProjectServerIP"] = value; |
|
107 |
} |
|
108 |
} |
|
109 |
|
|
110 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
111 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
112 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
113 |
public string ProjectPort { |
|
114 |
get { |
|
115 |
return ((string)(this["ProjectPort"])); |
|
116 |
} |
|
117 |
set { |
|
118 |
this["ProjectPort"] = value; |
|
119 |
} |
|
120 |
} |
|
121 |
|
|
122 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
123 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
124 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
125 |
public string ProjectDBUser { |
|
126 |
get { |
|
127 |
return ((string)(this["ProjectDBUser"])); |
|
128 |
} |
|
129 |
set { |
|
130 |
this["ProjectDBUser"] = value; |
|
131 |
} |
|
132 |
} |
|
133 |
|
|
134 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
135 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
136 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
137 |
public string ProjectDBPassword { |
|
138 |
get { |
|
139 |
return ((string)(this["ProjectDBPassword"])); |
|
140 |
} |
|
141 |
set { |
|
142 |
this["ProjectDBPassword"] = value; |
|
143 |
} |
|
144 |
} |
|
145 |
} |
|
146 |
} |
DTI_PID/APIDConverter/Properties/Settings.settings | ||
---|---|---|
1 |
<?xml version='1.0' encoding='utf-8'?> |
|
2 |
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="AVEVA.PID.CustomizationUtility.Properties" GeneratedClassName="Settings"> |
|
3 |
<Profiles /> |
|
4 |
<Settings> |
|
5 |
<Setting Name="ProjectPath" Type="System.String" Scope="User"> |
|
6 |
<Value Profile="(Default)" /> |
|
7 |
</Setting> |
|
8 |
<Setting Name="DrawingX" Type="System.Double" Scope="User"> |
|
9 |
<Value Profile="(Default)">0</Value> |
|
10 |
</Setting> |
|
11 |
<Setting Name="DrawingY" Type="System.Double" Scope="User"> |
|
12 |
<Value Profile="(Default)">0</Value> |
|
13 |
</Setting> |
|
14 |
<Setting Name="DefaultTemplate" Type="System.String" Scope="User"> |
|
15 |
<Value Profile="(Default)" /> |
|
16 |
</Setting> |
|
17 |
<Setting Name="DefaultUnit" Type="System.String" Scope="User"> |
|
18 |
<Value Profile="(Default)" /> |
|
19 |
</Setting> |
|
20 |
<Setting Name="ProjectDBType" Type="System.Int32" Scope="User"> |
|
21 |
<Value Profile="(Default)">0</Value> |
|
22 |
</Setting> |
|
23 |
<Setting Name="ProjectServerIP" Type="System.String" Scope="User"> |
|
24 |
<Value Profile="(Default)" /> |
|
25 |
</Setting> |
|
26 |
<Setting Name="ProjectPort" Type="System.String" Scope="User"> |
|
27 |
<Value Profile="(Default)" /> |
|
28 |
</Setting> |
|
29 |
<Setting Name="ProjectDBUser" Type="System.String" Scope="User"> |
|
30 |
<Value Profile="(Default)" /> |
|
31 |
</Setting> |
|
32 |
<Setting Name="ProjectDBPassword" Type="System.String" Scope="User"> |
|
33 |
<Value Profile="(Default)" /> |
|
34 |
</Setting> |
|
35 |
</Settings> |
|
36 |
</SettingsFile> |
DTI_PID/APIDConverter/Settings.cs | ||
---|---|---|
1 |
namespace AVEVA.PID.CustomizationUtility.Properties { |
|
2 |
|
|
3 |
|
|
4 |
// 이 클래스를 사용하여 설정 클래스에 대한 특정 이벤트를 처리할 수 있습니다. |
|
5 |
// SettingChanging 이벤트는 설정 값이 변경되기 전에 발생합니다. |
|
6 |
// PropertyChanged 이벤트는 설정 값이 변경된 후에 발생합니다. |
|
7 |
// SettingsLoaded 이벤트는 설정 값이 로드된 후에 발생합니다. |
|
8 |
// SettingsSaving 이벤트는 설정 값이 저장되기 전에 발생합니다. |
|
9 |
internal sealed partial class Settings { |
|
10 |
|
|
11 |
public Settings() { |
|
12 |
// // 설정을 저장 및 변경하기 위한 이벤트 처리기를 추가하려면 아래 줄에서 주석 처리를 제거하세요. |
|
13 |
// |
|
14 |
// this.SettingChanging += this.SettingChangingEventHandler; |
|
15 |
// |
|
16 |
// this.SettingsSaving += this.SettingsSavingEventHandler; |
|
17 |
// |
|
18 |
} |
|
19 |
|
|
20 |
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { |
|
21 |
// SettingChangingEvent 이벤트를 처리하는 코드를 여기에 추가하세요. |
|
22 |
} |
|
23 |
|
|
24 |
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { |
|
25 |
// SettingsSaving 이벤트를 처리하는 코드를 여기에 추가하세요. |
|
26 |
} |
|
27 |
} |
|
28 |
} |
DTI_PID/APIDConverter/packages.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<packages> |
|
3 |
<package id="System.Data.SQLite.Core" version="1.0.111.0" targetFramework="net472" /> |
|
4 |
</packages> |
내보내기 Unified diff