public void SetContentOfCell(Vector2i position, cellContent content) { if (!isInMap(position)) { throw new Exception("Invalid position is not on Map -> has no Cellcontent"); } cellMap[position.X, position.Y].SetContent(content); }
private void Disengage(Map map) { cellContent help = newContent; newContent = oldContent; map.SetContentOfCell(position, newContent); active = !active; oldContent = help; }
private void button9_Click(object sender, EventArgs e) { String name = "목 삭제"; string cell_name = this.관data.Rows[k.RowIndex].Cells[1].Value.ToString(); string cell_order = this.관data.Rows[k.RowIndex].Cells[2].Value.ToString(); cellContent gCell = new cellContent(cell_name, this.관data.RowCount, int.Parse(cell_order)); Setting_budget_delete deleteForm = new Setting_budget_delete(name, strPath, gCell, this); deleteForm.StartPosition = FormStartPosition.Manual; deleteForm.Location = new Point(250, 300); deleteForm.Show(); }
// 관항목 '추가' private void button3_Click(object sender, EventArgs e) { String name = "관 추가"; cellContent gCell = new cellContent("", this.관data.RowCount, 0); Setting_budget_add addForm = new Setting_budget_add(g_CodeNumber, 0, gCell, name, strPath, this); addForm.StartPosition = FormStartPosition.Manual; addForm.Location = new Point(250, 300); addForm.Show(); }
private void button6_Click(object sender, EventArgs e) { try { String name = "항 삭제"; string cell_name = this.항data.Rows[h.RowIndex].Cells[1].Value.ToString(); string cell_order = this.항data.Rows[h.RowIndex].Cells[2].Value.ToString(); cellContent gCell = new cellContent(cell_name, this.항data.RowCount, int.Parse(cell_order)); Setting_budget_delete deleteForm = new Setting_budget_delete(name, strPath, gCell, this); deleteForm.StartPosition = FormStartPosition.Manual; deleteForm.Location = new Point(250, 300); deleteForm.Show(); } catch { MessageBox.Show("지정된 자료가 없습니다.", "오류"); } }
private void button7_Click(object sender, EventArgs e) { String name = "항 수정"; if (h == null) { MessageBox.Show("지정된 자료가 없습니다.", "오류"); } else { string cell_name = this.항data.Rows[this.h.RowIndex].Cells[1].Value.ToString(); string cell_order = this.항data.Rows[this.h.RowIndex].Cells[2].Value.ToString(); cellContent gCell = new cellContent(cell_name, this.항data.RowCount, int.Parse(cell_order)); Setting_budget_add addForm = new Setting_budget_add(h_CodeNumber, 0, gCell, name, strPath, this); addForm.StartPosition = FormStartPosition.Manual; addForm.Location = new Point(250, 300); addForm.Show(); } }
private void button8_Click(object sender, EventArgs e) { String name = "항 추가"; int cellCount = 0; int gCode = int.Parse(this.관data.Rows[k.RowIndex].Cells[0].Value.ToString()); foreach (DataGridViewRow row in this.항data.Rows) { if (int.Parse(row.Cells[3].Value.ToString()) == gCode) { cellCount++; } } cellContent gCell = new cellContent("", cellCount, 0); Setting_budget_add addForm = new Setting_budget_add(h_CodeNumber, gCode, gCell, name, strPath, this); addForm.StartPosition = FormStartPosition.Manual; addForm.Location = new Point(250, 300); addForm.Show(); }
public void setContent(cellContent _content) { content = _content; }
public Cell(cellContent _content) { content = _content; }
private MapManipulation(MapManipulation _mapMani) { position = _mapMani.position; newContent = _mapMani.newContent; oldContent = _mapMani.oldContent; }
public MapManipulation(Vector2i _position, cellContent _newContent, cellContent _oldContent) { position = _position; newContent = _newContent; oldContent = _oldContent; }