Ejemplo n.º 1
0
 void lvShortcuts_SubItemEditing(object sender, ListViewSubItemEventArgs args)
 {
     if (args != null && args.Item != null && !args.Handled)
     {
         OPMShortcut cmd = (OPMShortcut)args.Item.Tag;
         if (ShortcutMapper.IsConfigurableShortcut(cmd))
         {
             if (args.SubItemIndex == hdrKey.Index)
             {
                 EditCommand(cmd, true);
             }
             else if (args.SubItemIndex == hdrAltkey.Index)
             {
                 EditCommand(cmd, false);
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void lvPictures_SubItemEdited(object sender, ListViewSubItemEventArgs args)
        {
            if (lvPictures.SelectedItems.Count > 0)
            {
                PictureInfo pi = lvPictures.SelectedItems[0].Tag as PictureInfo;
                if (pi != null)
                {
                    string val = args.SubItem.Text;

                    if (args.SubItemIndex == colDescription.Index)
                    {
                        pi.Description = val;
                    }
                    else if (args.SubItemIndex == colImageType.Index)
                    {
                        if (!string.IsNullOrEmpty(val))
                        {
                            pi.PictureType = (PictureType)Enum.Parse(typeof(PictureType), val);
                        }
                    }
                }
            }
        }
        void lvTracks_SubItemEdited(object sender, ListViewSubItemEventArgs args)
        {
            Track t = args.Item.Tag as Track;

            if (t != null)
            {
                if (args.SubItemIndex == colAlbum.Index)
                {
                    t.Album = args.SubItem.Text;
                }
                else if (args.SubItemIndex == colArtist.Index)
                {
                    t.Artist = args.SubItem.Text;
                }
                else if (args.SubItemIndex == colTitle.Index)
                {
                    t.Title = args.SubItem.Text;
                }
                else if (args.SubItemIndex == colGenre.Index)
                {
                    t.Genre = args.SubItem.Text;
                }
            }
        }
Ejemplo n.º 4
0
 void lvConnFiles_SubItemEdited(object sender, ListViewSubItemEventArgs args)
 {
     RebuildDataTable();
 }
Ejemplo n.º 5
0
 void OnListEdited(object sender, ListViewSubItemEventArgs args)
 {
     BuildSubtitleDownloadURIsFromList();
     Modified = true;
 }
Ejemplo n.º 6
0
 void lvBookmarks_SubItemEdited(object sender, ListViewSubItemEventArgs args)
 {
     SaveBookmarks(true);
 }