개정판 8847ea67
dev issue #1203 : MSSQL 설정 창 추가 및 데이터 구조 변경
Change-Id: I7f310aba7b221ea99c3e5b8070fb89c7a85460e3
DTI_PID/SPPIDConverter/ConverterForm.cs | ||
---|---|---|
143 | 143 |
} |
144 | 144 |
} |
145 | 145 |
|
146 |
private void btnID2Project_ButtonClick(object sender, ButtonPressedEventArgs e)
|
|
146 |
private void btnID2DB_Click(object sender, EventArgs e)
|
|
147 | 147 |
{ |
148 |
xtraFolderBrowserDialog.SelectedPath = btnID2Project.Text; |
|
149 |
|
|
150 |
if (xtraFolderBrowserDialog.ShowDialog() == DialogResult.OK) |
|
148 |
ID2DBSetting form = new ID2DBSetting(); |
|
149 |
DialogResult = form.ShowDialog(); |
|
150 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
|
151 |
_ProjectInfo.DefaultPath = Settings.Default.ProjectPath; |
|
152 |
_ProjectInfo.DBType = (ID2DB_Type)Settings.Default.ProjectDBType; |
|
153 |
_ProjectInfo.ServerIP = Settings.Default.ProjectServerIP; |
|
154 |
_ProjectInfo.Port = Settings.Default.ProjectPort; |
|
155 |
_ProjectInfo.DBUser = Settings.Default.ProjectDBUser; |
|
156 |
_ProjectInfo.DBPassword = Settings.Default.ProjectDBPassword; |
|
157 |
|
|
158 |
if (DialogResult == DialogResult.OK) |
|
151 | 159 |
{ |
152 |
if (xtraFolderBrowserDialog.SelectedPath[xtraFolderBrowserDialog.SelectedPath.Length - 1] == '\\') |
|
153 |
xtraFolderBrowserDialog.SelectedPath = xtraFolderBrowserDialog.SelectedPath.Remove(xtraFolderBrowserDialog.SelectedPath.Length - 1); |
|
154 |
Settings.Default.LatestProjectPath = xtraFolderBrowserDialog.SelectedPath; |
|
155 |
Settings.Default.Save(); |
|
156 | 160 |
if (InitID2Project()) |
157 |
{ |
|
158 | 161 |
MessageBox.Show(Msg.SuccessProjectSelect, Msg.Information, MessageBoxButtons.OK, MessageBoxIcon.Information); |
159 |
} |
|
160 | 162 |
else |
161 | 163 |
MessageBox.Show(Msg.FailProjectSelect, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning); |
162 | 164 |
} |
... | ... | |
165 | 167 |
private bool InitID2Project() |
166 | 168 |
{ |
167 | 169 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
168 |
_ProjectInfo.DefaultPath = Settings.Default.LatestProjectPath; |
|
169 | 170 |
if (Project_DB.ConnTestAndCreateTable()) |
170 | 171 |
{ |
171 | 172 |
_ProjectInfo.Enable = true; |
172 |
btnID2Project.Text = _ProjectInfo.DefaultPath; |
|
173 |
labelDBType.Text = _ProjectInfo.DBType.ToString(); |
|
174 |
labelDBType.AppearanceItemCaption.ForeColor = Color.Blue; |
|
173 | 175 |
labelID2ProjectName.Text = _ProjectInfo.Name; |
174 | 176 |
labelID2ProjectName.AppearanceItemCaption.ForeColor = Color.Blue; |
175 | 177 |
labelID2ProjectStatus.Text = Msg.ConnectionSuccessful; |
... | ... | |
180 | 182 |
else |
181 | 183 |
{ |
182 | 184 |
_ProjectInfo.Enable = false; |
183 |
btnID2Project.Text = "";
|
|
185 |
labelDBType.Text = "";
|
|
184 | 186 |
labelID2ProjectName.Text = " "; |
185 | 187 |
labelID2ProjectName.AppearanceItemCaption.ForeColor = Color.Red; |
186 | 188 |
labelID2ProjectStatus.Text = Msg.ConnectionFail; |
... | ... | |
764 | 766 |
Settings.Default.DefaultTemplate = comboBoxEditDefaultTemplate.SelectedItem.ToString(); |
765 | 767 |
Settings.Default.Save(); |
766 | 768 |
} |
769 |
|
|
770 |
|
|
767 | 771 |
} |
768 | 772 |
} |
내보내기 Unified diff