Skip to content

Commit

Permalink
Merge pull request #51 from ApitechFR/fix/shapecomp-line
Browse files Browse the repository at this point in the history
refact: Refactor BasicShape class and shapecomp.css***
  • Loading branch information
moukmessie committed Apr 4, 2024
2 parents cc3379e + be042e6 commit 835a328
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
19 changes: 0 additions & 19 deletions ScadaWeb/OpenPlugins/PlgSchShapeComp/Code/BasicShape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public BasicShape()
CtrlCnlNum = 0;
InCnlNumCustom = "NA (0)";
CtrlCnlNumCustom = "NA (0)";
Width = 100;
Height = 130;
}

[DisplayName("Conditions"), Category(Categories.Behavior)]
Expand All @@ -34,20 +32,11 @@ public BasicShape()
[Description("The type of SVG shape.")]
public string ShapeType { get; set; }

[DisplayName("Width"), Category(Categories.Appearance)]
[Description("The Width of SVG shape.")]
public int Width { get; set; }

[DisplayName("Rotation"), Category(Categories.Appearance)]
[Description("The rotation angle of the SVG shape in degrees.")]
[DefaultValue(0)]
public int Rotation { get; set; }

[DisplayName("Height"), Category(Categories.Appearance)]
[Description("The Height of SVG shape.")]
[DefaultValue(130)]
public int Height { get; set; }

/// <summary>
/// Get or set the input channel number
/// </summary>
Expand All @@ -73,16 +62,13 @@ public BasicShape()
[DefaultValue(0)]
public int CtrlCnlNum { get; set; }



/// <summary>
/// Get or set the control channel number custom
/// </summary>
[DisplayName("Output channel"), Category(Categories.Data)]
[Description("The output channel number associated with the component.")]
public string CtrlCnlNumCustom { get; set; }


/// <summary>
/// Get or set the action
/// </summary>
Expand All @@ -98,8 +84,6 @@ public override void LoadFromXml(XmlNode xmlNode)
Rotation = xmlNode.GetChildAsInt("Rotation");
InCnlNum = xmlNode.GetChildAsInt("InCnlNum");
CtrlCnlNum = xmlNode.GetChildAsInt("CtrlCnlNum");
Width = xmlNode.GetChildAsInt("Width");
Height = xmlNode.GetChildAsInt("Height");
InCnlNumCustom = xmlNode.GetChildAsString("InCnlNumCustom");
CtrlCnlNumCustom = xmlNode.GetChildAsString("CtrlCnlNumCustom");
XmlNode conditionsNode = xmlNode.SelectSingleNode("Conditions");
Expand Down Expand Up @@ -131,14 +115,11 @@ public override void SaveToXml(XmlElement xmlElem)
xmlElem.AppendElem("ShapeType", ShapeType);
xmlElem.AppendElem("InCnlNum", InCnlNum);
xmlElem.AppendElem("CtrlCnlNum", CtrlCnlNum);
xmlElem.AppendElem("Width", Width);
xmlElem.AppendElem("Height", Height);
xmlElem.AppendElem("InCnlNumCustom", InCnlNumCustom);
xmlElem.AppendElem("CtrlCnlNumCustom", CtrlCnlNumCustom);
xmlElem.AppendElem("Action", Action.ToString());
}


public override ComponentBase Clone()
{
BasicShape clonedComponent = (BasicShape)base.Clone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

.line {
width: 100%;
height: 1%;
height: 100%;
border-top: 2px solid red;
}

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

.line {
width: 100%;
height: 1%;
height: 100%;
border-top: 2px solid red;
}

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

.line {
width: 100%;
height: 1%;
height: 100%;
border-top: 2px solid red;
}

Expand Down

0 comments on commit 835a328

Please sign in to comment.