Исправил оформление кода
This commit is contained in:
parent
a2801a2cbe
commit
09275140c4
@ -9,6 +9,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Lers.Utils;
|
||||
|
||||
namespace ExternalModuleExample
|
||||
{
|
||||
@ -45,38 +46,8 @@ namespace ExternalModuleExample
|
||||
// Проходим по всему списку
|
||||
foreach (MeasurePoint measurePoint in measurePointList)
|
||||
{
|
||||
string measurePointType = "";
|
||||
|
||||
// Смотрим тип точки учёта и в соответствии со значением присваиваем название
|
||||
switch (measurePoint.SystemType)
|
||||
{
|
||||
case SystemType.ColdWater:
|
||||
measurePointType = "Холодное водоснабжение"; break;
|
||||
|
||||
case SystemType.Electricity:
|
||||
measurePointType = "Электричество"; break;
|
||||
|
||||
case SystemType.Gas:
|
||||
measurePointType = "Газоснабдение"; break;
|
||||
|
||||
case SystemType.Heat:
|
||||
measurePointType = "Теплоснабжение"; break;
|
||||
|
||||
case SystemType.HotWater:
|
||||
measurePointType = "Горячее водоснабжение"; break;
|
||||
|
||||
case SystemType.None:
|
||||
measurePointType = "Нет типа"; break;
|
||||
|
||||
case SystemType.Steam:
|
||||
measurePointType = "Пароснабжение"; break;
|
||||
|
||||
default:
|
||||
measurePointType = "Не удалось получить тип"; break;
|
||||
}
|
||||
|
||||
// Добавляем запись в таболицу MainView
|
||||
MainView.Rows.Add(measurePoint.FullTitle, measurePointType);
|
||||
MainView.Rows.Add(measurePoint.FullTitle, EnumUtils.GetDescription(measurePoint.SystemType));
|
||||
}
|
||||
|
||||
// Ставим авто-ширину столбцов в такой режим, что суммарная ширина всех столбцов
|
||||
|
Loading…
x
Reference in New Issue
Block a user