From c5d0adfc7b4504d7f6a1c90a532ce5592d6c0838 Mon Sep 17 00:00:00 2001
From: Anton Kudryashov <qubabox@mail.ru>
Date: Fri, 30 Sep 2016 02:32:00 +0300
Subject: [PATCH] - minor changes - iList public using

---
 MES_Wind/frmMain.cs            | 11 +++--------
 WindStressPRM/WindStressPRM.cs | 14 ++++++++------
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/MES_Wind/frmMain.cs b/MES_Wind/frmMain.cs
index 5432ae0..e28a8f3 100644
--- a/MES_Wind/frmMain.cs
+++ b/MES_Wind/frmMain.cs
@@ -19,13 +19,9 @@ namespace MES_Wind
     {
         [Export("Shell", typeof(ContainerControl))]
         private static ContainerControl Shell;
-        #region "Control variables"
-         double distThreshold = 500;
-        #endregion
 
         public frmMain()
         {
-
             InitializeComponent();
             if (DesignMode) return;
             Shell = this;
@@ -46,7 +42,7 @@ namespace MES_Wind
         /// <param name="Vwind_raster">Raster Layer for progmostic wind Y coord</param>
         /// <returns>List of booleans with coordinates if any of them are true, line is broken</returns>
         /// <remarks></remarks>
-#endregion
+        #endregion
         List<WindStressPRM.Coordinate> DotspLinestringToPrm(LineString dtlinestr)
         {
             List<WindStressPRM.Coordinate> prmlinestring = new List<WindStressPRM.Coordinate>();
@@ -67,7 +63,6 @@ namespace MES_Wind
         public IFeatureSet brokenpoints(List<CheckPoint> chklist)
         {
             IFeatureSet points = new FeatureSet(FeatureType.Point);
-            Coordinate chkcords = new Coordinate();
             return points;
         }
 
@@ -85,7 +80,7 @@ namespace MES_Wind
             string test = file_path + "u_test.asc";
 
             map1.AddLayer(file_path + "powerstations.shp");
-            map1.AddLayer(file_path+"u_test.asc");
+            map1.AddLayer(file_path + "u_test.asc");
             map1.AddLayer(file_path + "v_test.asc");
             map1.AddLayer(file_path + "clim5_test.asc");
             map1.AddLayer(file_path + "clim10_test.asc");
@@ -171,7 +166,7 @@ namespace MES_Wind
                     Coordinate dummyCellCoords = clim15RasterLayer.Bounds.CellCenter_ToProj(i,j);
                     WindStressPRM.Coordinate dummyClimCoords = new WindStressPRM.Coordinate(dummyCellCoords.X,dummyCellCoords.Y);
                     //add or substruct in range 0 - 27 to change what lines will be broken 
-                    double clim5 = j; // clim5RasterLayer.DataSet.Value[i, j];
+                    double clim5 = clim5RasterLayer.DataSet.Value[i, j];
                     double clim10 = clim10RasterLayer.DataSet.Value[i, j] - 10;
                     double clim15 = clim15RasterLayer.DataSet.Value[i, j];
                     if (Math.Abs(clim5 - RasterMissingValue) < eps)
diff --git a/WindStressPRM/WindStressPRM.cs b/WindStressPRM/WindStressPRM.cs
index cf21967..222af5d 100644
--- a/WindStressPRM/WindStressPRM.cs
+++ b/WindStressPRM/WindStressPRM.cs
@@ -258,7 +258,7 @@ namespace WindStressPRM
         /// Line vertices coordinate list
         /// список координат вершин ЛЭП как линейного объекта
         /// </summary>
-        public List<Coordinate> Coordinates { get; set; }
+        public IList<Coordinate> Coordinates { get; set; }
         /// <summary>
         /// assigned powerstation/pole
         /// идентификатор соответсвующего конца/начала линии (столб, трансформаторная подстанция, понижающая подстанция)
@@ -296,7 +296,7 @@ namespace WindStressPRM
         /// <param name="ison"></param>
         /// <param name="toID"></param>
         /// <param name="fromID"></param>
-        public Powerline(List<Coordinate> coordinates, int id, int year, double height, int power, int toID, int fromID)
+        public Powerline(IList<Coordinate> coordinates, int id, int year, double height, int power, int toID, int fromID)
         {
             this.Coordinates = coordinates;
             this.Identifier = id;
@@ -376,7 +376,7 @@ namespace WindStressPRM
         /// asigned powerlines list
         /// список оканчивающихся/начинающихся на подстанции ЛЭП
         /// </summary>
-        public List<Powerline> LineList { get; set; }
+        public IList<Powerline> LineList { get; set; }
         public PowerStation()
         {
             //default constructor
@@ -630,7 +630,7 @@ namespace WindStressPRM
             foreach (Powerline powerCurve in Input.PowerLines)
             {
                 // get coordinates list
-                List<Coordinate> points = powerCurve.Coordinates;
+                IList<Coordinate> points = powerCurve.Coordinates;
 
                 List<bool> checkList = new List<bool>();
                 // cycle throw all points in line
@@ -744,14 +744,16 @@ namespace WindStressPRM
                         // here line is broken
                         res = true;
                     }
-
                 }
                 checkbool.Add(res);
             }
             bool result = false;
             foreach (bool lastcheck in checkbool)
             {
-                if (lastcheck == true) { result = true; }
+                if (lastcheck == true) 
+                { 
+                    result = true;
+                }
             }
             return result;
         }
-- 
GitLab