示例#1
0
        void  errLeapScan(LEAP leap)
        {
            string Name;

            if (leap is LEAP130)
            {
                Name = "LEAP130";
            }
            else
            {
                Name = "LEAP300";
            }
            if (leap.OpModCode != 124 && leap.OpModCode != 182 && leap.OpModCode != 0)
            {
                if (leap.OpModCode != leap.OpModCodeOld)
                {
                    bot.SendMessageChat(Name + ":" + "\n" + $"{leap.OpModMsg}, Error code: {leap.OpModCode} " + "\n");
                }
                leap.OpModCodeOld = leap.OpModCode;
            }
            ;
            if (leap.OpModCode == 182)
            {
                if (leap.OpModCode != leap.OpModCodeOld)
                {
                    bot.SendMessageChat(Name + ":" + "\n" + $"Не та смесь" + "\n");
                }
                leap.OpModCodeOld = leap.OpModCode;

                //stCod_old = stCod;
            }
        }
示例#2
0
        public void ContinousSubSet4()
        {
            int[] arrange  = { -3, 2, -11, -4 };
            int[] expected = { 2, -11, -4 };
            LEAP  leap     = new LEAP();

            int[] result = leap.FindMaxProductContinousSubSet(arrange);
            Assert.IsTrue(Enumerable.SequenceEqual(expected, result));
        }
示例#3
0
        string statusLeapGet(LEAP leap)
        {
            string messageOut = "";


            double CNF;
            string SCNF;

            CNF         = (leap.counterNewFill / 1000000);
            SCNF        = string.Format("{0:0.00}", CNF) + " MIO, ";
            messageOut += $"{SCNF}{leap.Hv} kV, {leap.Egy} mJ. {leap.OpModMsg}, {leap.OpModCode}";
            leap.HvOld  = leap.Hv;
            leap.EgyOld = leap.Egy;
            return(messageOut);
        }
示例#4
0
        string errLeapGet(LEAP leap)
        {
            string messageOut = "";

            if (leap.OpModCode != 124 && leap.OpModCode != 182 && leap.OpModCode != 0)
            {
                //codOld = code;
                messageOut = $"{leap.OpModMsg}, Error code: {leap.OpModCode} " + "\n";
            }
            ;
            if (leap.OpModCode == 182)
            {
                messageOut = $"Не та смесь" + "\n";

                //stCod_old = stCod;
            }
            if (messageOut == "")
            {
                messageOut = "Ошибок нет" + "\n";
            }
            return(messageOut);
        }
示例#5
0
        void statusLeapScan(LEAP leap)
        {
            string Name;

            if (leap is LEAP130)
            {
                Name = "LEAP130";
            }
            else
            {
                Name = "LEAP300";
            }
            if ((/*leap.Egy > leap.EgyOld + 0.2 ||*/ leap.Hv > leap.HvOld + 0.009) && (leap.Egy != 404 && leap.Hv != 404))
            {
                double CNF;
                string SCNF;
                CNF  = (leap.counterNewFill / 1000000);
                SCNF = string.Format("{0:0.00}", CNF) + " MIO, ";
                bot.SendMessageChat(Name + " : " + "\n" + $"{SCNF}{leap.Hv} kV, {leap.Egy} mJ. {leap.OpModMsg}, {leap.OpModCode}");
                leap.HvOld  = leap.Hv;
                leap.EgyOld = leap.Egy;
            }
        }