From be042e60a9951dba51dec021170ff753a8bdce34 Mon Sep 17 00:00:00 2001 From: MG messie Date: Thu, 4 Apr 2024 10:38:30 +0200 Subject: [PATCH] refact: Refactor BasicShape class and shapecomp.css*** --- .../PlgSchShapeComp/Code/BasicShape.cs | 19 ------------------- .../wwwroot/SchShapeComp/css/shapecomp.css | 2 +- .../SchShapeComp/css/shapecomp.min.css | 2 +- .../wwwroot/SchShapeComp/css/shapecomp.scss | 2 +- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/ScadaWeb/OpenPlugins/PlgSchShapeComp/Code/BasicShape.cs b/ScadaWeb/OpenPlugins/PlgSchShapeComp/Code/BasicShape.cs index 63f0e3353..1447c54d3 100644 --- a/ScadaWeb/OpenPlugins/PlgSchShapeComp/Code/BasicShape.cs +++ b/ScadaWeb/OpenPlugins/PlgSchShapeComp/Code/BasicShape.cs @@ -20,8 +20,6 @@ public BasicShape() CtrlCnlNum = 0; InCnlNumCustom = "NA (0)"; CtrlCnlNumCustom = "NA (0)"; - Width = 100; - Height = 130; } [DisplayName("Conditions"), Category(Categories.Behavior)] @@ -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; } - /// /// Get or set the input channel number /// @@ -73,8 +62,6 @@ public BasicShape() [DefaultValue(0)] public int CtrlCnlNum { get; set; } - - /// /// Get or set the control channel number custom /// @@ -82,7 +69,6 @@ public BasicShape() [Description("The output channel number associated with the component.")] public string CtrlCnlNumCustom { get; set; } - /// /// Get or set the action /// @@ -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"); @@ -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(); diff --git a/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.css b/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.css index e232207c8..ad4bc4976 100644 --- a/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.css +++ b/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.css @@ -6,7 +6,7 @@ .line { width: 100%; - height: 1%; + height: 100%; border-top: 2px solid red; } diff --git a/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.min.css b/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.min.css index fa14ffe7b..bba3d8a6d 100644 --- a/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.min.css +++ b/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.min.css @@ -6,7 +6,7 @@ .line { width: 100%; - height: 1%; + height: 100%; border-top: 2px solid red; } diff --git a/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.scss b/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.scss index 38e3d69db..184bc597e 100644 --- a/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.scss +++ b/ScadaWeb/OpenPlugins/PlgSchShapeComp/wwwroot/SchShapeComp/css/shapecomp.scss @@ -6,7 +6,7 @@ .line { width: 100%; - height: 1%; + height: 100%; border-top: 2px solid red; }