private void ListView_Configurations_AfterLabelEdit(object sender, LabelEditEventArgs e)
        {
            ListView           control = (ListView)sender;
            EmoteConfiguration config  = (EmoteConfiguration)control.Items[e.Item].Tag;

            config.Name = e.Label;
        }
        private void ListView_Configurations_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.ListView_Configurations.SelectedItems.Count != 1)
            {
                this.ListView_Configurations.ContextMenuStrip = this.ContextMenuStrip_ConfigurationsMenu;

                if (this.currentEmoteConfiguration != null)
                {
                    this.currentEmoteConfiguration.DefaultEmotes = TreeNodeConverter.TreeNodeCollectionToEmoteNodes(this.TreeView_DefaultEmotes.Nodes).ToList();
                    this.currentEmoteConfiguration.CombatEmotes  = TreeNodeConverter.TreeNodeCollectionToEmoteNodes(this.TreeView_CombatEmotes.Nodes).ToList();
                    this.currentEmoteConfiguration.FeedingEmotes = TreeNodeConverter.TreeNodeCollectionToEmoteNodes(this.TreeView_FeedingEmotes.Nodes).ToList();
                }

                this.currentEmoteConfiguration = null;
                this.ClearTreeViews();
                this.DisableItemsOfToolStripExcept(
                    this.ToolStrip_Main,
                    this.ToolStripItemsThatNeedNoActiveConfiguration.ToArray()
                    );
            }
            else
            {
                this.ListView_Configurations.ContextMenuStrip = this.ContextMenuStrip_Configuration;
                this.currentEmoteConfiguration = (EmoteConfiguration)this.ListView_Configurations.SelectedItems[0].Tag;
                this.ClearTreeViews();
                this.DisableItemsOfToolStripExcept(
                    this.ToolStrip_Main,
                    this.ToolStripItemsThatNeedNoActiveEmote.ToArray()
                    );

                this.TreeView_DefaultEmotes.Nodes.AddRange(TreeNodeConverter.EmoteNodesToTreeNodes(this.currentEmoteConfiguration.DefaultEmotes).ToArray());
                this.TreeView_CombatEmotes.Nodes.AddRange(TreeNodeConverter.EmoteNodesToTreeNodes(this.currentEmoteConfiguration.CombatEmotes).ToArray());
                this.TreeView_FeedingEmotes.Nodes.AddRange(TreeNodeConverter.EmoteNodesToTreeNodes(this.currentEmoteConfiguration.FeedingEmotes).ToArray());
            }
        }
 private void ContextMenuStrip_Configuration_Opening(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (this.ListView_Configurations.SelectedItems.Count == 1)
     {
         ListViewItem       item   = this.ListView_Configurations.SelectedItems[0];
         EmoteConfiguration config = (EmoteConfiguration)item.Tag;
         this.petFamilyToolStripMenuItem.Image = IconFactory.GetPetFamilyIcon(config.PetFamily.FamilyType);
     }
 }
 private void ToolStripMenuItem_RenameToFamily_Click(object sender, EventArgs e)
 {
     if (this.ListView_Configurations.SelectedItems.Count == 1)
     {
         ListViewItem       item   = this.ListView_Configurations.SelectedItems[0];
         EmoteConfiguration config = (EmoteConfiguration)item.Tag;
         config.Name = item.Text = config.PetFamily.Name;
     }
 }
        private void ToolStripMenuItem_SetPetFamily_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;

            if (this.ListView_Configurations.SelectedItems.Count == 1)
            {
                ListViewItem       listViewItem = this.ListView_Configurations.SelectedItems[0];
                EmoteConfiguration config       = (EmoteConfiguration)listViewItem.Tag;
                config.PetFamily        = (PetFamily)menuItem.Tag;
                listViewItem.ImageIndex = IconFactory.GetPetFamilyIconIndex(config.PetFamily.FamilyType);
                listViewItem.Group      = this.ListView_Configurations.Groups[String.Format("ListViewGroup_{0}_{1}", config.PetFamily.ClassType, config.PetFamily.Language)];
            }
        }
        private void ToolStripMenuItem_Import_Click(object sender, EventArgs e)
        {
            if (this.currentEmoteConfiguration == null)
            {
                return;
            }

            ToolStripMenuItem  menuItem = (ToolStripMenuItem)sender;
            EmoteConfiguration config   = (EmoteConfiguration)menuItem.Tag;

            this.AddTreeNodeRange(ref this.TreeView_DefaultEmotes, config.DefaultEmotes);
            this.AddTreeNodeRange(ref this.TreeView_CombatEmotes, config.CombatEmotes);
            this.AddTreeNodeRange(ref this.TreeView_FeedingEmotes, config.FeedingEmotes);
        }
示例#7
0
 public override void StartEmote(Entity entity, Timestep renderTimestep, EmoteConfiguration emote)
 {
 }