Ejemplo n.º 1
0
        private void ListView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            var f = listView1.SelectedItems[0].Tag as FileMetaInfo;

            listView3.Items.Clear();
            foreach (var item in f.Infos)
            {
                listView3.Items.Add(new ListViewItem(FileMetaInfoEditorDialog.GetName(item))
                {
                    Tag = item
                });
            }
        }
Ejemplo n.º 2
0
        private void ListView3_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listView3.SelectedItems.Count == 0)
            {
                return;
            }
            var f = listView3.SelectedItems[0].Tag as MetaInfo;

            if (lastControl != null)
            {
                lastControl.Stop();
            }
            groupBox1.Controls.Clear();
            var c = FileMetaInfoEditorDialog.GetControl(f);

            lastControl = c as IMetaInfoEditorControl;
            lastControl.ValueChanged += MetaInfoManager_ValueChanged;
            groupBox1.Controls.Add(c);
        }
Ejemplo n.º 3
0
        private void PropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }

            var tag = listView1.SelectedItems[0].Tag;

            if (tag is IFileInfo fi)
            {
                FileMetaInfoEditorDialog d = new FileMetaInfoEditorDialog();
                d.Init(fi);
                d.ShowDialog();
            }
            if (tag is TagInfo ti)
            {
                TagPropertyDialog d = new TagPropertyDialog();
                d.Init(ti);
                d.ShowDialog();
                if (d.Changed)
                {
                    UpdateList(CurrentTag);
                }
            }
            if (tag is TagInfoCover tic)
            {
                TagPropertyDialog d = new TagPropertyDialog();
                d.Init(tic.TagInfo);
                d.ShowDialog();
                if (d.Changed)
                {
                    UpdateList(CurrentTag);
                }
            }
        }