Пример #1
0
        private void CharacterListView_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            ICharacterListViewItem item = source[e.ItemIndex];

            if (item.ListViewItemCache != null)
            {
                e.Item = item.ListViewItemCache;
                return;
            }

            if (item.LargeIcon != null)
            {
                if (!LargeImageList.Images.ContainsKey(item.UniqueStringID))
                {
                    LargeImageList.Images.Add(item.UniqueStringID, item.LargeIcon);
                }
            }
            if (item.SmallIcon != null)
            {
                if (!SmallImageList.Images.ContainsKey(item.UniqueStringID))
                {
                    SmallImageList.Images.Add(item.UniqueStringID, item.SmallIcon);
                }
            }

            ListViewItem lvi = new ListViewItem(item.Name, LargeImageList.Images.IndexOfKey(item.UniqueStringID));

            lvi.Tag = item;
            lvi.SubItems.Add(item.Origin);
            lvi.SubItems.Add(item.Key);
            e.Item = lvi;

            item.ListViewItemCache = lvi;
        }
Пример #2
0
 private void LoadEmotePlayer()
 {
     if (listView1.SelectedIndices.Count > 0)
     {
         foreach (int x in listView1.SelectedIndices)
         {
             //lock (emote)
             {
                 ICharacterListViewItem item = (ICharacterListViewItem)listView1.Items[x].Tag;
                 LoadCharacter(item);
             }
             break;
         }
     }
 }
Пример #3
0
        public void LoadCharacter(ICharacterListViewItem item)
        {
            lock (emote)
            {
                //lock (emote)
                {
                    //players.ForEach(dr => emote.DeletePlayer(dr));
                    //players.Clear();

                    if (characterOffhand != null)
                    {
                        emote.DeletePlayer(characterOffhand);
                        characterOffhandIntf = null; // allow falloff via GC, might look into disposable implementation if needed
                    }
                    characterOffhand     = character;
                    characterOffhandIntf = characterIntf;
                    if (characterOffhand != null)
                    {
                        //characterOffhand.SetColor(0xffffff00, 20, 0.5f);
                        characterOffhand.Hide(); // temporary
                    }
                }


                EmotePlayer player = emote.CreatePlayer(item.Name, TransCryptCharacter(item.GetDataStream(), item.Key, emoteLibs.First().Key, item.ColorMode, emoteLibs.First().ColorMode));

                player.SetScale(0.4f, 0, 0);
                player.SetCoord(0, 50, 0, 0);
                player.StartWind(0f, 1f, 0.8f, 0.5f, 0.8f);
                player.SetSmoothing(true);
                //player.SetColor(0xffffff00, 0, 0.0f);

                player.Show();

                //player.SetColor(0xffffffff, 20, 0.5f);

                //players.Add(player);

                character     = player;
                characterIntf = new CharacterControlInterface(character);

                //RenderBitmap(item.GetDataStream(), item.Key);
            }
        }
Пример #4
0
        public void LoadCharacter(ICharacterListViewItem item)
        {
            lock (emote)
            {
                //lock (emote)
                {
                    //players.ForEach(dr => emote.DeletePlayer(dr));
                    //players.Clear();

                    if (characterOffhand != null)
                    {
                        emote.DeletePlayer(characterOffhand);
                        characterOffhandIntf = null; // allow falloff via GC, might look into disposable implementation if needed
                    }
                    characterOffhand = character;
                    characterOffhandIntf = characterIntf;
                    if (characterOffhand != null)
                    {
                        //characterOffhand.SetColor(0xffffff00, 20, 0.5f);
                        characterOffhand.Hide(); // temporary
                    }
                }


                EmotePlayer player = emote.CreatePlayer(item.Name, TransCryptCharacter(item.GetDataStream(), item.Key, emoteLibs.First().Key, item.ColorMode, emoteLibs.First().ColorMode));

                player.SetScale(0.4f, 0, 0);
                player.SetCoord(0, 50, 0, 0);
                player.StartWind(0f, 1f, 0.8f, 0.5f, 0.8f);
                player.SetSmoothing(true);
                //player.SetColor(0xffffff00, 0, 0.0f);

                player.Show();

                //player.SetColor(0xffffffff, 20, 0.5f);

                //players.Add(player);

                character = player;
                characterIntf = new CharacterControlInterface(character);

                //RenderBitmap(item.GetDataStream(), item.Key);


            }
        }