예제 #1
0
 private bool imethod_2()
 {
     try
     {
         int num = this.int_0;
         if (num != 0)
         {
             if (num != 1)
             {
                 return(false);
             }
             this.int_0 = -3;
             int num3 = this.class1_0.int_0;
             this.class1_0.int_0 = num3 - 1;
             if (this.class1_0.int_0 == 0)
             {
                 this.method_0();
                 return(false);
             }
             int num2 = this.int_5;
             this.int_5 = ((num2 + this.int_6) + this.class1_0.int_0) ^ (0x7484a7c7 + this.int_7);
             this.int_6 = num2;
         }
         else
         {
             this.int_0          = -1;
             this.class1_0       = new Class0.Class1();
             this.class1_0.int_0 = this.int_3;
             this.int_6          = 0;
             this.int_5          = 1;
             Class0.Delegate0 <int> delegate3 = new Class0.Delegate0 <int>(this.class1_0.method_0);
             int           num4   = this.int_5;
             Class0.Class3 class1 = new Class0.Class3(-2)
             {
                 int_4       = num4,
                 delegate0_1 = delegate3
             };
             this.interface4_0 = ((Interface1 <int>)class1).imethod_1();
             this.int_0        = -3;
         }
         if (!this.interface4_0.imethod_2())
         {
             this.method_0();
             this.interface4_0 = null;
             return(false);
         }
         this.int_7 = this.interface4_0.imethod_4();
         this.int_1 = this.int_5;
         this.int_0 = 1;
         return(true);
     }
     fault
     {
         this.Interface2.imethod_0();
     }
 }
예제 #2
0
 private bool imethod_2()
 {
     try
     {
         int num = this.int_0;
         if (num != 0)
         {
             if (num != 1)
             {
                 return(false);
             }
             this.int_0 = -3;
             if (this.int_5 == 0)
             {
                 this.method_0();
                 return(false);
             }
         }
         else
         {
             this.int_0 = -1;
             this.int_5 = 7;
             int           num4   = this.int_3;
             Class0.Class2 class1 = new Class0.Class2(-2)
             {
                 int_4 = num4
             };
             this.interface4_0 = ((Interface1 <int>)class1).imethod_1();
             this.int_0        = -3;
         }
         if (!this.interface4_0.imethod_2())
         {
             this.method_0();
             this.interface4_0 = null;
             return(false);
         }
         int num2 = this.interface4_0.imethod_4() ^ this.int_3;
         if ((num2 & 3) == 0)
         {
             num2 ^= -2060011533;
         }
         int num3 = this.int_5 - 1;
         this.int_5 = num3;
         if ((num2 & 15) == 0)
         {
             num2 ^= -1059952607 ^ this.int_5;
         }
         this.int_1 = num2;
         this.int_0 = 1;
         return(true);
     }
     fault
     {
         this.Interface2.imethod_0();
     }
 }
예제 #3
0
        static void Main(string[] args)
        {
            D          obj1 = new D();
            Interface3 obj2 = (Interface3)obj1; // this is explicit interface implementation
            Interface4 obj3 = (Interface4)obj1;

            obj2.F2();
            obj3.F2();
            Console.ReadLine();
        }
예제 #4
0
        public static object[] InvokePubService(string string_0, object[] object_0)
        {
            string directoryName = "";

            try
            {
                if (dictionary_1.ContainsKey(string_0))
                {
                    object   obj2     = null;
                    string[] strArray = dictionary_1[string_0];
                    if (dictionary_0.ContainsKey(string_0))
                    {
                        obj2 = dictionary_0[string_0];
                    }
                    else
                    {
                        directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                        //逻辑修改:新的文件无需解密
                        //byte[] sourceArray = Convert.FromBase64String("L3yC7zg8fQWhipDSFB284EahvoXH9kNV6TE843pajbE7Tyo53TJ95N4ahc1nunDe");
                        //byte[] destinationArray = new byte[0x20];
                        //Array.Copy(sourceArray, 0, destinationArray, 0, 0x20);
                        //byte[] buffer3 = new byte[0x10];
                        //Array.Copy(sourceArray, 0x20, buffer3, 0, 0x10);
                        //byte[] buffer4 = AES_Crypt.Decrypt(Convert.FromBase64String("X7xxyMJDoje5XAwsxAOOIAjpm9iH+86h8HJE7kFSLV4K2rN/kb93R5TgadKYp4kTcuz3eg+TV8gMxLkltAAOow=="), destinationArray, buffer3, null);
                        //byte[] buffer5 = new byte[0x20];
                        //Array.Copy(buffer4, 0, buffer5, 0, 0x20);
                        //byte[] buffer6 = new byte[0x10];
                        //Array.Copy(buffer4, 0x20, buffer6, 0, 0x10);
                        //obj2 = Assembly.Load(AES_Crypt.Decrypt(File.ReadAllBytes(Path.Combine(directoryName, strArray[0])), buffer5, buffer6, null)).CreateInstance(strArray[1]);
                        obj2 = Assembly.Load(File.ReadAllBytes(Path.Combine(directoryName, strArray[0]))).CreateInstance(strArray[1]);
                        dictionary_0.Add(string_0, obj2);
                    }
                    if (obj2 == null)
                    {
                        ilog_0.ErrorFormat("初始化名称为{0}的公共方法异常:{1}", string_0, directoryName);
                        return(null);
                    }
                    Interface4 interface2 = obj2 as Interface4;
                    if (interface2 != null)
                    {
                        return(interface2.imethod_0(object_0));
                    }
                    ilog_0.ErrorFormat("名称为{0}的公共方法类型错误({1})", string_0, obj2.GetType().FullName);
                    return(((Interface4)obj2).imethod_0(object_0));
                }
                return(null);
            }
            catch (Exception exception)
            {
                ilog_0.Error("调用公共方法异常:" + string_0 + "," + exception.ToString());
                return(null);
            }
        }
예제 #5
0
파일: Class10.cs 프로젝트: uwx/Open-GHTCP
        public static bool smethod_0(string string0)
        {
            Interface4 @interface = null;
            var        num        = CreateAssemblyCache(out @interface, 0u);

            if (num != 0)
            {
                return(false);
            }
            num = @interface.imethod_4(0u, string0, IntPtr.Zero);
            return(num == 0);
        }
예제 #6
0
    public static Class615 smethod_0(Interface1 A_0, Interface30 A_1, float A_2)
    {
        int        num        = 13;
        Interface3 interface2 = A_0 as Interface3;

        if (interface2 != null)
        {
            if (interface2.imethod_0().imethod_22())
            {
                return(new Class617(interface2, A_1));
            }
            return(new Class616(interface2, A_1));
        }
        Interface2 interface4 = A_0 as Interface2;

        if ((A_0 is Field) && ((A_0 as Field).Type == FieldType.FieldSymbol))
        {
            interface4 = (A_0 as Field).method_46();
        }
        if ((interface4 != null) && !(interface4 is TextBox))
        {
            return(new Class619(interface4, A_1));
        }
        Interface4 interface3 = null;

        if (A_0 is Interface4)
        {
            interface3 = A_0 as Interface4;
        }
        else if (A_0 is TextBox)
        {
            interface3 = (A_0 as TextBox).method_78(A_1);
        }
        if (interface3 != null)
        {
            return(new Class618(interface3, A_1));
        }
        Class820 class2 = A_0 as Class820;

        if (class2 == null)
        {
            throw new ArgumentException(BookmarkStart.b("稲嬴䄶堸场吼嬾慀㑂ⱄ⍆⹈⹊㥌潎═⩒╔㉖捘筚", num) + A_0.GetType());
        }
        return(new Class618(class2, A_1));
    }
예제 #7
0
 public Class820(Interface4 A_0, int A_1) : this(A_0, A_1, 0)
 {
 }
예제 #8
0
 public Class820(Interface4 A_0, int A_1, int A_2)
 {
     this.interface4_0 = A_0;
     this.int_0        = A_1;
     this.int_1        = A_2;
 }
예제 #9
0
 public Class820(Interface4 A_0, int A_1, Class65[] A_2) : this(A_0, A_1, 0)
 {
     this.class65_0 = A_2;
 }
예제 #10
0
파일: Class10.cs 프로젝트: uwx/Open-GHTCP
 public static extern int CreateAssemblyCache(out Interface4 ppAsmCache, uint dwReserved);
예제 #11
0
파일: Class607.cs 프로젝트: 15831944/WW
 public static void smethod_1(Interface9 writer, Interface3 subEntity, Interface4 subTagged)
 {
     writer.imethod_13(subTagged.imethod_2(writer.FileFormatVersion));
     subEntity.imethod_1(writer);
 }
예제 #12
0
    private static string smethod_1(int int_3, bool bool_0)
    {
        int    num  = -1827340969;
        int    num2 = -360735532;
        string str  = null;

        while (class58_0 != null)
        {
            int           num4;
            StringBuilder builder;
            byte[]        buffer2;
            Assembly      assembly2;
            int           num3 = int_1;
Label_001A:
            if (int_0 == ((0x7d9434c5 - num) ^ num2))
            {
                return(new string(new char[] { (num ^ 0x796b607b) - num2, '0', (0x576a9f35 + num) ^ num2 }));
            }
            int num13 = (int_3 ^ ((-1679363405 ^ num) - num2)) ^ num3;
            num13 ^= (num + -605645539) + num2;
            class58_0.method_0().Position = num13;
            if (byte_1 != null)
            {
                buffer2 = byte_1;
            }
            else
            {
                short num21;
                if (short_0 == -1)
                {
                    num21 = (short)((class58_0.method_1() ^ ((num ^ 0x796b7387) ^ num2)) ^ num13);
                }
                else
                {
                    num21 = short_0;
                }
                if (num21 == 0)
                {
                    buffer2 = null;
                }
                else
                {
                    buffer2 = class58_0.method_6(num21);
                    for (int i = 0; i != buffer2.Length; i++)
                    {
                        buffer2[i] = (byte)(buffer2[i] ^ ((byte)(int_1 >> ((3 & i) << 3))));
                    }
                }
            }
            int num5 = ((class58_0.method_2() ^ num13) ^ -~~--~-~~-~((0x7d9a0a6b - num) - num2)) ^ num3;
            if (num5 != ((-2037080451 ^ num) | num2))
            {
                byte[] buffer3;
                int    num15;
                bool   flag2 = (num5 & ((num ^ -110403197) ^ num2)) > 0;
                bool   flag4 = (num5 & ((num + -1754620035) - num2)) > 0;
                bool   flag3 = (num5 & ((0x5d949a2b - num) ^ num2)) > 0;
                num5 &= (-1231774084 ^ num) + num2;
                byte[] buffer4 = class58_0.method_6(num5);
                byte[] buffer6 = buffer2;
                byte   num24   = buffer6[1];
                int    length  = buffer4.Length;
                byte   num20   = (byte)((length + 11) ^ (7 + num24));
                uint   num19   = (uint)((buffer6[0] | (buffer6[2] << 8)) + (num20 << 3));
                int    index   = 0;
                ushort num16   = 0;
                while (index < length)
                {
                    if ((index & 1) == 0)
                    {
                        num19 = (uint)((num19 * ((num + 0x5767e1d2) ^ num2)) + ((0x7dbb38ee - num) - num2));
                        num16 = (ushort)(num19 >> 0x10);
                    }
                    byte num30 = (byte)num16;
                    num16 = (ushort)(num16 >> 8);
                    byte num23 = buffer4[index];
                    buffer4[index] = (byte)(((num23 ^ num24) ^ (num20 + 3)) ^ num30);
                    index++;
                    num20 = num23;
                }
                byte[] buffer = buffer4;
                if ((byte_0 > null) != (int_0 != ((-2105282981 + num) + num2)))
                {
                    for (int j = 0; j < num5; j = 1 + j)
                    {
                        byte num14 = byte_0[j & 7];
                        num14     = (byte)((num14 << 3) | (num14 >> 5));
                        buffer[j] = (byte)(buffer[j] ^ num14);
                    }
                }
                int num8 = int_0 - 12;
                if (!flag4)
                {
                    buffer3 = buffer;
                    num15   = num5;
                }
                else
                {
                    num15   = ((buffer[2] | (buffer[0] << 0x10)) | (buffer[3] << 8)) | (buffer[1] << 0x18);
                    buffer3 = new byte[num15];
                    smethod_5(buffer, 4, buffer3);
                }
                if (flag2 && (num8 == ((0x798cd819 ^ num) - num2)))
                {
                    char[] chArray2 = new char[num15];
                    for (int k = 0; k < num15; k = 1 + k)
                    {
                        chArray2[k] = (char)buffer3[k];
                    }
                    str = new string(chArray2);
                }
                else
                {
                    str = Encoding.Unicode.GetString(buffer3, 0, buffer3.Length);
                }
                num8 += (((num + -2106890668) + num2) + (3 & num8)) << 5;
                if (num8 != ((0x7973f919 ^ num) ^ num2))
                {
                    int num34 = ((num5 + int_3) ^ ((-2105954227 + num) + num2)) ^ (num8 & ((0x7d949f38 - num) - num2));
                    builder = new StringBuilder();
                    num4    = (num + 0x576a9f35) ^ num2;
                    builder.Append((char)((byte)num4));
                    str = num34.ToString(builder.ToString());
                }
                if ((false == flag3) & bool_0)
                {
                    str = string.Intern(str);
                    class59_0.method_3(int_3, str);
                }
                return(str);
            }
            byte[] buffer5 = class58_0.method_6(4);
            int_3 = ((-1466961853 - num) + num2) ^ num3;
            int_3 = (((buffer5[2] | (buffer5[3] << 0x10)) | (buffer5[0] << 8)) | (buffer5[1] << 0x18)) ^ -int_3;
            str   = class59_0.method_2(int_3);
            if (str == null)
            {
                continue;
            }
            return(str);

Label_016E:
            assembly2 = Assembly.GetExecutingAssembly();
            Assembly callingAssembly = Assembly.GetCallingAssembly();
            int_0  |= (0x7d7c0bad - num) ^ num2;
            builder = new StringBuilder();
            num4    = (-1718402686 ^ num) - num2;
            builder.Append((char)num4).Append((char)(num4 >> 0x10));
            num4 = (0x5d8eba33 - num) ^ num2;
            builder.Append((char)(num4 >> 0x10)).Append((char)num4);
            num4 = (-1500348829 ^ num) + num2;
            builder.Append((char)num4).Append((char)(num4 >> 0x10));
            num4 = (-1650607566 - num) - num2;
            builder.Append((char)num4).Append((char)(num4 >> 0x10));
            num4 = (-1500217736 ^ num) + num2;
            builder.Append((char)(num4 >> 0x10)).Append((char)num4);
            Stream     manifestResourceStream = assembly2.GetManifestResourceStream(builder.ToString());
            int        num6  = 2;
            StackTrace trace = new StackTrace(2, false);
            int_0 ^= ((num + 0x576a883b) ^ num2) | 2;
            num6   = 0;
            StackFrame frame = trace.GetFrame(0);
            int        num17 = 0;
            if (frame == null)
            {
                trace = new StackTrace();
                num17 = 1;
                frame = trace.GetFrame(1);
            }
            MethodBase method = frame?.GetMethod();
            int_0 ^= num6 + ((-2037080325 ^ num) + num2);
            Type declaringType = method?.DeclaringType;
            if (frame == null)
            {
                int_0 ^= (0x5767c710 + num) ^ num2;
            }
            bool flag = declaringType == typeof(RuntimeMethodHandle);
            int_0 ^= (num ^ -2037080421) + num2;
            if (!flag && (flag = declaringType == null))
            {
                if (smethod_4(trace, num17))
                {
                    flag = false;
                }
                else
                {
                    int_0 ^= (0x7d97f2be - num) - num2;
                }
            }
            if (flag == (trace > null))
            {
                int_0 = 0x20 ^ int_0;
            }
            int_0    ^= ((0x576a885b + num) ^ num2) | (1 + num6);
            class58_0 = new Class58(manifestResourceStream);
            short num25 = (short)(class58_0.method_1() ^ ((short)~-~--~~-~((num ^ 0x796bbbeb) - num2)));
            if (num25 == 0)
            {
                short_0 = (short)(class58_0.method_1() ^ ((short)-~-~~--~~((-1466604045 - num) ^ num2)));
            }
            else
            {
                byte_1 = class58_0.method_6(num25);
            }
            callingAssembly = assembly2;
            byte_0          = smethod_3(smethod_2(callingAssembly));
            num3            = int_2;
            int_2           = 0;
            num3           ^= (-380421005 ^ num) + num2;
            long num32 = Class6.smethod_0();
            num3 ^= (int)((uint)num32);
            num3 ^= (0x750a9c29 + num) - num2;
            int           num33  = num3;
            int           num28  = ((0x5e3827a7 - num) + num2) ^ num33;
            int           num11  = (((0x796b4cd6 ^ num) - num2) * num28) % ((-1438863760 - num) + num2);
            int           num18  = (num ^ 0x796b601e) - num2;
            int           num29  = num11;
            Class0.Class4 class1 = new Class0.Class4((num + -2106890797) | num2)
            {
                int_4 = num29
            };
            Interface4 <int> interface2 = ((Interface1 <int>)class1).imethod_1();
            try
            {
                while (interface2.imethod_2())
                {
                    int num31 = interface2.imethod_4();
                    num11 ^= num31 - num18;
                    num18 -= (3 + num11) >> 8;
                }
            }
            finally
            {
                if (interface2 != null)
                {
                    interface2.imethod_0();
                }
            }
            num3 ^= -~-~~--~~((-1813293368 - num) + num2);
            int num26 = num11;
            num3  = num26 + num3;
            int_1 = num3;
            int_0 = (int_0 & ((num ^ 0x696b6111) - num2)) ^ ((num + 0x576a88f9) ^ num2);
            if ((enum0_0 & ~-~--~~-~-~((num ^ 0x796b6197) - num2)) == ((Enum0)0))
            {
                int_0 = (num + -2106846833) + num2;
            }
            goto Label_001A;
        }
        goto Label_016E;
    }
예제 #13
0
 public Test3(Interface4 i4)
 {
 }
예제 #14
0
    IEnumerator RFIDDataCheck()
    {
        timeToCheck = false;

        yield return(new WaitForSeconds(0.15f));

        var ONE = Interface1.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (ONE == null)
        {
            FM1.text = ("No reading RFID machine 1");
        }
        else
        {
            text1    = ("The last RFID tag at machine 1 was ") + ONE.ToString();
            FM1.text = text1;
        }

        yield return(new WaitForSeconds(0.15f));

        var TWO = Interface2.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (TWO == null)
        {
            FM2.text = ("No reading RFID machine 2");
        }
        else
        {
            text2    = ("The last RFID tag at machine 2 was ") + TWO.ToString();
            FM2.text = text2;
        }

        yield return(new WaitForSeconds(0.15f));

        var THREE = Interface3.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (THREE == null)
        {
            FM3.text = ("No reading RFID machine 3");
        }
        else
        {
            text1    = ("The last RFID tag at machine 3 was ") + THREE.ToString();
            FM3.text = text3;
        }

        yield return(new WaitForSeconds(0.15f));

        var FOUR = Interface4.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (FOUR == null)
        {
            FM4.text = ("No reading RFID machine 4");
        }
        else
        {
            text4    = ("The last RFID tag at machine 4 was ") + FOUR.ToString();
            FM4.text = text4;
        }

        yield return(new WaitForSeconds(0.15f));

        var FIVE = Interface5.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (FIVE == null)
        {
            FM5.text = ("No reading RFID machine 5");
        }
        else
        {
            text5    = ("The last RFID tag at machine 5 was ") + FIVE.ToString();
            FM5.text = text5;
        }

        yield return(new WaitForSeconds(0.15f));

        var SIX = Interface6.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (SIX == null)
        {
            FM6.text = ("No reading RFID machine 6");
        }
        else
        {
            text6    = ("The last RFID tag at machine 6 was ") + SIX.ToString();
            FM6.text = text6;
        }

        yield return(new WaitForSeconds(0.15f));

        var SEVEN = Interface7.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (SEVEN == null)
        {
            FM7.text = ("No reading RFID machine 7");
        }
        else
        {
            text7    = ("The last RFID tag at machine 7 was ") + SEVEN.ToString();
            FM7.text = text7;
        }

        yield return(new WaitForSeconds(0.15f));

        var EIGHT = Interface8.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (EIGHT == null)
        {
            FM8.text = ("No reading RFID machine 8");
        }
        else
        {
            text8    = ("The last RFID tag at machine 8 was ") + EIGHT.ToString();
            FM8.text = text8;
        }

        yield return(new WaitForSeconds(0.15f));

        var NINE = Interface9.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        if (NINE == null)
        {
            FM9.text = ("No reading RFID machine 9");
        }
        else
        {
            text9    = ("The last RFID tag at machine 9 was ") + NINE.ToString();
            FM9.text = text9;
        }

        yield return(new WaitForSeconds(0.3f));

        timeToCheck = true;
    }
예제 #15
0
    IEnumerator EmgStopCheck()
    {
        checkEmgStop = false;

        yield return(new WaitForSeconds(0.05f));

        var EMG1 = Interface1.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG1 == null)
        {
            idle1.SetActive(true);
            emergency1.SetActive(false);
            good1.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG1 != null && EMG1.ToString() == active)
        {
            emergency1.SetActive(true);
            idle1.SetActive(false);
            good1.SetActive(false);
            overlayGood.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 1!";
        }
        if (EMG1 != null && EMG1.ToString() == inactive)
        {
            good1.SetActive(true);
            idle1.SetActive(false);
            emergency1.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG2 = Interface2.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG2 == null)
        {
            idle2.SetActive(true);
            emergency2.SetActive(false);
            good2.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG2 != null && EMG2.ToString() == active)
        {
            emergency2.SetActive(true);
            idle2.SetActive(false);
            good2.SetActive(false);
            overlayGood.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 2!";
        }
        if (EMG2 != null && EMG2.ToString() == inactive)
        {
            good2.SetActive(true);
            idle2.SetActive(false);
            emergency2.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG3 = Interface3.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG3 == null)
        {
            idle3.SetActive(true);
            emergency3.SetActive(false);
            good3.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG3 != null && EMG3.ToString() == active)
        {
            emergency3.SetActive(true);
            idle3.SetActive(false);
            good3.SetActive(false);
            overlayGood.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 3!";
        }
        if (EMG3 != null && EMG3.ToString() == inactive)
        {
            good3.SetActive(true);
            idle3.SetActive(false);
            emergency3.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG4 = Interface4.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG4 == null)
        {
            idle4.SetActive(true);
            emergency4.SetActive(false);
            good4.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG4 != null && EMG4.ToString() == active)
        {
            emergency4.SetActive(true);
            idle4.SetActive(false);
            good4.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 4!";
        }
        if (EMG4 != null && EMG4.ToString() == inactive)
        {
            good4.SetActive(true);
            idle4.SetActive(false);
            emergency4.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG5 = Interface5.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG5 == null)
        {
            idle5.SetActive(true);
            emergency5.SetActive(false);
            good5.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG5 != null && EMG5.ToString() == active)
        {
            emergency5.SetActive(true);
            idle5.SetActive(false);
            good5.SetActive(false);
            good4.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 5!";
        }
        if (EMG5 != null && EMG5.ToString() == inactive)
        {
            good5.SetActive(true);
            idle5.SetActive(false);
            emergency5.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG6 = Interface6.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG6 == null)
        {
            idle6.SetActive(true);
            emergency6.SetActive(false);
            good6.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG6 != null && EMG6.ToString() == active)
        {
            emergency6.SetActive(true);
            idle6.SetActive(false);
            good6.SetActive(false);
            good4.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 6!";
        }
        if (EMG6 != null && EMG6.ToString() == inactive)
        {
            good6.SetActive(true);
            idle6.SetActive(false);
            emergency6.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG7 = Interface7.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG7 == null)
        {
            idle7.SetActive(true);
            emergency7.SetActive(false);
            good7.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG7 != null && EMG7.ToString() == active)
        {
            emergency7.SetActive(true);
            idle7.SetActive(false);
            good7.SetActive(false);
            good4.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 7!";
        }
        if (EMG7 != null && EMG7.ToString() == inactive)
        {
            good7.SetActive(true);
            idle7.SetActive(false);
            emergency7.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG8 = Interface8.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG8 == null)
        {
            idle8.SetActive(true);
            emergency8.SetActive(false);
            good8.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG8 != null && EMG4.ToString() == active)
        {
            emergency8.SetActive(true);
            idle4.SetActive(false);
            good8.SetActive(false);
            good4.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 8!";
        }
        if (EMG8 != null && EMG8.ToString() == inactive)
        {
            good8.SetActive(true);
            idle8.SetActive(false);
            emergency8.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.05f));

        var EMG9 = Interface9.ReadNodeValue("ns=3;s=\"dbOpPanel\".\"OpPanelBtn\".\"xEmStop\"");

        if (EMG9 == null)
        {
            idle9.SetActive(true);
            emergency9.SetActive(false);
            good9.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }
        if (EMG9 != null && EMG9.ToString() == active)
        {
            emergency9.SetActive(true);
            idle9.SetActive(false);
            good9.SetActive(false);
            good4.SetActive(false);
            overlayEmergency.SetActive(true);
            info.text = "Check emergency on Machine 9!";
        }
        if (EMG9 != null && EMG9.ToString() == inactive)
        {
            good9.SetActive(true);
            idle9.SetActive(false);
            emergency9.SetActive(false);
            overlayGood.SetActive(true);
            overlayEmergency.SetActive(false);
            info.text = "No emergency";
        }

        yield return(new WaitForSeconds(0.5f));

        checkEmgStop = true;
    }
예제 #16
0
    // Update is called once per frame
    void Update()
    {
        var ONE = Interface1.ReadNodeValue("ns=3;s=\"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text1    = ("RFID tag at machine 1 is ") + ONE.ToString();
        FM1.text = text1;
        if (ONE == null)
        {
            FM1.text = ("No reading RFID machine 1");
        }

        var TWO = Interface2.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text2    = ("RFID tag at machine 2 is ") + TWO.ToString();
        FM2.text = text2;
        if (TWO == null)
        {
            FM2.text = ("No reading RFID machine 2");
        }

        var THREE = Interface3.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text3    = ("RFID tag at machine 3 is ") + THREE.ToString();
        FM3.text = text3;
        if (THREE == null)
        {
            FM3.text = ("No reading RFID machine 3");
        }

        var FOUR = Interface4.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text4    = ("RFID tag at machine 4 is ") + FOUR.ToString();
        FM4.text = text4;
        if (FOUR == null)
        {
            FM4.text = ("No reading RFID machine 4");
        }

        var FIVE = Interface5.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text5    = ("RFID tag at machine 5 is ") + FIVE.ToString();
        FM5.text = text5;
        if (FIVE == null)
        {
            FM5.text = ("No reading RFID machine 5");
        }

        var SIX = Interface6.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text6    = ("RFID tag at machine 6 is ") + SIX.ToString();
        FM6.text = text6;
        if (SIX == null)
        {
            FM6.text = ("No reading RFID machine 6");
        }

        var SEVEN = Interface7.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text7    = ("RFID tag at machine 7 is ") + SEVEN.ToString();
        FM7.text = text7;
        if (SEVEN == null)
        {
            FM7.text = ("No reading RFID machine 7");
        }

        var EIGHT = Interface8.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text8    = ("RFID tag at machine 8 is ") + EIGHT.ToString();
        FM8.text = text8;
        if (EIGHT == null)
        {
            FM8.text = ("No reading RFID machine 8");
        }

        var NINE = Interface9.ReadNodeValue("ns = 3; s = \"dbRfidData\".\"ID1\".\"iCarrierID\"");

        text9    = ("RFID tag at machine 9 is ") + NINE.ToString();
        FM9.text = text9;
        if (NINE == null)
        {
            FM9.text = ("No reading RFID machine 9");
        }
    }