All pastes #2088618 Raw Edit

Unnamed

public text v1 · immutable
#2088618 ·published 2011-10-10 09:04 UTC
rendered paste body
Eksempel 1:


        case zMemTreeRec.MemorySize of
          1 : MemSize1RadioButton.Checked := True;
          8 : MemSize8RadioButton.Checked := True;
          16: MemSize16RadioButton.Checked := True;
          32: MemSize32RadioButton.Checked := True;
          64: MemSize64RadioButton.Checked := True;
          else begin
            MemSizeCustomSpinEdit.Value := zMemTreeRec.MemorySize;
            MemSizeCustomRadioButton.Checked := True;
            MemSizeCustomLabel.Enabled := False;
            MemSizeCustomSpinEdit.Enabled := False;
          end;
        end;


Eksempel 2:

    case NewDeviceForm.CreateContentSelection of
      ccsCopyFrom           : if not fRADCoreData.DeviceExists(NewDeviceForm.DeviceName) then begin
                                if fRADCoreData.Load(NewDeviceForm.CopyFrom) then begin
                                  fRADCoreData.SaveAsNewDevice(NewDeviceForm.DeviceName);
                                  DeviceListComboBox.Items.Text := fRADCoreData.DeviceList;
                                  DeviceListComboBox.ItemIndex := IndexInStrings(NewDeviceForm.DeviceName, DeviceListComboBox.Items);
                                end
                                else ShowMessage('Can''t find the device "' + NewDeviceForm.CopyFrom + '"!');
                              end
                              else ShowMessage('The device "' + NewDeviceForm.CopyFrom + '" already exists!');
      ccsEmpty              : if not fRADCoreData.DeviceExists(NewDeviceForm.DeviceName) then begin
                                if fRADCoreData.MakeEmptyDevice(NewDeviceForm.DeviceName) then begin
                                  DeviceListComboBox.Items.Text := fRADCoreData.DeviceList;
                                  DeviceListComboBox.ItemIndex := IndexInStrings(NewDeviceForm.DeviceName, DeviceListComboBox.Items);
                                end
                                else ShowMessage('Can''t create the device "' + NewDeviceForm.DeviceName + '"!');
                              end
                              else ShowMessage('The device "' + NewDeviceForm.CopyFrom + '" already exists!');
    end;