Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        private void Disengage(Map map)
        {
            cellContent help = newContent;

            newContent = oldContent;
            map.SetContentOfCell(position, newContent);
            active     = !active;
            oldContent = help;
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        // 관항목 '추가'
        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();
        }
Exemplo n.º 5
0
 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("지정된 자료가 없습니다.", "오류");
     }
 }
Exemplo n.º 6
0
        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();
            }
        }
Exemplo n.º 7
0
        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();
        }
Exemplo n.º 8
0
 public void setContent(cellContent _content)
 {
     content = _content;
 }
Exemplo n.º 9
0
 public Cell(cellContent _content)
 {
     content = _content;
 }
Exemplo n.º 10
0
 private MapManipulation(MapManipulation _mapMani)
 {
     position   = _mapMani.position;
     newContent = _mapMani.newContent;
     oldContent = _mapMani.oldContent;
 }
Exemplo n.º 11
0
 public MapManipulation(Vector2i _position, cellContent _newContent, cellContent _oldContent)
 {
     position   = _position;
     newContent = _newContent;
     oldContent = _oldContent;
 }