public frmMain() { InitializeComponent(); StartPosition = FormStartPosition.CenterScreen; CURRENT_GROUP_STATE = GROUP_STATE.WAIT; CURRENT_ITEM_STATE = ITEM_STATE.WAIT; groupMapping = new Dictionary <string, GroupModel>(); // groups = new List<GroupModel>(); }
public Item(Point location, Texture2D worldTexture, Texture2D inventoryTexture, ITEM_STATE itemState, Texture2D gridTexture = null, Texture2D equippedTexture = null) { _currentState = itemState; _drawLocation.X = location.X; _drawLocation.Y = location.Y; _drawRotation = 0; _gridTexture = gridTexture; _worldTexture = worldTexture; _inventoryTexture = inventoryTexture; _equippedTexture = equippedTexture; }
public Item(Point location, Texture2D allTextures, ITEM_STATE itemState) { _currentState = itemState; _drawLocation.X = location.X; _drawLocation.Y = location.Y; _drawRotation = 0; _gridTexture = allTextures; _worldTexture = allTextures; _inventoryTexture = allTextures; _equippedTexture = allTextures; }
private void btnAppOk_Click(object sender, EventArgs e) { string ID = getUnixTime(); string name = txtAppName.Text; string path = txtAppPath.Text; if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(path)) { MessageBox.Show("Tên hoặc đường dẫn không được rỗng"); return; } string selectedGroupID = dgvGroup.SelectedRows[0].Cells["code"].Value.ToString(); GroupModel currentGroup = groupMapping[selectedGroupID]; if (currentGroup != null) { switch (CURRENT_ITEM_STATE) { case ITEM_STATE.ADD: currentGroup.Items.Add(ID, new ItemModel() { ID = ID, Name = name, Url = path }); loadAppDataToDataGridView(currentGroup.ID); break; case ITEM_STATE.EDIT: break; } CURRENT_ITEM_STATE = ITEM_STATE.WAIT; changeAppState(); } else { MessageBox.Show("Chưa chọn nhóm"); } }
public Platform(Point position, Texture2D texture, ITEM_STATE itemState) : base(position, texture, itemState) { }
//Texture2D PassiveTexture; //public BasicBlock(Texture2D active_texture/*, Texture2D passive_texture*/, int grid_x = 0, int grid_y = 0, bool is_active = false) : base(new Point(grid_x,grid_y),active_texture) //{ // //PassiveTexture = passive_texture; //} public Block(Point position, Texture2D active_texture/*, Texture2D passive_texture*/, ITEM_STATE itemState) : base(position, active_texture, itemState) { //PassiveTexture = passive_texture; }
private void btnAppCancel_Click(object sender, EventArgs e) { CURRENT_ITEM_STATE = ITEM_STATE.WAIT; changeAppState(); }
private void btnAppEdit_Click(object sender, EventArgs e) { CURRENT_ITEM_STATE = ITEM_STATE.EDIT; changeAppState(); }
private void btnAppAdd_Click(object sender, EventArgs e) { CURRENT_ITEM_STATE = ITEM_STATE.ADD; changeAppState(); }