private void buttonSave_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(this.textBoxId.Text)) { MessageBox.Show("아이디는 필수로 입력해야 합니다."); return; } this.buttonSave.Enabled = false; if (this.action != Info.Action.MODIFY) { this.pRecipe = new Info.ProcessProgram(this.textBoxId.Text, Info.PPIDType.TYPE_1); } this.pRecipe.processCommands.Clear(); Info.ProcessCommand processCommand = new Info.ProcessCommand(); for (int i = 0; i < this.dataGridView1.Rows.Count - 1; i++) { Info.Parameter parameter = new Info.Parameter((string)this.dataGridView1[0, i].Value, (string)this.dataGridView1[1, i].Value); processCommand.CCODE.Add(parameter); } this.pRecipe.processCommands.Add(processCommand); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); }
private void buttonSave_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(this.textBoxId.Text)) { MessageBox.Show("HOST PPID 입력은 필수입니다."); return; } this.pRecipe = new Info.ProcessProgram(this.textBoxId.Text, Info.PPIDType.TYPE_2); Info.ProcessCommand dProcessCommand = new Info.ProcessCommand(); //dProcessCommand.CCODE.Add(new Info.Parameter("SubPPID", (string)this.comboBoxEqpPpid.SelectedValue)); dProcessCommand.CCODE.Add(new Info.Parameter("SubPPID", (string)this.comboBoxEqpPpid.SelectedItem)); this.pRecipe.processCommands.Add(dProcessCommand); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); }
private void buttonDefaultSave_Click(object sender, EventArgs e) { Info.ProcessProgram dRecipe = new Info.ProcessProgram("default", Info.PPIDType.TYPE_1); Info.ProcessCommand processCommand = new Info.ProcessCommand(); for (int i = 0; i < this.dataGridView1.Rows.Count - 1; i++) { Info.Parameter parameter = new Info.Parameter((string)this.dataGridView1[0, i].Value, (string)this.dataGridView1[1, i].Value); processCommand.CCODE.Add(parameter); } dRecipe.processCommands.Add(processCommand); System.IO.Stream dStream = System.IO.File.Create(mDefaultFilePath); mBinaryFormatter.Serialize(dStream, dRecipe); dStream.Close(); System.Windows.Forms.MessageBox.Show("저장되었습니다."); }
private void buttonSave_Click(object sender, EventArgs e) { try { Info.ProcessProgram PP = new Info.ProcessProgram(this.textBoxID.Text, (Info.PPIDType) this.comboBoxType.SelectedIndex); Info.ProcessCommand PC = new Info.ProcessCommand(); for (int i = 0; i < this.dataGridViewBody.RowCount - 1; i++) { Info.Parameter P = new Info.Parameter(this.dataGridViewBody.Rows[i].Cells[0].Value.ToString(), this.dataGridViewBody.Rows[i].Cells[1].Value.ToString()); PC.CCODE.Add(P); } PP.processCommands.Add(PC); this.subSave(PP); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }