Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact: Refactor BasicShape class and shapecomp.css*** #51

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading