184 lines
8.5 KiB
Plaintext
184 lines
8.5 KiB
Plaintext
@using static WebWindowComplex.Json.WindowConst
|
|
|
|
<div class="card shadow-sm rounded mb-4">
|
|
<div class="card-header bg-light bg-opacity-25">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div class="px-4">
|
|
<h5>@(descParentSplit()) - Split</h5>
|
|
</div>
|
|
<div class="col-md-3">
|
|
@if (!User)
|
|
{
|
|
@if ((CurrSplit.nSplitQtyVert == 1 && CurrSplit.nSplitQtyHoriz == 0) || (CurrSplit.nSplitQtyVert == 0 && CurrSplit.nSplitQtyHoriz == 1))
|
|
{
|
|
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree()">Swap Aree</button>
|
|
}
|
|
}
|
|
</div>
|
|
<div class="col-md-3">
|
|
@if (!User)
|
|
{
|
|
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea()">Remove split</button>
|
|
}
|
|
</div>
|
|
<div class="px-2">
|
|
<button class="btn btn-close" @onclick="ReqClose"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body py-2">
|
|
<div class="d-flex justify-content-end align-items-center">
|
|
<div class="col-md-3">
|
|
<select class="form-select" @bind="@MeasureType">
|
|
<option value="@MeasureTypes.ABSOLUTE">Absolute (mm)</option>
|
|
<option value="@MeasureTypes.PROPORTIONAL">Proportional (*)</option>
|
|
<option value="@MeasureTypes.PERCENTAGE">Percentage (%)</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select class="form-select">
|
|
<option value="1">Glass</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row py-2">
|
|
<div class="col-md-12 col-lg-12">
|
|
@if (User)
|
|
{
|
|
<div class="input-group mb-2">
|
|
<span class="input-group-text">Shape</span>
|
|
<input type="text" readonly class="form-control" value="@(CurrSplit.SplitShapeList.FirstOrDefault(x => x.Id == SplitShapeIndex))">
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="d-flex justify-content-start align-items-center" style="min-height: 2.5rem;">
|
|
<h6 class="fw-bold">Shape</h6>
|
|
</div>
|
|
<div class="row align-items-center">
|
|
@foreach (var i in CurrSplit.SplitShapeList)
|
|
{
|
|
@* <div class="col-auto">
|
|
<button type="button" @onclick="() => SelShapeSplit(i.Id)"
|
|
class="btn mx-1 px-1 py-1"
|
|
style="border-width: @(SplitShapeIndex == i.Id ? 4 : 1)px;
|
|
border-style: solid;
|
|
border-color: @(SplitShapeIndex == i.Id ? "#0d6efd" : "#dee2e6");">
|
|
<img class="img-fluid" src="@GetImageShapePath(i.Name)" title="@(i.Name)" width="40" />
|
|
</button>
|
|
</div> *@
|
|
<div class="col-auto">
|
|
<button type="button" class="btn-icone @ButtonShapeCss(i.Id) mx-1 px-1 py-1" @onclick="() => SelShapeSplit(i.Id)">
|
|
<img class="img-fluid" src="@GetImageShapePath(i.Name)" title="@(i.Name)" width="40" />
|
|
</button>
|
|
</div>
|
|
}
|
|
<div class="col-auto">
|
|
@if (CurrSplit.SelSplitShape == Json.WindowConst.SplitShapes.GRID)
|
|
{
|
|
<div class="px-1">
|
|
@if (User)
|
|
{
|
|
<input class="form-check-input ml-auto me-1" disabled="disabled" type="checkbox" name="SplitStartVert" checked="@CurrSplit.bSplitStartVert">
|
|
<label class="form-check-label fs-6 text-dark">StartVert</label>
|
|
}
|
|
else
|
|
{
|
|
<input class="form-check-input ml-auto me-1" type="checkbox" name="SplitStartVert" checked="@CurrSplit.bSplitStartVert" @oninput="(ChangeEventArgs e) => ChangeStartVert(e)">
|
|
<label class="form-check-label fs-6 text-dark">StartVert</label>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
@if (CurrSplit.nSplitQtyHoriz > 0)
|
|
{
|
|
<div class="d-flex justify-content-start align-items-center" style="min-height: 2.5rem;">
|
|
<h6 class="fw-bold">Horizontal split</h6>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="input-group mb-2">
|
|
<span class="input-group-text">QtyHoriz</span>
|
|
@if (User)
|
|
{
|
|
<input type="number" readonly class="form-control" value="@SplitQtyHoriz">
|
|
}
|
|
else
|
|
{
|
|
<input type="number" class="form-control" @bind="@SplitQtyHoriz">
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
@for (int i = 0; i < CurrSplit.SplitHorizList.Count; i++)
|
|
{
|
|
<EditSplitDimensions CurrRec="CurrSplit.SplitHorizList[i]"
|
|
Name="Height"
|
|
Index="i"
|
|
EC_Update="UpdateDimension">
|
|
</EditSplitDimensions>
|
|
}
|
|
</div>
|
|
<div class="row">
|
|
@foreach (var element in horizList())
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
@if (CurrSplit.nSplitQtyVert > 0 && CurrSplit.nSplitQtyHoriz > 0)
|
|
{
|
|
<hr/>
|
|
}
|
|
@if (CurrSplit.nSplitQtyVert > 0)
|
|
{
|
|
<div class="row">
|
|
<div class="d-flex justify-content-start align-items-center" style="min-height: 2.5rem;">
|
|
<h6 class="fw-bold">Vertical split</h6>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 col-lg-6">
|
|
<div class="input-group mb-2">
|
|
<span class="input-group-text">QtyVert</span>
|
|
@if (User)
|
|
{
|
|
<input type="number" readonly class="form-control" value="@SplitQtyVert">
|
|
}
|
|
else
|
|
{
|
|
<input type="number" class="form-control" @bind="@SplitQtyVert">
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
@for (int i = 0; i < CurrSplit.SplitVertList.Count; i++)
|
|
{
|
|
<EditSplitDimensions CurrRec="CurrSplit.SplitVertList[i]"
|
|
Name="Width"
|
|
Index="i"
|
|
EC_Update="UpdateDimension">
|
|
</EditSplitDimensions>
|
|
}
|
|
</div>
|
|
<div class="row">
|
|
@foreach (var element in vertList())
|
|
{
|
|
<div class="col-md-12 col-lg-6">
|
|
<EditSplitElement CurrRec="element" EC_Update="UpdateElement"></EditSplitElement>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|