Files
marechai/cicm_web/Views/Machine/View.cshtml

1057 lines
33 KiB
Plaintext
Raw Normal View History

2018-04-14 07:13:11 +01:00
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Index page (and news)
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
ViewData["Title"] = "Computer";
}
@using System.IO
@model Machine
2018-04-14 07:13:11 +01:00
<p align=center>
@if(Model.Company.LastLogo != null && File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/logos", Model.Company.LastLogo.Guid + ".svg")))
{
<picture>
<source type="image/svg+xml"
srcset="/assets/logos/@(Model.Company.LastLogo.Guid).svg">
<source type="image/webp"
srcset="/assets/logos/webp/1x/@(Model.Company.LastLogo.Guid).webp,
/assets/logos/webp/1x/@(Model.Company.LastLogo.Guid).webp 2x,
/assets/logos/webp/1x/@(Model.Company.LastLogo.Guid).webp 3x">
<img srcset="/assets/logos/png/1x/@(Model.Company.LastLogo.Guid).png,
/assets/logos/png/1x/@(Model.Company.LastLogo.Guid).png 2x,
/assets/logos/png/1x/@(Model.Company.LastLogo.Guid).webp 3x"
src="/assets/logos/png/1x@(Model.Company.LastLogo.Guid).png")
alt=""
height="auto"
width="auto"
style="max-height: 256px; max-width: 256px" />
</picture>
}
</p>
2018-04-14 07:13:11 +01:00
@if(Model.Year == 1000)
{
<b>
<div style="text-align: center;">PROTOTYPE</div>
2018-04-14 07:13:11 +01:00
</b>
}
<b>
<a asp-controller=Company
asp-action=View
asp-route-id=@Model.Company.Id>
@Model.Company.Name</a> @Model.Model</b>
<table width=100%>
2018-04-14 07:13:11 +01:00
@if(Model.Year != 1000)
{
<tr>
<th scope=row
width="37%">
<div align=right>
Year
</div>
</th>
<td width="63%">
<a asp-controller="Computer"
asp-action="ByYear"
asp-route-id="@Model.Year">
@Model.Year</a>
2018-04-14 07:13:11 +01:00
</td>
</tr>
}
<tr>
<th scope=row>
<div align=right>
Primary processor
</div>
</th>
@if(Model.Cpu1 != null)
{
<td>
@if(Model.Mhz1 > 0) { @(Model.Cpu1.GprSize > 0 ? $"{Model.Cpu1.Name} @ {Model.Mhz1}Mhz ({Model.Cpu1.GprSize} bits)" : $"{Model.Cpu1.Name} @ {Model.Mhz1}Mhz") }
else
{ @($"{Model.Cpu1.Name}") }
<a aria-controls="cpuInfo"
aria-expanded="false"
class="btn btn-link"
data-toggle="collapse"
href="#cpuInfo">
+info
</a>
<div class="collapse"
id="cpuInfo">
<div class="card card-body">
<table>
@if(Model.Cpu1.ModelCode != null && Model.Cpu1.ModelCode != Model.Cpu1.Name)
2018-04-14 07:13:11 +01:00
{
<tr>
<td>Model</td>
<td>@Model.Cpu1.ModelCode</td>
</tr>
}
<tr>
<td>Manufacturer</td>
<td>
<a asp-controller=Company
asp-action=View
asp-route-id=@Model.Cpu1.Company.Id>
@Model.Cpu1.Company.Name</a>
</td>
</tr>
@if(Model.Cpu1.Introduced != DateTime.MinValue)
{
<tr>
<td>Introduction date</td>
<td>@($"{Model.Cpu1.Introduced:yyyy}")</td>
</tr>
}
@if(Model.Cpu1.InstructionSet != null)
{
<tr>
<td>Instruction set</td>
<td>@Model.Cpu1.InstructionSet.Name</td>
</tr>
}
@if(Model.Cpu1.Speed > 0)
{
<tr>
<td>Nominal speed</td>
<td>@Model.Cpu1.Speed MHz</td>
</tr>
}
@if(Model.Cpu1.Gpr > 0 || Model.Cpu1.Fpr > 0 || Model.Cpu1.Simd > 0)
{
<tr>
<td>Registers</td>
<td>
<table>
@if(Model.Cpu1.Gpr > 0)
{
<tr>
<td>
@Model.Cpu1.Gpr general purpose registers of @Model.Cpu1.GprSize bits
@if(Model.Cpu1.FprSize > 0 && Model.Cpu1.Fpr == 0) { @($", that can be used as floating point registers of {Model.Cpu1.FprSize}") }
@if(Model.Cpu1.SimdSize > 0 && Model.Cpu1.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu1.FprSize}") }
</td>
</tr>
}
@if(Model.Cpu1.Fpr > 0)
{
<tr>
<td>
@Model.Cpu1.Fpr floating-point registers of @Model.Cpu1.FprSize bits
@if(Model.Cpu1.SimdSize > 0 && Model.Cpu1.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu1.FprSize}") }
</td>
</tr>
}
@if(Model.Cpu1.Simd > 0)
{
<tr>
<td>
@Model.Cpu1.Simd <abbr title="Single instruction, multiple data">SIMD</abbr>registers of @Model.Cpu1.SimdSize bits
</td>
</tr>
}
</table>
</td>
</tr>
}
@if(Model.Cpu1.Cores > 1)
{
<tr>
<td>Multi-core</td>
<td>@Model.Cpu1.Cores cores</td>
</tr>
}
@if(Model.Cpu1.Cores > 1)
{
<tr>
<td>
<abbr title="Simultanoeus multithreading">SMT</abbr>
</td>
<td>
@Model.Cpu1.ThreadsPerCore threads
@if(Model.Cpu1.Cores > 1) { @(" per core") }
</td>
</tr>
}
@if(Model.Cpu1.DataBus > 0 || Model.Cpu1.AddressBus > 0)
{
<tr>
<td>Bus</td>
<td>
<table>
@if(Model.Cpu1.DataBus > 0)
{
<tr>
<td>
@Model.Cpu1.DataBus-bit data
</td>
</tr>
}
@if(Model.Cpu1.AddressBus > 0)
{
<tr>
<td>
@Model.Cpu1.AddressBus-bit address
</td>
</tr>
}
</table>
</td>
</tr>
}
@if(Model.Cpu1.L1Instruction > 0 || Model.Cpu1.L1Data > 0 || Model.Cpu1.L2 > 0 || Model.Cpu1.L2 > 0)
{
<tr>
<td>Cache</td>
<td>
<table>
@if(Model.Cpu1.L1Instruction > 0)
{
<tr>
<td>
@(Model.Cpu1.L1Data < 0 ? $"{Model.Cpu1.L1Instruction}KiB combined instruction-data L1" : $"{Model.Cpu1.L1Instruction}KiB instruction L1")
</td>
</tr>
}
@if(Model.Cpu1.L1Data > 0)
{
<tr>
<td>
@($"{Model.Cpu1.L1Data}KiB data L1")
</td>
</tr>
}
@if(Model.Cpu1.L2 > 0)
{
<tr>
<td>
@($"{Model.Cpu1.L2}KiB L2")
</td>
</tr>
}
@if(Model.Cpu1.L3 > 0)
{
<tr>
<td>
@($"{Model.Cpu1.L3}KiB L3")
</td>
</tr>
}
</table>
</td>
</tr>
}
@if(Model.Cpu1.Package != null)
{
<tr>
<td>Package</td>
<td>@Model.Cpu1.Package</td>
</tr>
}
@if(Model.Cpu1.Process != null || Model.Cpu1.ProcessNm > 0)
{
<tr>
<td>Manufacturing process</td>
<td>
@if(Model.Cpu1.Process != null && Model.Cpu1.ProcessNm > 0)
2018-04-14 07:13:11 +01:00
{
@Model.Cpu1.Process
@("@")
@(Model.Cpu1.ProcessNm > 100 ? $"{Model.Cpu1.ProcessNm / 100}µm" : $"{Model.Cpu1.ProcessNm}nm")
2018-04-14 07:13:11 +01:00
}
else if(Model.Cpu1.ProcessNm > 0) { @(Model.Cpu1.ProcessNm > 100 ? $"{Model.Cpu1.ProcessNm / 100}µm" : $"{Model.Cpu1.ProcessNm}nm") }
2018-04-14 07:13:11 +01:00
else
{ @Model.Cpu1.Process }
</td>
</tr>
2018-04-14 07:13:11 +01:00
}
@if(Model.Cpu1.DieSize > 0)
{
<tr>
<td>Die size</td>
<td>@Model.Cpu1.DieSize mm&sup2;</td>
</tr>
}
@if(Model.Cpu1.Transistors > 0)
{
<tr>
<td>Transistors</td>
<td>@Model.Cpu1.Transistors</td>
</tr>
}
</table>
</div>
</div>
</td>
}
else
{
<td>Unknown data</td>
}
2018-04-14 07:13:11 +01:00
</tr>
@if(Model.Cpu2 != null)
{
<tr>
<th scope=row>
<div align=right>
Secondary processor
</div>
</th>
<td>
@if(Model.Mhz1 > 0) { @(Model.Cpu2.GprSize > 0 ? $"{Model.Cpu2.Name} @ {Model.Mhz1}Mhz ({Model.Cpu2.GprSize} bits)" : $"{Model.Cpu2.Name} @ {Model.Mhz1}Mhz") }
else
{ @($"{Model.Cpu2.Name}") }
<a aria-controls="cpuInfo"
aria-expanded="false"
class="btn btn-link"
data-toggle="collapse"
href="#cpu2Info">
+info
</a>
<div class="collapse"
id="cpu2Info">
<div class="card card-body">
<table>
@if(Model.Cpu2.ModelCode != null && Model.Cpu2.ModelCode != Model.Cpu2.Name)
{
<tr>
<td>Model</td>
<td>@Model.Cpu2.ModelCode</td>
</tr>
}
<tr>
<td>Manufacturer</td>
<td>
<a asp-controller=Company
asp-action=View
asp-route-id=@Model.Cpu2.Company.Id>
@Model.Cpu2.Company.Name</a>
</td>
</tr>
@if(Model.Cpu2.Introduced != DateTime.MinValue)
{
<tr>
<td>Introduction date</td>
<td>@($"{Model.Cpu2.Introduced:yyyy}")</td>
</tr>
}
@if(Model.Cpu2.InstructionSet != null)
{
<tr>
<td>Instruction set</td>
<td>@Model.Cpu2.InstructionSet.Name</td>
</tr>
}
@if(Model.Cpu2.Speed > 0)
{
<tr>
<td>Nominal speed</td>
<td>@Model.Cpu2.Speed MHz</td>
</tr>
}
@if(Model.Cpu2.Gpr > 0 || Model.Cpu2.Fpr > 0 || Model.Cpu2.Simd > 0)
{
<tr>
<td>Registers</td>
<td>
<table>
@if(Model.Cpu2.Gpr > 0)
2018-04-14 07:13:11 +01:00
{
<tr>
<td>
@Model.Cpu2.Gpr general purpose registers of @Model.Cpu2.GprSize bits
@if(Model.Cpu2.FprSize > 0 && Model.Cpu2.Fpr == 0) { @($", that can be used as floating point registers of {Model.Cpu2.FprSize}") }
@if(Model.Cpu2.SimdSize > 0 && Model.Cpu2.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu2.FprSize}") }
</td>
</tr>
2018-04-14 07:13:11 +01:00
}
@if(Model.Cpu2.Fpr > 0)
2018-04-14 07:13:11 +01:00
{
<tr>
<td>
@Model.Cpu2.Fpr floating-point registers of @Model.Cpu2.FprSize bits
@if(Model.Cpu2.SimdSize > 0 && Model.Cpu2.Simd == 0) { @($", that can be used as SIMD registers of {Model.Cpu2.FprSize}") }
</td>
</tr>
2018-04-14 07:13:11 +01:00
}
@if(Model.Cpu2.Simd > 0)
{
<tr>
<td>
@Model.Cpu2.Simd <abbr title="Single instruction, multiple data">SIMD</abbr>registers of @Model.Cpu2.SimdSize bits
</td>
</tr>
}
</table>
</td>
</tr>
}
@if(Model.Cpu2.Cores > 1)
{
<tr>
<td>Multi-core</td>
<td>@Model.Cpu2.Cores cores</td>
</tr>
}
@if(Model.Cpu2.Cores > 1)
{
<tr>
<td>
<abbr title="Simultanoeus multithreading">SMT</abbr>
</td>
<td>
@Model.Cpu2.ThreadsPerCore threads
@if(Model.Cpu2.Cores > 1) { @(" per core") }
</td>
</tr>
}
@if(Model.Cpu2.DataBus > 0 || Model.Cpu2.AddressBus > 0)
{
<tr>
<td>Bus</td>
<td>
<table>
@if(Model.Cpu2.DataBus > 0)
{
<tr>
<td>
@Model.Cpu2.DataBus-bit data
</td>
</tr>
}
@if(Model.Cpu2.AddressBus > 0)
{
<tr>
<td>
@Model.Cpu2.AddressBus-bit address
</td>
</tr>
}
</table>
</td>
</tr>
}
@if(Model.Cpu2.L1Instruction > 0 || Model.Cpu2.L1Data > 0 || Model.Cpu2.L2 > 0 || Model.Cpu2.L2 > 0)
{
<tr>
<td>Cache</td>
<td>
<table>
@if(Model.Cpu2.L1Instruction > 0)
{
<tr>
<td>
@(Model.Cpu2.L1Data < 0 ? $"{Model.Cpu2.L1Instruction}KiB combined instruction-data L1" : $"{Model.Cpu2.L1Instruction}KiB instruction L1")
</td>
</tr>
}
@if(Model.Cpu2.L1Data > 0)
{
<tr>
<td>
@($"{Model.Cpu2.L1Data}KiB data L1")
</td>
</tr>
}
@if(Model.Cpu2.L2 > 0)
{
<tr>
<td>
@($"{Model.Cpu2.L2}KiB L2")
</td>
</tr>
}
@if(Model.Cpu2.L3 > 0)
{
<tr>
<td>
@($"{Model.Cpu2.L3}KiB L3")
</td>
</tr>
}
</table>
</td>
</tr>
}
@if(Model.Cpu2.Package != null)
{
<tr>
<td>Package</td>
<td>@Model.Cpu2.Package</td>
</tr>
}
@if(Model.Cpu2.Process != null || Model.Cpu2.ProcessNm > 0)
{
<tr>
<td>Manufacturing process</td>
<td>
@if(Model.Cpu2.Process != null && Model.Cpu2.ProcessNm > 0)
2018-04-14 07:13:11 +01:00
{
@Model.Cpu2.Process
@("@")
@(Model.Cpu2.ProcessNm > 100 ? $"{Model.Cpu2.ProcessNm / 100}µm" : $"{Model.Cpu2.ProcessNm}nm")
2018-04-14 07:13:11 +01:00
}
else if(Model.Cpu2.ProcessNm > 0) { @(Model.Cpu2.ProcessNm > 100 ? $"{Model.Cpu2.ProcessNm / 100}µm" : $"{Model.Cpu2.ProcessNm}nm") }
else
{ @Model.Cpu2.Process }
</td>
</tr>
}
@if(Model.Cpu2.DieSize > 0)
{
<tr>
<td>Die size</td>
<td>@Model.Cpu2.DieSize mm&sup2;</td>
</tr>
}
@if(Model.Cpu2.Transistors > 0)
{
<tr>
<td>Transistors</td>
<td>@Model.Cpu2.Transistors</td>
</tr>
}
</table>
</div>
</div>
</td>
2018-04-14 07:13:11 +01:00
</tr>
}
<tr>
<th scope=row>
<div align=right>
Base RAM memory
</div>
</th>
@if(Model.Ram > 1024)
{
if(Model.Ram > 1048576)
{
<td>@($"{Model.Ram / 1048576}") Gbytes</td>
}
else
{
<td>@($"{Model.Ram / 1024}") Mbytes</td>
}
}
else
{
if(Model.Ram == 0)
{
<td>Unknown data</td>
}
else
{
<td>@Model.Ram Kbytes</td>
}
}
</tr>
<tr>
<th scope=row>
<div align=right>
ROM
</div>
</th>
@if(Model.Rom > 1024)
{
if(Model.Rom > 1048576)
{
<td>@($"{Model.Rom / 1048576}") Gbytes</td>
}
else
{
<td>@($"{Model.Rom / 1024}") Mbytes</td>
}
}
else
{
if(Model.Rom == 0)
{
<td>Unknown data</td>
}
else
{
<td>@Model.Rom Kbytes</td>
}
}
</tr>
2018-04-27 15:29:53 +01:00
@if(Model.Gpu == null || Model.Gpu != null && Model.Gpu.Id != -1)
{
<tr>
<th scope=row>
<div align=right>
Graphics processor
</div>
</th>
2018-04-14 07:13:11 +01:00
2018-04-27 15:29:53 +01:00
@if(Model.Gpu != null)
2018-04-14 07:13:11 +01:00
{
2018-04-27 15:29:53 +01:00
if(Model.Gpu.Id == -2)
{
<td>
Framebuffer
<a aria-controls="gpuInfo"
aria-expanded="false"
class="btn btn-link"
data-toggle="collapse"
href="#gpuInfo">
+info
</a>
<div class="collapse"
id="gpuInfo">
<div class="card card-body">
This computer directly draws pixels from software to a memory region that's converted to video output by a <abbr title="Digital to Analog Converter">DAC</abbr> or similar without using any specific graphics processing unit.
</div>
</div>
</td>
}
else
{
<td>
@($"{Model.Gpu.Name}")
<a aria-controls="gpuInfo"
aria-expanded="false"
class="btn btn-link"
data-toggle="collapse"
href="#gpuInfo">
+info
</a>
<div class="collapse"
id="gpuInfo">
<div class="card card-body">
<table>
@if(Model.Gpu.ModelCode != null && Model.Gpu.ModelCode != Model.Gpu.Name)
{
<tr>
<td>Model</td>
<td>@Model.Gpu.ModelCode</td>
</tr>
}
<tr>
<td>Manufacturer</td>
<td>
<a asp-controller=Company
asp-action=View
asp-route-id=@Model.Gpu.Company.Id>
@Model.Gpu.Company.Name</a>
</td>
</tr>
@if(Model.Gpu.Introduced != DateTime.MinValue)
{
<tr>
<td>Introduction date</td>
<td>@($"{Model.Gpu.Introduced:yyyy}")</td>
</tr>
}
@if(Model.Gpu.Package != null)
{
<tr>
<td>Package</td>
<td>@Model.Gpu.Package</td>
</tr>
}
@if(Model.Gpu.Process != null || Model.Gpu.ProcessNm > 0)
{
<tr>
<td>Manufacturing process</td>
<td>
@if(Model.Gpu.Process != null && Model.Gpu.ProcessNm > 0)
{
@Model.Gpu.Process
@("@")
@(Model.Gpu.ProcessNm > 100 ? $"{Model.Gpu.ProcessNm / 100}µm" : $"{Model.Gpu.ProcessNm}nm")
}
else if(Model.Gpu.ProcessNm > 0) { @(Model.Gpu.ProcessNm > 100 ? $"{Model.Gpu.ProcessNm / 100}µm" : $"{Model.Gpu.ProcessNm}nm") }
else
{ @Model.Gpu.Process }
</td>
</tr>
}
@if(Model.Gpu.DieSize > 0)
{
<tr>
<td>Die size</td>
<td>@Model.Gpu.DieSize mm&sup2;</td>
</tr>
}
@if(Model.Gpu.Transistors > 0)
{
<tr>
<td>Transistors</td>
<td>@Model.Gpu.Transistors</td>
</tr>
}
</table>
</div>
</div>
</td>
}
2018-04-14 07:13:11 +01:00
}
else
{
<td>Unknown data</td>
}
2018-04-27 15:29:53 +01:00
</tr>
}
2018-04-14 07:13:11 +01:00
<tr>
<th scope=row>
<div align=right>
Video memory
</div>
</th>
@if(Model.Vram > 1024)
{
if(Model.Vram > 1048576)
{
<td>@($"{Model.Vram / 1048576}") Gbytes</td>
}
else
{
<td>@($"{Model.Vram / 1024}") Mbytes</td>
}
}
else
{
if(Model.Vram == 0)
{
<td>Unknown data</td>
}
else
{
<td>@Model.Vram Kbytes</td>
}
}
</tr>
<tr>
<th scope=row>
<div align=right>
Video resolution
</div>
</th>
@if(Model.Resolution != "???")
{
<td>@Model.Resolution</td>
}
else
{
<td>Unknown data</td>
}
</tr>
<tr>
<th scope=row>
<div align=right>
Colors
</div>
</th>
@if(Model.Colors > 0)
{
<td>@Model.Colors</td>
}
else
{
<td>Unknown data</td>
}
</tr>
<tr>
<th scope=row>
<div align=right>
Sound processor
</div>
</th>
2018-04-15 17:51:07 +01:00
@if(Model.SoundSynth.Id > 1)
2018-04-14 07:13:11 +01:00
{
2018-04-15 17:51:07 +01:00
if(Model.SoundSynth.Id > 2)
2018-04-14 07:13:11 +01:00
{
if(Model.SoundChannels > 0)
{
2018-04-15 17:51:07 +01:00
<td>@Model.SoundSynth.Name (@Model.SoundChannels channels)</td>
2018-04-14 07:13:11 +01:00
}
else
{
2018-04-15 17:51:07 +01:00
<td>@Model.SoundSynth.Name</td>
2018-04-14 07:13:11 +01:00
}
}
else
{
<td>Unknown data</td>
}
}
else
{ <td>None</td> }
</tr>
<tr>
<th scope=row>
<div align=right>
Music synthetizer
</div>
</th>
2018-04-15 17:51:07 +01:00
@if(Model.MusicSynth.Id > 1)
2018-04-14 07:13:11 +01:00
{
2018-04-15 17:51:07 +01:00
if(Model.MusicSynth.Id > 2)
2018-04-14 07:13:11 +01:00
{
if(Model.MusicChannels > 0)
{
2018-04-15 17:51:07 +01:00
<td>@Model.MusicSynth.Name (@Model.MusicChannels channels)</td>
2018-04-14 07:13:11 +01:00
}
else
{
2018-04-15 17:51:07 +01:00
<td>@Model.MusicSynth.Name</td>
2018-04-14 07:13:11 +01:00
}
}
else
{
<td>Unknown data</td>
}
}
else
{ <td>None</td> }
</tr>
@if(Model.Hdd1 != null && Model.Hdd1.Id > 0 && Model.Hdd1.Id != 30)
{
<tr>
<th scope=row>
<div align=right>
Disk interfaces
</div>
</th>
<td>
@Model.Hdd1.Description
@if(Model.Hdd2 != null && Model.Hdd2.Id > 0 && Model.Hdd2.Id != 30)
{
<br>
@Model.Hdd2.Description
}
@if(Model.Hdd3 != null && Model.Hdd3.Id > 0 && Model.Hdd3.Id != 30)
{
<br>
@Model.Hdd3.Description
}
</td>
</tr>
}
@if(Model.Disk1 != null)
{
<tr>
<th scope=row>
<div align=right>
Primary disk
</div>
</th>
@if(Model.Disk1.Id != 30)
{
int cap1 = int.Parse(Model.Cap1);
if(Model.Disk1.Id != 8)
{
if(Model.Disk1.Id != 6)
{
string cap1Bytes = cap1 > 1024 ? (cap1 > 1048576 ? $"{cap1 / 1048576} GBytes" : $"{cap1 / 1024} MBytes") : (cap1 > 0 ? $"{cap1} Kbytes" : "Unknown capacity");
if(Model.Disk1.Id != 10)
{
if(Model.Disk1.Id != 15)
{
if(Model.Disk1.Id != 16)
{
if(Model.Disk1.Id != 36)
{
if(Model.Disk1.Id != 22)
{
if(Model.Disk1.Id != 23)
{
if(Model.Disk1.Id != 39)
{
if(Model.Disk1.Id != 31)
{
<td>@Model.Disk1.Description (@cap1Bytes)</td>
}
else
{
<td>Propietary (@cap1Bytes)</td>
}
}
else
{
<td>Digital tape (@cap1Bytes)</td>
}
}
else
{
<td>Punched card (@cap1Bytes)</td>
}
}
else
{
<td>Chip card (@cap1Bytes)</td>
}
}
else
{
<td>Magnetic card (@cap1Bytes)</td>
}
}
else
{
<td>Memory (@cap1Bytes)</td>
}
}
else
{
<td>Magneto-optical (@cap1Bytes)</td>
}
}
else
{
<td>Optical disk (@cap1Bytes)</td>
}
}
else
{
string cap1Bits = cap1 > 1000 ? (cap1 > 1000000 ? $"{cap1 / 1000000} GBits" : $"{cap1 / 1000} MBits") : (cap1 > 0 ? $"{cap1} KBits" : "Unknown capacity");
<td>Cartridge (@cap1Bits)</td>
}
}
else
{
<td>Standard audio cassette (@cap1 bps)</td>
}
}
else
{ <td>None</td> }
</tr>
}
@if(Model.Disk2 != null)
{
<tr>
<th scope=row>
<div align=right>
Secondary disk
</div>
</th>
@if(Model.Disk2.Id != 30)
{
int cap2 = int.Parse(Model.Cap2);
if(Model.Disk2.Id != 8)
{
if(Model.Disk2.Id != 6)
{
string cap2Bytes = cap2 > 1024 ? (cap2 > 1048576 ? $"{cap2 / 1048576} GBytes" : $"{cap2 / 1024} MBytes") : (cap2 > 0 ? $"{cap2} Kbytes" : "Unknown capacity");
if(Model.Disk2.Id != 10)
{
if(Model.Disk2.Id != 15)
{
if(Model.Disk2.Id != 16)
{
if(Model.Disk2.Id != 36)
{
if(Model.Disk2.Id != 22)
{
if(Model.Disk2.Id != 23)
{
if(Model.Disk2.Id != 39)
{
if(Model.Disk2.Id != 31)
{
<td>@Model.Disk2.Description (@cap2Bytes)</td>
}
else
{
<td>Propietary (@cap2Bytes)</td>
}
}
else
{
<td>Digital tape (@cap2Bytes)</td>
}
}
else
{
<td>Punched card (@cap2Bytes)</td>
}
}
else
{
<td>Chip card (@cap2Bytes)</td>
}
}
else
{
<td>Magnetic card (@cap2Bytes)</td>
}
}
else
{
<td>Memory (@cap2Bytes)</td>
}
}
else
{
<td>Magneto-optical (@cap2Bytes)</td>
}
}
else
{
<td>Optical disk (@cap2Bytes)</td>
}
}
else
{
string cap2Bits = cap2 > 1000 ? (cap2 > 1000000 ? $"{cap2 / 1000000} GBits" : $"{cap2 / 1000} MBits") : (cap2 > 0 ? $"{cap2} KBits" : "Unknown capacity");
<td>Cartridge (@cap2Bits)</td>
}
}
else
{
<td>Standard audio cassette (@cap2 bps)</td>
}
}
else
{ <td>None</td> }
</tr>
}
</table>
@if(File.Exists(System.IO.Path.Combine(ViewBag.WebRootPath, "assets/photos/computers", Model.Id + ".jpg")))
{
<img src="@System.IO.Path.Combine("/assets/photos/computers", Model.Id + ".jpg")"
alt="">
}