Ejemplo n.º 1
0
        private void btnDiskEdit_Click(object sender, EventArgs e)
        {
            try
            {
                if (lstDisks.SelectedItem != null)
                {
                    DiskEditor dlg = new DiskEditor();
                    Disk       dsk = (Disk)lstDisks.SelectedItem;
                    dlg.Path         = dsk.Path;
                    dlg.FileName     = dsk.Name;
                    dlg.Format       = dsk.Format;
                    dlg.ExtraOptions = dsk.ExtraOptions;

                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        int currentselection = lstDisks.SelectedIndex;
                        lstDisks.Items.RemoveAt(currentselection);

                        lstDisks.Items.Insert(currentselection,
                                              new Disk(
                                                  dlg.FileName,
                                                  dlg.Path,
                                                  dlg.Format,
                                                  dlg.ExtraOptions
                                                  )
                                              );

                        _titleChanged(EventArgs.Empty);
                    }
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            DiskEditor dlg = new DiskEditor();

            dlg.FileName = "Disc " + (lstDisks.Items.Count + 1);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                lstDisks.Items.Add(
                    new Disk(
                        dlg.FileName,
                        dlg.Path,
                        dlg.Format,
                        dlg.ExtraOptions
                        )
                    );

                _titleChanged(EventArgs.Empty);
            }
        }
Ejemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            DiskEditor dlg = new DiskEditor();
            dlg.FileName = "Disc " + (lstDisks.Items.Count + 1);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                lstDisks.Items.Add(
                    new Disk(
                        dlg.FileName,
                        dlg.Path,
                        dlg.Format,
                        dlg.ExtraOptions
                    )
                );

                _titleChanged(EventArgs.Empty);
            }
        }
Ejemplo n.º 4
0
        private void btnDiskEdit_Click(object sender, EventArgs e)
        {
            try
            {
                if (lstDisks.SelectedItem != null)
                {
                    DiskEditor dlg = new DiskEditor();
                    Disk dsk = (Disk)lstDisks.SelectedItem;
                    dlg.Path = dsk.Path;
                    dlg.FileName = dsk.Name;
                    dlg.Format = dsk.Format;
                    dlg.ExtraOptions = dsk.ExtraOptions;

                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        int currentselection = lstDisks.SelectedIndex;
                        lstDisks.Items.RemoveAt(currentselection);

                        lstDisks.Items.Insert(currentselection,
                            new Disk(
                                dlg.FileName,
                                dlg.Path,
                                dlg.Format,
                                dlg.ExtraOptions
                            )
                        );

                        _titleChanged(EventArgs.Empty);
                    }
                }
            }
            catch
            {
            }
        }