Exemplo n.º 1
0
 //Чтение иформации по проекту из файла проекта
 public void ReadProject()
 {
     ReadSysTabl(true);
     Procent = 5;
     if (IsError)
     {
         return;
     }
     if (ThreadCalc.IsReadSources || ThreadCalc.IsWriteReceivers)
     {
         Start(ReadSignals, 5, 15);
         if (IsError)
         {
             return;
         }
         if (ThreadCalc.ImitMode != ImitMode.NoImit && Imitator != null)
         {
             using (Start(15, 25)) Imitator.PrepareSignals(_signalsCodes);
         }
         if (IsError)
         {
             return;
         }
         Start(JoinSignals, 25, 30);
     }
     if (!Start(ReadCalcParams, 30, 75))
     {
         return;
     }
     //if (ThreadCalc.IsWriteArchives || ThreadCalc.IsWriteVed)
     ThreadCalc.Start(ReadArchiveParams, 75);
 }
Exemplo n.º 2
0
 //Подгрузка свойств имитируемого юнита из таблиц
 public ImitSignal(IRecordRead rec, Imitator imitator) : base("", rec.GetString("FullCode"), DataType.Variant, imitator)
 {
     Imitator        = imitator;
     ImitId          = rec.GetInt("ImitId");
     ImitType        = rec.GetInt("ImitType");
     _intervalLength = rec.GetInt("IntervalLength");
     if (_intervalLength < 0)
     {
         _intervalLength = 0;
     }
     _intervalSpan = new TimeSpan(0, 0, _intervalLength);
     _signalValue  = rec.GetDouble("SignalValue");
     _signalNd     = rec.GetInt("SignalNd");
 }