Пример #1
0
 //Очистка списка объектов
 protected override void ClearOuts()
 {
     Outs.Clear();
     OutsId.Clear();
     Outs2.Clear();
     OutsId2.Clear();
     OperatorOut = null;
 }
Пример #2
0
 //Удалить все выходы
 protected override void ClearOuts()
 {
     OutsId.Clear();
     AlarmOut = null;
     SoeOut   = null;
     TextOut  = null;
 }
Пример #3
0
 //Подготовка провайдера, чтение значений IDCHANNEL
 public void Prepare()
 {
     _signalsIndication.Clear();
     _signalsUnit.Clear();
     using (var rec = new ReaderAdo(SqlProps, "SELECT OBJECTS.NAME_OBJECT, DEVICES.NAME_DEVICE, LIB_CHANNELS.NAME_TYPE, LIB_CHANNELS.UNIT, CHANNELS.IDCHANNEL, LIB_CHANNELS.TABLE_NAME " +
                                    "FROM CHANNELS INNER JOIN DEVICES ON CHANNELS.IDDEVICE = DEVICES.IDDEVICE INNER JOIN " +
                                    "LIB_CHANNELS ON dbo.CHANNELS.IDTYPE_CHANNEL = dbo.LIB_CHANNELS.IDTYPE_CHANNEL INNER JOIN " +
                                    "POINT_DEVICES ON dbo.DEVICES.IDDEVICE = dbo.POINT_DEVICES.IDDEVICE INNER JOIN " +
                                    "POINT_CONNECTIONS ON dbo.POINT_DEVICES.IDPOINT_CONNECTION = dbo.POINT_CONNECTIONS.IDPOINT_CONNECTION INNER JOIN " +
                                    "POINT_OBJ ON dbo.POINT_CONNECTIONS.IDPOINT_CONNECTION = dbo.POINT_OBJ.IDPOINT_CONNECTION INNER JOIN " +
                                    "OBJECTS ON dbo.POINT_OBJ.IDOBJECT = dbo.OBJECTS.IDOBJECT"))
         while (rec.Read())
         {
             string code = rec.GetString("NAME_OBJECT") + "." + rec.GetString("NAME_DEVICE") + "." + rec.GetString("NAME_TYPE");
             if (ProviderSignals.ContainsKey(code + ".Indication"))
             {
                 var sig = (SignalMir)ProviderSignals[code + ".Indication"];
                 sig.IdChannel = rec.GetInt("IDCHANNEL");
                 _signalsIndication.Add(sig.IdChannel, sig);
             }
             if (ProviderSignals.ContainsKey(code + ".Unit"))
             {
                 var sig = (SignalMir)ProviderSignals[code + ".Unit"];
                 sig.IdChannel = rec.GetInt("IDCHANNEL");
                 _signalsUnit.Add(sig.IdChannel, sig);
             }
         }
 }
Пример #4
0
 //Очистить список сигналов
 public void ClearSignals()
 {
     ProviderSignals.Clear();
     _objects.Clear();
     _totals.Clear();
     _objectsId.Clear();
     _totalsId.Clear();
 }
Пример #5
0
        public void Simple()
        {
            var dic = new DicI <string>("def");

            dic.Add(2, "22");
            dic.Add(3, "33");
            Assert.IsTrue(dic.ContainsKey(2));
            Assert.IsTrue(dic.ContainsKey(3));
            Assert.IsFalse(dic.ContainsKey(4));
            Assert.IsTrue(dic.Keys.Contains(3));
            Assert.AreEqual("22", dic[2]);
            Assert.AreEqual("22", dic.Get(2));
            Assert.AreEqual("33", dic.Dic[3]);
            Assert.AreEqual("def", dic[4]);
            Assert.AreEqual(2, dic.Count);
            Assert.AreEqual(2, dic.Values.Count);
            Assert.AreEqual(2, dic.Keys.Count);
            dic.Add(2, "222");
            dic.Add(3, "333", true);
            dic.Add(4, "444");
            Assert.IsTrue(dic.ContainsKey(2));
            Assert.IsTrue(dic.ContainsKey(3));
            Assert.IsTrue(dic.ContainsKey(4));
            Assert.AreEqual("22", dic[2]);
            Assert.AreEqual("333", dic[3]);
            Assert.AreEqual("444", dic[4]);
            Assert.AreEqual("444", dic.Get(4, "hh"));
            Assert.AreEqual("def", dic[5]);
            Assert.AreEqual("hh", dic.Get(5, "hh"));
            Assert.IsTrue(dic.ContainsValue("22"));
            Assert.IsFalse(dic.ContainsValue("33"));
            Assert.AreEqual(3, dic.Count);
            dic[4] = "44";
            Assert.IsTrue(dic.ContainsKey(4));
            Assert.AreEqual("44", dic[4]);
            Assert.IsTrue(dic.Remove(3));
            Assert.IsFalse(dic.Remove(5));
            Assert.IsFalse(dic.ContainsKey(3));
            Assert.IsFalse(dic.ContainsKey(5));
            dic.Clear();
            Assert.AreEqual(0, dic.Count);
            Assert.IsFalse(dic.ContainsKey(2));
        }
Пример #6
0
 //Очистка списков объектов
 protected override void ClearOuts()
 {
     _outs.Clear();
 }
Пример #7
0
 public void ClearSignals()
 {
     ProviderSignals.Clear();
     _signalsId.Clear();
     _signalsStrId.Clear();
 }
Пример #8
0
 //Очистка списка выходов
 protected override void ClearOuts()
 {
     Outs.Clear();
     OutsId.Clear();
 }
Пример #9
0
 //Очистка списка объектов
 protected internal override void ClearOuts()
 {
     ObjectsId.Clear();
     Objects.Clear();
     ObjectsList.Clear();
 }
Пример #10
0
 //Очищает список используемых описаний ошибок
 public void ClearErrors()
 {
     _errs.Clear();
     _usedErrorDescrs.Clear();
 }
Пример #11
0
 //Удалить все сигналы
 public void ClearSignals()
 {
     _signals.Clear();
     _objectsId.Clear();
     _objectsParts.Clear();
 }