개정판 171142c5
dev issue #000 : edit project
Change-Id: Ia4d519cb2e04ea953d2c03268a9230e6fe43b672
DTI_PID/BaseModel/BaseModel.csproj | ||
---|---|---|
60 | 60 |
<Reference Include="System.Xml" /> |
61 | 61 |
</ItemGroup> |
62 | 62 |
<ItemGroup> |
63 |
<Compile Include="ProjectInfo.cs" /> |
|
63 |
<Compile Include="Project_DB.cs" /> |
|
64 |
<Compile Include="Project_Info.cs" /> |
|
64 | 65 |
<Compile Include="Item\Document.cs" /> |
65 | 66 |
<Compile Include="Item\Line.cs" /> |
66 | 67 |
<Compile Include="Item\LineNumber.cs" /> |
DTI_PID/BaseModel/ProjectInfo.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.IO; |
|
7 |
|
|
8 |
namespace Converter.BaseModel |
|
9 |
{ |
|
10 |
public class ProjectInfo |
|
11 |
{ |
|
12 |
private static ProjectInfo projectInfo; |
|
13 |
private string _Path; |
|
14 |
private string _Name; |
|
15 |
private bool _Enable; |
|
16 |
|
|
17 |
public string Path { |
|
18 |
get { return _Path; } |
|
19 |
set { |
|
20 |
_Path = value; |
|
21 |
_Name = System.IO.Path.GetFileName(value); |
|
22 |
} |
|
23 |
} |
|
24 |
|
|
25 |
public string Name |
|
26 |
{ |
|
27 |
get { return _Name; } |
|
28 |
} |
|
29 |
|
|
30 |
public bool Enable { get => _Enable; set => _Enable = value; } |
|
31 |
|
|
32 |
public static ProjectInfo GetInstance() |
|
33 |
{ |
|
34 |
if (projectInfo == null) |
|
35 |
projectInfo = new ProjectInfo(); |
|
36 |
|
|
37 |
return projectInfo; |
|
38 |
} |
|
39 |
} |
|
40 |
} |
DTI_PID/BaseModel/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 |
|
|
7 |
namespace Converter.BaseModel |
|
8 |
{ |
|
9 |
public class Project_DB |
|
10 |
{ |
|
11 |
Project_Info projectInfo = Project_Info.GetInstance(); |
|
12 |
|
|
13 |
|
|
14 |
} |
|
15 |
} |
DTI_PID/BaseModel/Project_Info.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.IO; |
|
7 |
|
|
8 |
namespace Converter.BaseModel |
|
9 |
{ |
|
10 |
public class Project_Info |
|
11 |
{ |
|
12 |
private static Project_Info projectInfo; |
|
13 |
private string _DefaultPath; |
|
14 |
private string _Name; |
|
15 |
private bool _Enable; |
|
16 |
private string _DBFilePath; |
|
17 |
private string _TempDirPath; |
|
18 |
|
|
19 |
public string DefaultPath { |
|
20 |
get { return _DefaultPath; } |
|
21 |
set { |
|
22 |
_DefaultPath = value; |
|
23 |
_Name = Path.GetFileName(value); |
|
24 |
_DBFilePath = value + @"\db\ITI_PID.db"; |
|
25 |
_TempDirPath = value + @"\Temp\"; |
|
26 |
} |
|
27 |
} |
|
28 |
|
|
29 |
public string Name |
|
30 |
{ |
|
31 |
get { return _Name; } |
|
32 |
} |
|
33 |
|
|
34 |
public string DBFilePath |
|
35 |
{ |
|
36 |
get { return _DBFilePath; } |
|
37 |
} |
|
38 |
|
|
39 |
public string TempDirPath |
|
40 |
{ |
|
41 |
get { return _TempDirPath; } |
|
42 |
} |
|
43 |
|
|
44 |
public bool Enable { get => _Enable; set => _Enable = value; } |
|
45 |
|
|
46 |
|
|
47 |
public static Project_Info GetInstance() |
|
48 |
{ |
|
49 |
if (projectInfo == null) |
|
50 |
projectInfo = new Project_Info(); |
|
51 |
|
|
52 |
return projectInfo; |
|
53 |
} |
|
54 |
} |
|
55 |
} |
DTI_PID/SPPIDConverter_AutoModeling/ConverterForm.Designer.cs | ||
---|---|---|
134 | 134 |
// |
135 | 135 |
// btnRun |
136 | 136 |
// |
137 |
this.btnRun.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.next;
|
|
137 |
this.btnRun.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.next;
|
|
138 | 138 |
this.btnRun.Location = new System.Drawing.Point(881, 58); |
139 | 139 |
this.btnRun.Name = "btnRun"; |
140 | 140 |
this.btnRun.Size = new System.Drawing.Size(79, 36); |
... | ... | |
145 | 145 |
// |
146 | 146 |
// btnLoadFile |
147 | 147 |
// |
148 |
this.btnLoadFile.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.open2;
|
|
148 |
this.btnLoadFile.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.open2;
|
|
149 | 149 |
this.btnLoadFile.Location = new System.Drawing.Point(24, 58); |
150 | 150 |
this.btnLoadFile.Name = "btnLoadFile"; |
151 | 151 |
this.btnLoadFile.Size = new System.Drawing.Size(110, 36); |
... | ... | |
156 | 156 |
// |
157 | 157 |
// btnItemMapping |
158 | 158 |
// |
159 |
this.btnItemMapping.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.properties;
|
|
159 |
this.btnItemMapping.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.properties;
|
|
160 | 160 |
this.btnItemMapping.Location = new System.Drawing.Point(998, 310); |
161 | 161 |
this.btnItemMapping.Name = "btnItemMapping"; |
162 | 162 |
this.btnItemMapping.Size = new System.Drawing.Size(244, 36); |
... | ... | |
167 | 167 |
// |
168 | 168 |
// btnSPPIDDB |
169 | 169 |
// |
170 |
this.btnSPPIDDB.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.properties;
|
|
170 |
this.btnSPPIDDB.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.properties;
|
|
171 | 171 |
this.btnSPPIDDB.Location = new System.Drawing.Point(998, 58); |
172 | 172 |
this.btnSPPIDDB.Name = "btnSPPIDDB"; |
173 | 173 |
this.btnSPPIDDB.Size = new System.Drawing.Size(244, 36); |
... | ... | |
223 | 223 |
// |
224 | 224 |
// layoutControlGroupSPPIDDB |
225 | 225 |
// |
226 |
this.layoutControlGroupSPPIDDB.CaptionImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.actions_database;
|
|
226 |
this.layoutControlGroupSPPIDDB.CaptionImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.actions_database;
|
|
227 | 227 |
this.layoutControlGroupSPPIDDB.GroupStyle = DevExpress.Utils.GroupStyle.Card; |
228 | 228 |
this.layoutControlGroupSPPIDDB.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
229 | 229 |
this.labelSPPIDPlantName, |
... | ... | |
295 | 295 |
// |
296 | 296 |
// layoutControlGroupID2Project |
297 | 297 |
// |
298 |
this.layoutControlGroupID2Project.CaptionImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.actions_image;
|
|
298 |
this.layoutControlGroupID2Project.CaptionImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.actions_image;
|
|
299 | 299 |
this.layoutControlGroupID2Project.GroupStyle = DevExpress.Utils.GroupStyle.Card; |
300 | 300 |
this.layoutControlGroupID2Project.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
301 | 301 |
this.labelID2ProjectName, |
... | ... | |
369 | 369 |
// |
370 | 370 |
// layoutControlGroupItemMapping |
371 | 371 |
// |
372 |
this.layoutControlGroupItemMapping.CaptionImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.arrangegroups;
|
|
372 |
this.layoutControlGroupItemMapping.CaptionImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.arrangegroups;
|
|
373 | 373 |
this.layoutControlGroupItemMapping.GroupStyle = DevExpress.Utils.GroupStyle.Card; |
374 | 374 |
this.layoutControlGroupItemMapping.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
375 | 375 |
this.layoutControlItem4, |
... | ... | |
415 | 415 |
// |
416 | 416 |
// layoutControlGroupAutoConverter |
417 | 417 |
// |
418 |
this.layoutControlGroupAutoConverter.CaptionImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.convertto;
|
|
418 |
this.layoutControlGroupAutoConverter.CaptionImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.convertto;
|
|
419 | 419 |
this.layoutControlGroupAutoConverter.GroupStyle = DevExpress.Utils.GroupStyle.Card; |
420 | 420 |
this.layoutControlGroupAutoConverter.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
421 | 421 |
this.layoutControlItem1, |
DTI_PID/SPPIDConverter_AutoModeling/ConverterForm.cs | ||
---|---|---|
15 | 15 |
using System.Globalization; |
16 | 16 |
using System.Threading; |
17 | 17 |
using System.IO; |
18 |
using Converter.SPPID.AutoModeling.Properties;
|
|
18 |
using Converter.AutoModeling.SPPID.Properties;
|
|
19 | 19 |
using Converter.SPPID.AutoModeling.DB; |
20 | 20 |
using Converter.SPPID.AutoModeling.Util; |
21 | 21 |
using Converter.SPPID.AutoModeling.Form; |
... | ... | |
27 | 27 |
private DataTable converterDT = new DataTable(); |
28 | 28 |
private RepositoryItemComboBox templateComboBox; |
29 | 29 |
|
30 |
ProjectInfo _ProjectInfo = ProjectInfo.GetInstance();
|
|
30 |
Project_Info _ProjectInfo = Project_Info.GetInstance();
|
|
31 | 31 |
SPPID_DBInfo _SPPIDInfo = SPPID_DBInfo.GetInstance(); |
32 | 32 |
|
33 | 33 |
public ConverterForm() |
... | ... | |
104 | 104 |
string dirPath = xtraFolderBrowserDialog.SelectedPath; |
105 | 105 |
if (IsID2Project(dirPath)) |
106 | 106 |
{ |
107 |
_ProjectInfo.Path = dirPath; |
|
107 |
_ProjectInfo.DefaultPath = dirPath;
|
|
108 | 108 |
_ProjectInfo.Enable = true; |
109 | 109 |
if (SPPIDUtil.SaveID2ProjectInfo()) |
110 | 110 |
{ |
... | ... | |
127 | 127 |
{ |
128 | 128 |
if (_ProjectInfo.Enable) |
129 | 129 |
{ |
130 |
btnID2Project.Text = _ProjectInfo.Path; |
|
130 |
btnID2Project.Text = _ProjectInfo.DefaultPath;
|
|
131 | 131 |
labelID2ProjectName.Text = _ProjectInfo.Name; |
132 | 132 |
labelID2ProjectName.AppearanceItemCaption.ForeColor = Color.Blue; |
133 | 133 |
labelID2ProjectStatus.Text = Msg.ConnectionSuccessful; |
... | ... | |
200 | 200 |
return; |
201 | 201 |
} |
202 | 202 |
|
203 |
xtraOpenFileDialog.InitialDirectory = _ProjectInfo.Path + @"\temp";
|
|
203 |
xtraOpenFileDialog.InitialDirectory = _ProjectInfo.TempDirPath;
|
|
204 | 204 |
if (xtraOpenFileDialog.ShowDialog() == DialogResult.OK) |
205 | 205 |
{ |
206 | 206 |
foreach (string fileName in xtraOpenFileDialog.FileNames) |
DTI_PID/SPPIDConverter_AutoModeling/DB/ID2_DB.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace Converter.SPPID.AutoModeling.DB |
|
8 |
{ |
|
9 |
class ID2_DB |
|
10 |
{ |
|
11 |
} |
|
12 |
} |
DTI_PID/SPPIDConverter_AutoModeling/Form/MappingForm.Designer.cs | ||
---|---|---|
135 | 135 |
// |
136 | 136 |
// btnSave |
137 | 137 |
// |
138 |
this.btnSave.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.saveandclose;
|
|
138 |
this.btnSave.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.saveandclose;
|
|
139 | 139 |
this.btnSave.Location = new System.Drawing.Point(868, 693); |
140 | 140 |
this.btnSave.Name = "btnSave"; |
141 | 141 |
this.btnSave.Size = new System.Drawing.Size(136, 36); |
DTI_PID/SPPIDConverter_AutoModeling/Form/SPPID_DB_SettingForm.Designer.cs | ||
---|---|---|
127 | 127 |
// |
128 | 128 |
// simpleButton2 |
129 | 129 |
// |
130 |
this.simpleButton2.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.close;
|
|
130 |
this.simpleButton2.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.close;
|
|
131 | 131 |
this.simpleButton2.Location = new System.Drawing.Point(202, 392); |
132 | 132 |
this.simpleButton2.Name = "simpleButton2"; |
133 | 133 |
this.simpleButton2.Size = new System.Drawing.Size(203, 36); |
... | ... | |
137 | 137 |
// |
138 | 138 |
// btnSave |
139 | 139 |
// |
140 |
this.btnSave.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.save;
|
|
140 |
this.btnSave.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.save;
|
|
141 | 141 |
this.btnSave.Location = new System.Drawing.Point(12, 392); |
142 | 142 |
this.btnSave.Name = "btnSave"; |
143 | 143 |
this.btnSave.Size = new System.Drawing.Size(186, 36); |
... | ... | |
189 | 189 |
// |
190 | 190 |
// btnLoadINIFile |
191 | 191 |
// |
192 |
this.btnLoadINIFile.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.open2;
|
|
192 |
this.btnLoadINIFile.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.open2;
|
|
193 | 193 |
this.btnLoadINIFile.Location = new System.Drawing.Point(24, 45); |
194 | 194 |
this.btnLoadINIFile.Name = "btnLoadINIFile"; |
195 | 195 |
this.btnLoadINIFile.Size = new System.Drawing.Size(369, 36); |
... | ... | |
238 | 238 |
// |
239 | 239 |
// btnGetPlantList |
240 | 240 |
// |
241 |
this.btnGetPlantList.ImageOptions.SvgImage = global::Converter.SPPID.AutoModeling.Properties.Resources.changedatasourcepivottable;
|
|
241 |
this.btnGetPlantList.ImageOptions.SvgImage = global::Converter.AutoModeling.SPPID.Properties.Resources.changedatasourcepivottable;
|
|
242 | 242 |
this.btnGetPlantList.Location = new System.Drawing.Point(24, 298); |
243 | 243 |
this.btnGetPlantList.Name = "btnGetPlantList"; |
244 | 244 |
this.btnGetPlantList.Size = new System.Drawing.Size(369, 36); |
DTI_PID/SPPIDConverter_AutoModeling/Form/SPPID_DB_SettingForm.cs | ||
---|---|---|
9 | 9 |
using System.Windows.Forms; |
10 | 10 |
using DevExpress.XtraBars; |
11 | 11 |
using System.IO; |
12 |
using Converter.SPPID.AutoModeling.Properties;
|
|
12 |
using Converter.AutoModeling.SPPID.Properties;
|
|
13 | 13 |
using Converter.SPPID.AutoModeling.DB; |
14 | 14 |
using Converter.SPPID.AutoModeling.Util; |
15 | 15 |
using Newtonsoft.Json; |
DTI_PID/SPPIDConverter_AutoModeling/Properties/Msg.Designer.cs | ||
---|---|---|
8 | 8 |
// </auto-generated> |
9 | 9 |
//------------------------------------------------------------------------------ |
10 | 10 |
|
11 |
namespace Converter.SPPID.AutoModeling.Properties {
|
|
11 |
namespace Converter.AutoModeling.SPPID.Properties {
|
|
12 | 12 |
using System; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
39 | 39 |
internal static global::System.Resources.ResourceManager ResourceManager { |
40 | 40 |
get { |
41 | 41 |
if (object.ReferenceEquals(resourceMan, null)) { |
42 |
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Converter.SPPID.AutoModeling.Properties.Msg", typeof(Msg).Assembly);
|
|
42 |
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Converter.AutoModeling.SPPID.Properties.Msg", typeof(Msg).Assembly);
|
|
43 | 43 |
resourceMan = temp; |
44 | 44 |
} |
45 | 45 |
return resourceMan; |
DTI_PID/SPPIDConverter_AutoModeling/Properties/Resources.Designer.cs | ||
---|---|---|
8 | 8 |
// </auto-generated> |
9 | 9 |
//------------------------------------------------------------------------------ |
10 | 10 |
|
11 |
namespace Converter.SPPID.AutoModeling.Properties {
|
|
11 |
namespace Converter.AutoModeling.SPPID.Properties {
|
|
12 | 12 |
using System; |
13 | 13 |
|
14 | 14 |
|
... | ... | |
39 | 39 |
internal static global::System.Resources.ResourceManager ResourceManager { |
40 | 40 |
get { |
41 | 41 |
if (object.ReferenceEquals(resourceMan, null)) { |
42 |
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Converter.SPPID.AutoModeling.Properties.Resources", typeof(Resources).Assembly);
|
|
42 |
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Converter.AutoModeling.SPPID.Properties.Resources", typeof(Resources).Assembly);
|
|
43 | 43 |
resourceMan = temp; |
44 | 44 |
} |
45 | 45 |
return resourceMan; |
DTI_PID/SPPIDConverter_AutoModeling/SPPIDConverter_AutoModeling.csproj | ||
---|---|---|
7 | 7 |
<ProjectGuid>{B6757E78-6B59-40A3-A7BB-E73E8F81B6C3}</ProjectGuid> |
8 | 8 |
<OutputType>WinExe</OutputType> |
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 |
<RootNamespace>Converter.SPPID.AutoModeling</RootNamespace>
|
|
10 |
<RootNamespace>Converter.AutoModeling.SPPID</RootNamespace>
|
|
11 | 11 |
<AssemblyName>SPPIDConverter_AutoModeling</AssemblyName> |
12 | 12 |
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> |
13 | 13 |
<FileAlignment>512</FileAlignment> |
... | ... | |
105 | 105 |
<Reference Include="System.Xml" /> |
106 | 106 |
</ItemGroup> |
107 | 107 |
<ItemGroup> |
108 |
<Compile Include="DB\ID2_DB.cs" /> |
|
109 | 108 |
<Compile Include="DB\SPPID_DB.cs" /> |
110 | 109 |
<Compile Include="DB\SPPID_DBInfo.cs" /> |
111 | 110 |
<Compile Include="ConverterForm.cs"> |
DTI_PID/SPPIDConverter_AutoModeling/Util/SPPIDUtil.cs | ||
---|---|---|
15 | 15 |
{ |
16 | 16 |
public static bool SaveID2ProjectInfo() |
17 | 17 |
{ |
18 |
ProjectInfo projectInfo = ProjectInfo.GetInstance();
|
|
18 |
Project_Info projectInfo = Project_Info.GetInstance();
|
|
19 | 19 |
try |
20 | 20 |
{ |
21 | 21 |
StreamWriter sw = new StreamWriter(Application.StartupPath + @"\ProjectInfo.info"); |
... | ... | |
31 | 31 |
|
32 | 32 |
public static bool ReadID2ProjectInfo() |
33 | 33 |
{ |
34 |
ProjectInfo projectInfo = ProjectInfo.GetInstance();
|
|
34 |
Project_Info projectInfo = Project_Info.GetInstance();
|
|
35 | 35 |
try |
36 | 36 |
{ |
37 | 37 |
StreamReader sr = new StreamReader(Application.StartupPath + @"\ProjectInfo.info"); |
38 |
ProjectInfo jsonProjectInfo = JsonConvert.DeserializeObject<ProjectInfo>(sr.ReadToEnd());
|
|
38 |
Project_Info jsonProjectInfo = JsonConvert.DeserializeObject<Project_Info>(sr.ReadToEnd());
|
|
39 | 39 |
sr.Dispose(); |
40 | 40 |
|
41 |
projectInfo.Path = jsonProjectInfo.Path;
|
|
41 |
projectInfo.DefaultPath = jsonProjectInfo.DefaultPath;
|
|
42 | 42 |
projectInfo.Enable = jsonProjectInfo.Enable; |
43 | 43 |
} |
44 | 44 |
catch (Exception ex) |
내보내기 Unified diff