public void SetInformationTable(InformationTable informationTable)
 {
     Id = informationTable.Id ?? Guid.NewGuid()
          .ToString();
     WidthWithModule  = informationTable.WidthWithModule;
     HeightWithModule = informationTable.HeightWithModule;
     RowCount         = informationTable.RowCount;
     AccessCode       = informationTable.AccessCode;
     IpDevice         = informationTable.IpDevice;
     UserNameDevice   = informationTable.UserNameDevice;
     PasswordDevice   = informationTable.PasswordDevice;
 }
Beispiel #2
0
 public InformationTableViewModel(InformationTable informationTable, string stationId, int rowCount)
 {
     InformationTable   = informationTable;
     InformationTableId = informationTable?.Id ?? "-1";
     StationId          = stationId;
     CssClass           = informationTable?.ModuleType
                          ?.CssClass ?? "";
     Width = (informationTable?.WidthWithModule ?? 0) * (informationTable?.ModuleType
                                                         ?.WidthPx ?? 0);
     Height = (informationTable?.HeightWithModule
               ?? 0) * (informationTable?.ModuleType
                        ?.HeightPx ?? 0);
     RowCount       = rowCount;
     Contents       = GetContents(informationTable?.Id ?? "");
     CurrentContent = Contents.Any()
                    ? Contents.FirstOrDefault()
                    : null;
 }