예제 #1
0
        private void UpdateMyBuffsList()
        {
            try
            {
                listView_mybuffs_data.BeginUpdate();

                Globals.MyBuffsListLock.EnterReadLock();
                try
                {
                    UpdateMyBuffsListInternal();
                }
                finally
                {
                    Globals.MyBuffsListLock.ExitReadLock();
                }

                listView_mybuffs_data.VirtualListSize = listView_mybuffs_data_items.Count;
                Util.Sort(listView_mybuffs_data_items, lvwColumnSorter_mybuffs_data);
                //listView_mybuffs_data_items.Sort(lvwColumnSorter_mybuffs_data);
            }
            catch
            {
                //failed to acquire the lock...
                this.timer_mybuffs.Start();
            }
            finally
            {
                listView_mybuffs_data.EndUpdate();
                listView_mybuffs_data.Refresh();
            }
        }
예제 #2
0
        private void UpdateInventoryList()
        {
            //Clear_Equip();

            try
            {
                listView_inventory.BeginUpdate();

                Globals.InventoryLock.EnterReadLock();
                try
                {
                    UpdateInventoryListInternal();
                }
                finally
                {
                    Globals.InventoryLock.ExitReadLock();
                }

                listView_inventory.VirtualListSize = listView_inventory_items.Count;
                Util.Sort(listView_inventory_items, lvwColumnSorter_inventory);
                //listView_inventory_items.Sort(lvwColumnSorter_inventory);
            }
            catch
            {
                //failed to acquire the lock...
                this.timer_inventory.Start();
            }
            finally
            {
                listView_inventory.EndUpdate();
                listView_inventory.Refresh();

                label_inventory_count.Text = listView_inventory.Items.Count.ToString() + "/" + Globals.gamedata.my_char.InventoryLimit.ToString();
            }
        }