Inheritance: System.Configuration.ConfigurationElement
Example #1
0
        private void okButton_Click(object sender, EventArgs e)
        {
            FloppyElement floppy;
            DiskElement disk;

            DialogResult = DialogResult.OK;

            SystemConfig.Machine.MemorySize = memoryTrack.Value;
            SystemConfig.Machine.Floppies.Clear();
            SystemConfig.Machine.Disks.Clear();

            floppy = new FloppyElement();
            floppy.Id = 0;
            floppy.Image = primaryFloppy.Text;
            SystemConfig.Machine.Floppies.Add(floppy);

            floppy = new FloppyElement();
            floppy.Id = 1;
            floppy.Image = secondaryFloppy.Text;
            SystemConfig.Machine.Floppies.Add(floppy);

            disk = new DiskElement();
            disk.Id = 0;
            disk.Image = primaryMaster.Text;
            disk.Type = (DriveType)primaryMasterType.SelectedIndex;
            SystemConfig.Machine.Disks.Add(disk);

            disk = new DiskElement();
            disk.Id = 1;
            disk.Image = primarySlave.Text;
            disk.Type = (DriveType)primarySlaveType.SelectedIndex;
            SystemConfig.Machine.Disks.Add(disk);

            disk = new DiskElement();
            disk.Id = 2;
            disk.Image = secondaryMaster.Text;
            disk.Type = (DriveType)secondaryMasterType.SelectedIndex;
            SystemConfig.Machine.Disks.Add(disk);

            disk = new DiskElement();
            disk.Id = 3;
            disk.Image = secondarySlave.Text;
            disk.Type = (DriveType)secondarySlaveType.SelectedIndex;
            SystemConfig.Machine.Disks.Add(disk);

            SystemConfig.Save();
        }
Example #2
0
File: Disk.cs Project: hmyit/VM86CS
 public void Remove(DiskElement element)
 {
     BaseRemove(GetElementKey(element));
 }
Example #3
0
 public void Remove(DiskElement element)
 {
     BaseRemove(GetElementKey(element));
 }
Example #4
0
File: Disk.cs Project: hmyit/VM86CS
 public void Add(DiskElement element)
 {
     BaseAdd(element);
 }
Example #5
0
 public void Add(DiskElement element)
 {
     BaseAdd(element);
 }