Skip to content

Commit

Permalink
Repair
Browse files Browse the repository at this point in the history
  • Loading branch information
Brano5 committed Jun 13, 2024
1 parent 33cc0c6 commit 13f2e8e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,6 @@
if (element == null)
return;

var overrideAttribute = AttributesHandler.GetRenderTemplateOverrideAttribute(element);

if (overrideAttribute != null)
{

if (!string.IsNullOrWhiteSpace(overrideAttribute.TemplateOverrideName))
{
var presentation = GetDisplayPresentationIfEmpty();
var pipeline = presentation.Split('-');

foreach (var item in pipeline) // apply pipeline
{
string fullPresentationType = overrideAttribute.TemplateOverrideName + GetDisplayPresentationIfEmpty() + "View";
var tcomponent = ComponentService.GetComponent(fullPresentationType);

if (tcomponent != null)
{
if (element is ITwinPrimitive)
{
@CreatePrimitiveComponent((ITwinPrimitive)element, tcomponent)
;
return;
}
if (element is ITwinObject)
{
@CreateComplexComponent((ITwinObject)element, tcomponent)
;
return;
}

}
}

}

}


// if it is primitive type, just generate
if (element is ITwinPrimitive)
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<div class="w-100 form-group">
<h1>Overrided My Simple Primitive Tag Display View</h1>
</div>
</div>

@code {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<div>
<p>------- "TAG Display"--------------</p>
</div>
<RenderableContentControl Presentation="Display" Context="@Entry.Plc.MAINC.OverridedSimpleTag" />
<RenderableContentControl Presentation="Display" Context="@Entry.Plc.MAINC.OverridedTag" />

<div>
<p>------- "TAG Control"--------------</p>
</div>
<RenderableContentControl Presentation="Control" Context="@Entry.Plc.MAINC.OverridedSimpleTag" />
<RenderableContentControl Presentation="Control" Context="@Entry.Plc.MAINC.OverridedTag" />

<div>
<p>------- "STRUCT Display"--------------</p>
Expand All @@ -25,9 +25,9 @@
<div>
<p>------- "INNER STRUCT Display"--------------</p>
</div>
<RenderableContentControl Presentation="Display" Context="@Entry.Plc.MAINC.InnerOverridedSimpleStruct" />
<RenderableContentControl Presentation="Display" Context="@Entry.Plc.MAINC.InnerOverridedStruct" />

<div>
<p>------- "INNER STRUCT Control"--------------</p>
</div>
<RenderableContentControl Presentation="Control" Context="@Entry.Plc.MAINC.InnerOverridedSimpleStruct" />
<RenderableContentControl Presentation="Control" Context="@Entry.Plc.MAINC.InnerOverridedStruct" />

0 comments on commit 13f2e8e

Please sign in to comment.