Наследование: System.Configuration.ConfigurationElement
Пример #1
0
 public void Remove(FloppyElement element)
 {
     BaseRemove(GetElementKey(element));
 }
Пример #2
0
 public void Add(FloppyElement element)
 {
     BaseAdd(element);
 }
Пример #3
0
 public void Add(FloppyElement element)
 {
     BaseAdd(element);
 }
Пример #4
0
 public void Remove(FloppyElement element)
 {
     BaseRemove(GetElementKey(element));
 }
Пример #5
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();
        }