private void dataGridViewShow_CellClick(object sender, DataGridViewCellEventArgs e) { return; int index = e.RowIndex; if (dataList.Count == 0) { return; } if (index < 0) { return; } formInput = new FormInput(); formInput.Owner = this; formInput.MdiParent = this.MdiParent; formInput.type = (int)fileClass.type.EDIT; formInput.branchName = dataList[index].title; formInput.des = dataList[index].des; formInput.zoomImage = dataList[index].imageData; formInput.date = dataList[index].date; formInput.fileName = dataList[index].filePath; formInput.oriImage = dataList[index].oriImage; formInput.index = index; formInput.FormClosed += new FormClosedEventHandler(formInput_FormClosed); formInput.Show(); }
private void toolStripMenuItemInsert_Click(object sender, EventArgs e) { formInput = new FormInput(); formInput.Owner = this; formInput.MdiParent = this.MdiParent; formInput.type = (int)fileClass.type.INSERT; formInput.branchName = textBoxBranchName.Text; formInput.index = dataGridViewIndex; formInput.FormClosed += new FormClosedEventHandler(formInput_FormClosed); formInput.Show(); }
private void buttonNew_Click(object sender, EventArgs e) { if (textBoxBranchName.Text == "") { MessageBox.Show("請輸入名稱"); return; } formInput = new FormInput(); formInput.Owner = this; formInput.MdiParent = this.MdiParent; formInput.type = (int)fileClass.type.NEW; formInput.branchName = textBoxBranchName.Text; formInput.FormClosed += new FormClosedEventHandler(formInput_FormClosed); formInput.Show(); }
private void toolStripMenuItemEdit_Click(object sender, EventArgs e) { if (dataList.Count == 0) { return; } if (dataGridViewIndex < 0) { return; } formInput = new FormInput(); formInput.Owner = this; formInput.MdiParent = this.MdiParent; formInput.type = (int)fileClass.type.EDIT; formInput.branchName = dataList[dataGridViewIndex].title; formInput.des = dataList[dataGridViewIndex].des; formInput.zoomImage = dataList[dataGridViewIndex].imageData; formInput.date = dataList[dataGridViewIndex].date; formInput.fileName = dataList[dataGridViewIndex].filePath; formInput.oriImage = dataList[dataGridViewIndex].oriImage; formInput.index = dataGridViewIndex; formInput.FormClosed += new FormClosedEventHandler(formInput_FormClosed); formInput.Show(); }