mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Convert to switch expression.
This commit is contained in:
@@ -107,34 +107,19 @@ public sealed class MediaInfoViewModel : ViewModelBase
|
||||
{
|
||||
ulong totalSize = scsiInfo.Blocks * scsiInfo.BlockSize;
|
||||
|
||||
switch(totalSize)
|
||||
{
|
||||
case > 1099511627776:
|
||||
MediaSize = $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1099511627776d:F3} TiB)";
|
||||
|
||||
break;
|
||||
case > 1073741824:
|
||||
MediaSize = $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1073741824d:F3} GiB)";
|
||||
|
||||
break;
|
||||
case > 1048576:
|
||||
MediaSize = $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1048576d:F3} MiB)";
|
||||
|
||||
break;
|
||||
case > 1024:
|
||||
MediaSize = $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1024d:F3} KiB)";
|
||||
|
||||
break;
|
||||
default:
|
||||
MediaSize = $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize} bytes)";
|
||||
|
||||
break;
|
||||
}
|
||||
MediaSize = totalSize switch
|
||||
{
|
||||
> 1099511627776 => $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1099511627776d:F3} TiB)",
|
||||
> 1073741824 => $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1073741824d:F3} GiB)",
|
||||
> 1048576 => $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1048576d:F3} MiB)",
|
||||
> 1024 => $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize / 1024d:F3} KiB)",
|
||||
_ => $"Media has {scsiInfo.Blocks} blocks of {scsiInfo.BlockSize
|
||||
} bytes/each. (for a total of {totalSize} bytes)"
|
||||
};
|
||||
}
|
||||
|
||||
if(scsiInfo.MediaSerialNumber != null)
|
||||
|
||||
@@ -69,33 +69,15 @@ public sealed class AtaInfoViewModel : ViewModelBase
|
||||
|
||||
if(ataMcptError.HasValue)
|
||||
{
|
||||
switch(ataMcptError.Value.DeviceHead & 0x7)
|
||||
{
|
||||
case 0:
|
||||
AtaMcptText = "Device reports incorrect media card type";
|
||||
|
||||
break;
|
||||
case 1:
|
||||
AtaMcptText = "Device contains a Secure Digital card";
|
||||
|
||||
break;
|
||||
case 2:
|
||||
AtaMcptText = "Device contains a MultiMediaCard ";
|
||||
|
||||
break;
|
||||
case 3:
|
||||
AtaMcptText = "Device contains a Secure Digital I/O card";
|
||||
|
||||
break;
|
||||
case 4:
|
||||
AtaMcptText = "Device contains a Smart Media card";
|
||||
|
||||
break;
|
||||
default:
|
||||
AtaMcptText = $"Device contains unknown media card type {ataMcptError.Value.DeviceHead & 0x07}";
|
||||
|
||||
break;
|
||||
}
|
||||
AtaMcptText = (ataMcptError.Value.DeviceHead & 0x7) switch
|
||||
{
|
||||
0 => "Device reports incorrect media card type",
|
||||
1 => "Device contains a Secure Digital card",
|
||||
2 => "Device contains a MultiMediaCard ",
|
||||
3 => "Device contains a Secure Digital I/O card",
|
||||
4 => "Device contains a Smart Media card",
|
||||
_ => $"Device contains unknown media card type {ataMcptError.Value.DeviceHead & 0x07}"
|
||||
};
|
||||
|
||||
AtaMcptWriteProtectionChecked = (ataMcptError.Value.DeviceHead & 0x08) == 0x08;
|
||||
|
||||
|
||||
@@ -536,29 +536,15 @@ public sealed class ScsiInfoViewModel : ViewModelBase
|
||||
case 0xC2 or 0xC3 or 0xC4 or 0xC5 or 0xC6
|
||||
when StringHandlers.CToString(scsiInquiry.Value.VendorIdentification).ToLowerInvariant().
|
||||
Trim() == "certance":
|
||||
switch(page.Key)
|
||||
{
|
||||
case 0xC2:
|
||||
evpdPageTitle = "Head Assembly Serial Number";
|
||||
|
||||
break;
|
||||
case 0xC3:
|
||||
evpdPageTitle = "Reel Motor 1 Serial Number";
|
||||
|
||||
break;
|
||||
case 0xC4:
|
||||
evpdPageTitle = "Reel Motor 2 Serial Number";
|
||||
|
||||
break;
|
||||
case 0xC5:
|
||||
evpdPageTitle = "Board Serial Number";
|
||||
|
||||
break;
|
||||
case 0xC6:
|
||||
evpdPageTitle = "Base Mechanical Serial Number";
|
||||
|
||||
break;
|
||||
}
|
||||
evpdPageTitle = page.Key switch
|
||||
{
|
||||
0xC2 => "Head Assembly Serial Number",
|
||||
0xC3 => "Reel Motor 1 Serial Number",
|
||||
0xC4 => "Reel Motor 2 Serial Number",
|
||||
0xC5 => "Board Serial Number",
|
||||
0xC6 => "Base Mechanical Serial Number",
|
||||
_ => evpdPageTitle
|
||||
};
|
||||
|
||||
evpdDecodedPage = EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(page.Value);
|
||||
|
||||
@@ -566,33 +552,16 @@ public sealed class ScsiInfoViewModel : ViewModelBase
|
||||
case 0xC0 or 0xC1 or 0xC2 or 0xC3 or 0xC4 or 0xC5
|
||||
when StringHandlers.CToString(scsiInquiry.Value.VendorIdentification).ToLowerInvariant().
|
||||
Trim() == "hp":
|
||||
switch(page.Key)
|
||||
{
|
||||
case 0xC0:
|
||||
evpdPageTitle = "HP Drive Firmware Revision Levels page:";
|
||||
|
||||
break;
|
||||
case 0xC1:
|
||||
evpdPageTitle = "HP Drive Hardware Revision Levels page:";
|
||||
|
||||
break;
|
||||
case 0xC2:
|
||||
evpdPageTitle = "HP Drive PCA Revision Levels page:";
|
||||
|
||||
break;
|
||||
case 0xC3:
|
||||
evpdPageTitle = "HP Drive Mechanism Revision Levels page:";
|
||||
|
||||
break;
|
||||
case 0xC4:
|
||||
evpdPageTitle = "HP Drive Head Assembly Revision Levels page:";
|
||||
|
||||
break;
|
||||
case 0xC5:
|
||||
evpdPageTitle = "HP Drive ACI Revision Levels page:";
|
||||
|
||||
break;
|
||||
}
|
||||
evpdPageTitle = page.Key switch
|
||||
{
|
||||
0xC0 => "HP Drive Firmware Revision Levels page:",
|
||||
0xC1 => "HP Drive Hardware Revision Levels page:",
|
||||
0xC2 => "HP Drive PCA Revision Levels page:",
|
||||
0xC3 => "HP Drive Mechanism Revision Levels page:",
|
||||
0xC4 => "HP Drive Head Assembly Revision Levels page:",
|
||||
0xC5 => "HP Drive ACI Revision Levels page:",
|
||||
_ => evpdPageTitle
|
||||
};
|
||||
|
||||
evpdDecodedPage = EVPD.PrettifyPage_C0_to_C5_HP(page.Value);
|
||||
|
||||
@@ -642,245 +611,68 @@ public sealed class ScsiInfoViewModel : ViewModelBase
|
||||
string featureDescription;
|
||||
AaruConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code);
|
||||
|
||||
switch(desc.Code)
|
||||
{
|
||||
case 0x0000:
|
||||
featureDescription = Features.Prettify_0000(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0001:
|
||||
featureDescription = Features.Prettify_0001(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0002:
|
||||
featureDescription = Features.Prettify_0002(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0003:
|
||||
featureDescription = Features.Prettify_0003(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0004:
|
||||
featureDescription = Features.Prettify_0004(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0010:
|
||||
featureDescription = Features.Prettify_0010(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x001D:
|
||||
featureDescription = Features.Prettify_001D(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x001E:
|
||||
featureDescription = Features.Prettify_001E(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x001F:
|
||||
featureDescription = Features.Prettify_001F(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0020:
|
||||
featureDescription = Features.Prettify_0020(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0021:
|
||||
featureDescription = Features.Prettify_0021(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0022:
|
||||
featureDescription = Features.Prettify_0022(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0023:
|
||||
featureDescription = Features.Prettify_0023(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0024:
|
||||
featureDescription = Features.Prettify_0024(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0025:
|
||||
featureDescription = Features.Prettify_0025(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0026:
|
||||
featureDescription = Features.Prettify_0026(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0027:
|
||||
featureDescription = Features.Prettify_0027(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0028:
|
||||
featureDescription = Features.Prettify_0028(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0029:
|
||||
featureDescription = Features.Prettify_0029(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x002A:
|
||||
featureDescription = Features.Prettify_002A(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x002B:
|
||||
featureDescription = Features.Prettify_002B(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x002C:
|
||||
featureDescription = Features.Prettify_002C(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x002D:
|
||||
featureDescription = Features.Prettify_002D(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x002E:
|
||||
featureDescription = Features.Prettify_002E(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x002F:
|
||||
featureDescription = Features.Prettify_002F(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0030:
|
||||
featureDescription = Features.Prettify_0030(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0031:
|
||||
featureDescription = Features.Prettify_0031(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0032:
|
||||
featureDescription = Features.Prettify_0032(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0033:
|
||||
featureDescription = Features.Prettify_0033(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0035:
|
||||
featureDescription = Features.Prettify_0035(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0037:
|
||||
featureDescription = Features.Prettify_0037(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0038:
|
||||
featureDescription = Features.Prettify_0038(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x003A:
|
||||
featureDescription = Features.Prettify_003A(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x003B:
|
||||
featureDescription = Features.Prettify_003B(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0040:
|
||||
featureDescription = Features.Prettify_0040(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0041:
|
||||
featureDescription = Features.Prettify_0041(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0042:
|
||||
featureDescription = Features.Prettify_0042(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0050:
|
||||
featureDescription = Features.Prettify_0050(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0051:
|
||||
featureDescription = Features.Prettify_0051(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0080:
|
||||
featureDescription = Features.Prettify_0080(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0100:
|
||||
featureDescription = Features.Prettify_0100(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0101:
|
||||
featureDescription = Features.Prettify_0101(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0102:
|
||||
featureDescription = Features.Prettify_0102(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0103:
|
||||
featureDescription = Features.Prettify_0103(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0104:
|
||||
featureDescription = Features.Prettify_0104(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0105:
|
||||
featureDescription = Features.Prettify_0105(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0106:
|
||||
featureDescription = Features.Prettify_0106(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0107:
|
||||
featureDescription = Features.Prettify_0107(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0108:
|
||||
featureDescription = Features.Prettify_0108(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0109:
|
||||
featureDescription = Features.Prettify_0109(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x010A:
|
||||
featureDescription = Features.Prettify_010A(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x010B:
|
||||
featureDescription = Features.Prettify_010B(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x010C:
|
||||
featureDescription = Features.Prettify_010C(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x010D:
|
||||
featureDescription = Features.Prettify_010D(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x010E:
|
||||
featureDescription = Features.Prettify_010E(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0110:
|
||||
featureDescription = Features.Prettify_0110(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0113:
|
||||
featureDescription = Features.Prettify_0113(desc.Data);
|
||||
|
||||
break;
|
||||
case 0x0142:
|
||||
featureDescription = Features.Prettify_0142(desc.Data);
|
||||
|
||||
break;
|
||||
default:
|
||||
featureDescription = "Unknown feature";
|
||||
|
||||
break;
|
||||
}
|
||||
featureDescription = desc.Code switch
|
||||
{
|
||||
0x0000 => Features.Prettify_0000(desc.Data),
|
||||
0x0001 => Features.Prettify_0001(desc.Data),
|
||||
0x0002 => Features.Prettify_0002(desc.Data),
|
||||
0x0003 => Features.Prettify_0003(desc.Data),
|
||||
0x0004 => Features.Prettify_0004(desc.Data),
|
||||
0x0010 => Features.Prettify_0010(desc.Data),
|
||||
0x001D => Features.Prettify_001D(desc.Data),
|
||||
0x001E => Features.Prettify_001E(desc.Data),
|
||||
0x001F => Features.Prettify_001F(desc.Data),
|
||||
0x0020 => Features.Prettify_0020(desc.Data),
|
||||
0x0021 => Features.Prettify_0021(desc.Data),
|
||||
0x0022 => Features.Prettify_0022(desc.Data),
|
||||
0x0023 => Features.Prettify_0023(desc.Data),
|
||||
0x0024 => Features.Prettify_0024(desc.Data),
|
||||
0x0025 => Features.Prettify_0025(desc.Data),
|
||||
0x0026 => Features.Prettify_0026(desc.Data),
|
||||
0x0027 => Features.Prettify_0027(desc.Data),
|
||||
0x0028 => Features.Prettify_0028(desc.Data),
|
||||
0x0029 => Features.Prettify_0029(desc.Data),
|
||||
0x002A => Features.Prettify_002A(desc.Data),
|
||||
0x002B => Features.Prettify_002B(desc.Data),
|
||||
0x002C => Features.Prettify_002C(desc.Data),
|
||||
0x002D => Features.Prettify_002D(desc.Data),
|
||||
0x002E => Features.Prettify_002E(desc.Data),
|
||||
0x002F => Features.Prettify_002F(desc.Data),
|
||||
0x0030 => Features.Prettify_0030(desc.Data),
|
||||
0x0031 => Features.Prettify_0031(desc.Data),
|
||||
0x0032 => Features.Prettify_0032(desc.Data),
|
||||
0x0033 => Features.Prettify_0033(desc.Data),
|
||||
0x0035 => Features.Prettify_0035(desc.Data),
|
||||
0x0037 => Features.Prettify_0037(desc.Data),
|
||||
0x0038 => Features.Prettify_0038(desc.Data),
|
||||
0x003A => Features.Prettify_003A(desc.Data),
|
||||
0x003B => Features.Prettify_003B(desc.Data),
|
||||
0x0040 => Features.Prettify_0040(desc.Data),
|
||||
0x0041 => Features.Prettify_0041(desc.Data),
|
||||
0x0042 => Features.Prettify_0042(desc.Data),
|
||||
0x0050 => Features.Prettify_0050(desc.Data),
|
||||
0x0051 => Features.Prettify_0051(desc.Data),
|
||||
0x0080 => Features.Prettify_0080(desc.Data),
|
||||
0x0100 => Features.Prettify_0100(desc.Data),
|
||||
0x0101 => Features.Prettify_0101(desc.Data),
|
||||
0x0102 => Features.Prettify_0102(desc.Data),
|
||||
0x0103 => Features.Prettify_0103(desc.Data),
|
||||
0x0104 => Features.Prettify_0104(desc.Data),
|
||||
0x0105 => Features.Prettify_0105(desc.Data),
|
||||
0x0106 => Features.Prettify_0106(desc.Data),
|
||||
0x0107 => Features.Prettify_0107(desc.Data),
|
||||
0x0108 => Features.Prettify_0108(desc.Data),
|
||||
0x0109 => Features.Prettify_0109(desc.Data),
|
||||
0x010A => Features.Prettify_010A(desc.Data),
|
||||
0x010B => Features.Prettify_010B(desc.Data),
|
||||
0x010C => Features.Prettify_010C(desc.Data),
|
||||
0x010D => Features.Prettify_010D(desc.Data),
|
||||
0x010E => Features.Prettify_010E(desc.Data),
|
||||
0x0110 => Features.Prettify_0110(desc.Data),
|
||||
0x0113 => Features.Prettify_0113(desc.Data),
|
||||
0x0142 => Features.Prettify_0142(desc.Data),
|
||||
_ => "Unknown feature"
|
||||
};
|
||||
|
||||
MmcFeatures.Add(new ScsiPageModel
|
||||
{
|
||||
|
||||
@@ -419,21 +419,12 @@ public sealed class ImageVerifyViewModel : ViewModelBase
|
||||
{
|
||||
ImageResultVisible = true;
|
||||
|
||||
switch(discCheckStatus)
|
||||
{
|
||||
case true:
|
||||
ImageResultText = "Disc image checksums are correct";
|
||||
|
||||
break;
|
||||
case false:
|
||||
ImageResultText = "Disc image checksums are incorrect";
|
||||
|
||||
break;
|
||||
case null:
|
||||
ImageResultText = "Disc image does not contain checksums";
|
||||
|
||||
break;
|
||||
}
|
||||
ImageResultText = discCheckStatus switch
|
||||
{
|
||||
true => "Disc image checksums are correct",
|
||||
false => "Disc image checksums are incorrect",
|
||||
null => "Disc image does not contain checksums"
|
||||
};
|
||||
});
|
||||
|
||||
AaruConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds);
|
||||
@@ -493,8 +484,8 @@ public sealed class ImageVerifyViewModel : ViewModelBase
|
||||
{
|
||||
Progress2Value = all / 512d;
|
||||
|
||||
Progress2Text =
|
||||
$"Checking sector {all} of {_inputFormat.Info.Sectors}, on track {currentTrack.Sequence}";
|
||||
Progress2Text = $"Checking sector {all} of {_inputFormat.Info.Sectors}, on track {
|
||||
currentTrack.Sequence}";
|
||||
});
|
||||
|
||||
List<ulong> tempFailingLbas;
|
||||
|
||||
@@ -450,25 +450,13 @@ public sealed class MediaScanViewModel : ViewModelBase
|
||||
case 0x0020:
|
||||
case 0x0021:
|
||||
case 0x0022:
|
||||
switch(blocks)
|
||||
{
|
||||
case <= 360000:
|
||||
MaxX = 360000;
|
||||
|
||||
break;
|
||||
case <= 405000:
|
||||
MaxX = 405000;
|
||||
|
||||
break;
|
||||
case <= 445500:
|
||||
MaxX = 445500;
|
||||
|
||||
break;
|
||||
default:
|
||||
MaxX = blocks;
|
||||
|
||||
break;
|
||||
}
|
||||
MaxX = blocks switch
|
||||
{
|
||||
<= 360000 => 360000,
|
||||
<= 405000 => 405000,
|
||||
<= 445500 => 445500,
|
||||
_ => blocks
|
||||
};
|
||||
|
||||
StepsX = MaxX / 10;
|
||||
StepsY = 150 * 4;
|
||||
@@ -504,29 +492,14 @@ public sealed class MediaScanViewModel : ViewModelBase
|
||||
case 0x0042:
|
||||
case 0x0043:
|
||||
case 0x0040: // BD
|
||||
switch(blocks)
|
||||
{
|
||||
case <= 12219392:
|
||||
MaxX = 12219392;
|
||||
|
||||
break;
|
||||
case <= 24438784:
|
||||
MaxX = 24438784;
|
||||
|
||||
break;
|
||||
case <= 48878592:
|
||||
MaxX = 48878592;
|
||||
|
||||
break;
|
||||
case <= 62500864:
|
||||
MaxX = 62500864;
|
||||
|
||||
break;
|
||||
default:
|
||||
MaxX = blocks;
|
||||
|
||||
break;
|
||||
}
|
||||
MaxX = blocks switch
|
||||
{
|
||||
<= 12219392 => 12219392,
|
||||
<= 24438784 => 24438784,
|
||||
<= 48878592 => 48878592,
|
||||
<= 62500864 => 62500864,
|
||||
_ => blocks
|
||||
};
|
||||
|
||||
StepsX = MaxX / 10;
|
||||
StepsY = 4394.5;
|
||||
@@ -539,21 +512,12 @@ public sealed class MediaScanViewModel : ViewModelBase
|
||||
case 0x0053:
|
||||
case 0x0058:
|
||||
case 0x005A:
|
||||
switch(blocks)
|
||||
{
|
||||
case <= 7361599:
|
||||
MaxX = 7361599;
|
||||
|
||||
break;
|
||||
case <= 16305407:
|
||||
MaxX = 16305407;
|
||||
|
||||
break;
|
||||
default:
|
||||
MaxX = blocks;
|
||||
|
||||
break;
|
||||
}
|
||||
MaxX = blocks switch
|
||||
{
|
||||
<= 7361599 => 7361599,
|
||||
<= 16305407 => 16305407,
|
||||
_ => blocks
|
||||
};
|
||||
|
||||
StepsX = MaxX / 10;
|
||||
StepsY = 4394.5;
|
||||
|
||||
Reference in New Issue
Block a user