Example #1
0
        private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Put the records in the clipboard into the active MDI child
            CollectionForm activeChild = (CollectionForm)ActiveMdiChild;

            activeChild.collection.AddRange(fromClipboard());
            activeChild.RefreshFilteredItems();
        }
Example #2
0
        private void newCollectionWindow(Collection collection)
        {
            CollectionForm cf = new CollectionForm(collection);

            cf.MdiParent = this;
            if (MdiChildren.Length == 1)
            {
                cf.WindowState = FormWindowState.Maximized;
            }
            cf.Show();
        }
Example #3
0
        private void cutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Get the selected records
            CollectionForm activeChild = (CollectionForm)ActiveMdiChild;
            List <Media>   records     = activeChild.getSelectedItems();

            // Put the data into the clipboard
            toClipboard(records);

            // Since this is a cut, remove the selected records
            activeChild.collection.RemoveRange(records);
            activeChild.RefreshFilteredItems();
        }
Example #4
0
        private int getActiveCollectionIndex()
        {
            //Get the index of the active collection window
            CollectionForm cf = (CollectionForm)ActiveMdiChild;

            for (int i = 0; i < collections.Count; i++)
            {
                if (collections[i].Item == cf.collection)
                {
                    return(i);
                }
            }
            throw new IndexOutOfRangeException("Failed to look up index of MDI child form.");
        }
Example #5
0
 private void newCollectionWindow(Collection collection)
 {
     CollectionForm cf = new CollectionForm(collection);
     cf.MdiParent = this;
     if (MdiChildren.Length == 1) cf.WindowState = FormWindowState.Maximized;
     cf.Show();
 }