Exemple #1
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            AlbumForm albumForm = new AlbumForm();

            albumForm.MdiParent = this;
            albumForm.Show();
        }
Exemple #2
0
        private void Add_Click(object sender, EventArgs e)
        {
            AlbumForm albumForm = new AlbumForm();

            albumForm.MdiParent = this;
            albumForm.Show();
        }
Exemple #3
0
 private void Edit_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in this.dataGridView1.SelectedRows)
     {
         Album album = row.DataBoundItem as Album;
         if (album != null)
         {
             AlbumForm albumForm = new AlbumForm(album);
             albumForm.MdiParent = this.ParentForm;
             albumForm.Show();
         }
     }
 }
Exemple #4
0
        //Import Album
        private void albumToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Title  = "Import album";
                openFileDialog.Filter = "Files format Xml (*.xml)|*.xml" +
                                        "|All files (*.*)|*.*";
                openFileDialog.Multiselect = false;

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    Album     data      = AlbumXmlSerialized.Deserialize(openFileDialog.FileName);
                    AlbumForm albumForm = new AlbumForm(data);
                    albumForm.MdiParent = this;
                    albumForm.Show();
                }
            }
            catch (Exception x)
            {
                MessageBox.Show("Error : " + x.Message);
            }
        }