Esempio n. 1
0
        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>();
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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");
            }
        }
Esempio n. 5
0
 public Platform(Point position, Texture2D texture, ITEM_STATE itemState)
     : base(position, texture, itemState)
 {
 }
Esempio n. 6
0
 //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;
 }
Esempio n. 7
0
 private void btnAppCancel_Click(object sender, EventArgs e)
 {
     CURRENT_ITEM_STATE = ITEM_STATE.WAIT;
     changeAppState();
 }
Esempio n. 8
0
 private void btnAppEdit_Click(object sender, EventArgs e)
 {
     CURRENT_ITEM_STATE = ITEM_STATE.EDIT;
     changeAppState();
 }
Esempio n. 9
0
 private void btnAppAdd_Click(object sender, EventArgs e)
 {
     CURRENT_ITEM_STATE = ITEM_STATE.ADD;
     changeAppState();
 }