コード例 #1
0
ファイル: SignSvrAPI.cs プロジェクト: SoL-Alucard-Git/HX-Base
        public int OpenDevice(ref IntPtr intptr_0, string string_0, string string_1, string string_2)
        {
            int    num           = -1;
            string str           = string.Empty;
            string invSignServer = CommonTool.GetInvSignServer();

            if (!string.IsNullOrWhiteSpace(invSignServer))
            {
                foreach (string str3 in invSignServer.Split(new char[] { ';' }))
                {
                    string[] strArray3 = str3.Split(new char[] { '=' });
                    if (strArray3[0].Trim() == string_1)
                    {
                        str = strArray3[1];
                        break;
                    }
                }
            }
            if (string.Empty.Equals(str))
            {
                str = "slot1";
            }
            num = Crypt_OpenDevice(ref intptr_0, str, string_2, 0x604, 0);
            Class20.smethod_1(string.Format("打开设备,返回值:{0},句柄:{1}", num, (IntPtr)intptr_0));
            if (num == 0)
            {
                num = Crypt_Login(intptr_0, string_0);
            }
            return(num);
        }
コード例 #2
0
    // Token: 0x060000FC RID: 252 RVA: 0x00006E4C File Offset: 0x0000504C
    public static void smethod_0(GStruct2 gstruct2_0)
    {
        switch (gstruct2_0.byte_1)
        {
        case 1:
            Class20.smethod_1();
            break;

        case 2:
            Class20.smethod_3(gstruct2_0.object_0);
            break;

        case 4:
            Class20.smethod_2(gstruct2_0.guid_0, gstruct2_0.object_0);
            break;

        case 6:
            Class20.smethod_4();
            break;

        case 7:
            Class20.smethod_5(gstruct2_0.object_0);
            break;
        }
    }
コード例 #3
0
    // Token: 0x06000101 RID: 257 RVA: 0x00007010 File Offset: 0x00005210
    public static void smethod_5(object[] object_0)
    {
        string string_ = (string)object_0[0];

        if ((bool)object_0[1])
        {
            try
            {
                string text = Class8.smethod_61(string_);
                if (!string.IsNullOrEmpty(text))
                {
                    Class20.smethod_8(text);
                }
            }
            catch (Exception exception_)
            {
                Class8.smethod_62(string_);
                Class8.smethod_86(exception_, "HandleBaseCommandExceptionHash");
            }
        }
        if (Class8.queue_0.Count != 0)
        {
            Class20.smethod_7(Class8.queue_0.Dequeue());
        }
    }
コード例 #4
0
    // Token: 0x0600058A RID: 1418 RVA: 0x000271C8 File Offset: 0x000253C8
    private static void smethod_14(IList ilist_0, Array array_0, int[] int_0)
    {
        int num = int_0.Length;

        if (num == array_0.Rank)
        {
            array_0.SetValue(Class20.smethod_15(ilist_0, int_0), int_0);
            return;
        }
        int length = array_0.GetLength(num);

        if (((IList)Class20.smethod_15(ilist_0, int_0)).Count != length)
        {
            throw new Exception("Cannot deserialize non-cubical array as multidimensional array.");
        }
        int[] array = new int[num + 1];
        for (int i = 0; i < num; i++)
        {
            array[i] = int_0[i];
        }
        for (int j = 0; j < array_0.GetLength(num); j++)
        {
            array[num] = j;
            Class20.smethod_14(ilist_0, array_0, array);
        }
    }
コード例 #5
0
 public static void MsgWait(string string_0)
 {
     try
     {
         Class20.smethod_3(string_0);
         if (msgForm_0 != null)
         {
             if ((thread_0 != null) && (thread_0.ThreadState != ThreadState.Stopped))
             {
                 if ((thread_0.ThreadState == ThreadState.Running) && msgForm_0.InvokeRequired)
                 {
                     msgForm_0.Invoke(new Delegate4(MessageShow.smethod_1), new object[] { string_0 });
                 }
             }
             else
             {
                 thread_0 = new Thread(new ParameterizedThreadStart(MessageShow.smethod_2));
                 thread_0.Start(string_0);
             }
         }
     }
     catch (Exception exception)
     {
         Class20.smethod_1(exception.ToString());
     }
 }
コード例 #6
0
ファイル: Predicate.cs プロジェクト: 1833183060/autocad-dev
        public static double InCircle2dExact(Point p1, Point p2, Point p3, Point point)
        {
            if (!Class20.bool_0)
            {
                Class20.smethod_0();
            }
            double num   = p1.X - point.X;
            double num2  = p2.X - point.X;
            double num3  = p3.X - point.X;
            double num4  = p1.Y - point.Y;
            double num5  = p2.Y - point.Y;
            double num6  = p3.Y - point.Y;
            double num7  = num2 * num6;
            double num8  = num3 * num5;
            double num9  = num * num + num4 * num4;
            double num10 = num3 * num4;
            double num11 = num * num6;
            double num12 = num2 * num2 + num5 * num5;
            double num13 = num * num5;
            double num14 = num2 * num4;
            double num15 = num3 * num3 + num6 * num6;
            double num16 = num9 * (num7 - num8) + num12 * (num10 - num11) + num15 * (num13 - num14);
            double num17 = (Math.Abs(num7) + Math.Abs(num8)) * num9 + (Math.Abs(num10) + Math.Abs(num11)) * num12 + (Math.Abs(num13) + Math.Abs(num14)) * num15;
            double num18 = Class20.double_5 * num17;

            if (num16 <= num18 && -num16 <= num18)
            {
                return(double.NaN);
            }
            return(num16);
        }
コード例 #7
0
        // Token: 0x06000103 RID: 259 RVA: 0x0000D520 File Offset: 0x0000B720
        internal void method_0()
        {
            JObject jobject = Class20.smethod_4(this.bitmap_0);

            try
            {
                this.jobject_0[this.int_0.ToString()] = new JObject();
                JToken jtoken = this.jobject_0[this.int_0.ToString()];
                object key    = "match";
                bool   value;
                if (jobject["description"]["tags"].Count <JToken>() <= 0)
                {
                    value = false;
                }
                else
                {
                    IEnumerable <JToken> source = jobject["description"]["tags"];
                    Func <JToken, bool>  predicate;
                    if ((predicate = this.func_0) == null)
                    {
                        predicate = (this.func_0 = new Func <JToken, bool>(this.method_1));
                    }
                    value = (source.Where(predicate).Count <JToken>() > 0);
                }
                jtoken[key] = value;
                this.jobject_0[this.int_0.ToString()]["tags"] = jobject["description"]["tags"];
                GClass3.smethod_0("Received answer for image " + this.int_0, "OCR");
            }
            catch
            {
                Console.WriteLine(jobject);
            }
        }
コード例 #8
0
 public static void MsgWait(string string_0)
 {
     try
     {
         Class20.smethod_3(string_0);
         if (msgForm_0 != null)
         {
             if (thread_0.ThreadState != ThreadState.Running)
             {
                 msgForm_0.MessageStr = string_0;
                 msgForm_0.ShowDialog();
                 if (msgForm_0.InvokeRequired)
                 {
                     msgForm_0.Invoke(new Delegate5(MessageShowTT.smethod_0), new object[] { string_0 });
                 }
             }
             else if ((thread_0.ThreadState == ThreadState.Running) && msgForm_0.InvokeRequired)
             {
                 msgForm_0.Invoke(new Delegate5(MessageShowTT.smethod_0), new object[] { string_0 });
             }
         }
     }
     catch (Exception exception)
     {
         Class20.smethod_1(exception.ToString());
     }
 }
コード例 #9
0
ファイル: SignSvrAPI.cs プロジェクト: SoL-Alucard-Git/HX-Base
        public int SignData(IntPtr intptr_0, string string_0, string string_1, out string string_2)
        {
            string_2 = "";
            if (intptr_0 == IntPtr.Zero)
            {
                return(0x25);
            }
            int num = Crypt_Login(intptr_0, string_1);

            if (num != 0)
            {
                Class20.smethod_2(string.Format("签名时登录密码:{0}", string_1));
                return(num);
            }
            byte[]    bytes     = Encoding.GetEncoding("GBK").GetBytes(string_0);
            byte[]    buffer    = new byte[0x400];
            uint      num2      = 0x400;
            DATE_TIME date_time = new DATE_TIME();
            int       num3      = Crypt_SignData(intptr_0, bytes, (uint)bytes.Length, 6, ref date_time, 0, buffer, ref num2);

            if (num3 != 0)
            {
                Class20.smethod_1("=============================SignData:返回值=============================" + num3);
                return(num3);
            }
            string_2 = Convert.ToBase64String(buffer, 0, (int)num2);
            return(num3);
        }
コード例 #10
0
ファイル: Class20.cs プロジェクト: hk1722/CyberAIO-1
        // Token: 0x06000103 RID: 259 RVA: 0x0000E5CC File Offset: 0x0000C7CC
        internal void method_0()
        {
            JObject jobject = Class20.smethod_4(this.bitmap_0);

            try
            {
                this.jobject_0[this.int_0.ToString()] = new JObject();
                JToken jtoken = this.jobject_0[this.int_0.ToString()];
                object key    = Class185.smethod_0(537704272);
                bool   value;
                if (jobject[Class185.smethod_0(537704268)][Class185.smethod_0(537704318)].Count <JToken>() <= 0)
                {
                    value = false;
                }
                else
                {
                    IEnumerable <JToken> source = jobject[Class185.smethod_0(537704268)][Class185.smethod_0(537704318)];
                    Func <JToken, bool>  predicate;
                    if ((predicate = this.func_0) == null)
                    {
                        predicate = (this.func_0 = new Func <JToken, bool>(this.method_1));
                    }
                    value = (source.Where(predicate).Count <JToken>() > 0);
                }
                jtoken[key] = value;
                this.jobject_0[this.int_0.ToString()][Class185.smethod_0(537704318)] = jobject[Class185.smethod_0(537704268)][Class185.smethod_0(537704318)];
                GClass3.smethod_0(Class185.smethod_0(537704297) + this.int_0, Class185.smethod_0(537704074));
            }
            catch
            {
                Console.WriteLine(jobject);
            }
        }
コード例 #11
0
 // Token: 0x060006C8 RID: 1736 RVA: 0x00039058 File Offset: 0x00037258
 private static long smethod_11(string string_0)
 {
     object[] object_ = new object[]
     {
         string_0
     };
     return((long)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoEY@:3Sd", object_));
 }
コード例 #12
0
    // Token: 0x0600057F RID: 1407 RVA: 0x00026EE8 File Offset: 0x000250E8
    public static ConstructorInfo smethod_3(Type type_0, Type type_1)
    {
        Type type_2 = typeof(IList <>).MakeGenericType(new Type[]
        {
            type_1
        });

        return(Class20.smethod_4(type_0, type_1, type_2));
    }
コード例 #13
0
 // Token: 0x06000073 RID: 115 RVA: 0x000086D0 File Offset: 0x000068D0
 public static Task <GEnum2> smethod_6(string string_1, bool bool_0)
 {
     object[] object_ = new object[]
     {
         string_1,
         bool_0
     };
     return((Task <GEnum2>)Class20.smethod_0().method_179(Class20.smethod_1(), "ARoG\\@:3Sg", object_));
 }
コード例 #14
0
        public void Test4()
        {
            int expected = -1;

            int[] input  = null;
            var   actual = Class20.ClosestElement(input, 3);

            Assert.Equal(expected, actual);
        }
コード例 #15
0
        public void Test3()
        {
            int expected = 0;

            int[] input  = new int[] { 2, 4 };
            var   actual = Class20.ClosestElement(input, 3);

            Assert.Equal(expected, actual);
        }
コード例 #16
0
        public void Test1()
        {
            int expected = 3;

            int[] input  = new int[] { 1, 2, 4, 5, 7, 8, 9 };
            var   actual = Class20.ClosestElement(input, 6);

            Assert.Equal(expected, actual);
        }
コード例 #17
0
 // Token: 0x060006C7 RID: 1735 RVA: 0x00039020 File Offset: 0x00037220
 private static void smethod_10(long long_0, byte[] byte_0)
 {
     object[] object_ = new object[]
     {
         long_0,
         byte_0
     };
     Class20.smethod_0().method_93(Class20.smethod_1(), "ARoFt@:3S`", object_);
 }
コード例 #18
0
        public void ComputeHull()
        {
            if (this.pointSet_0 == null)
            {
                throw new InvalidOperationException("Can not compute convex hull: no point set defined.");
            }
            if (this.pointSet_0.Count < 3)
            {
                throw new IndexOutOfRangeException("Can not compute 2d convex hull for less than three points.");
            }
            if (!Class20.bool_0)
            {
                Class20.smethod_0();
            }
            this.pointSet_0.Sort(PointSet.SortOrder.XYZ);
            List <Point> list = new List <Point>();

            list.Add(this.pointSet_0[0]);
            list.Add(this.pointSet_0[1]);
            for (int i = 2; i < this.pointSet_0.Count; i++)
            {
                list.Add(this.pointSet_0[i]);
                int num = list.Count;
                while (num > 2 && this.method_1(list[num - 3], list[num - 2], list[num - 1]))
                {
                    list.RemoveAt(num - 2);
                    num--;
                }
            }
            List <Point> list2 = new List <Point>();

            list2.Add(this.pointSet_0[this.pointSet_0.Count - 1]);
            list2.Add(this.pointSet_0[this.pointSet_0.Count - 2]);
            for (int j = this.pointSet_0.Count - 3; j >= 0; j--)
            {
                list2.Add(this.pointSet_0[j]);
                int num2 = list2.Count;
                while (num2 > 2 && this.method_1(list2[num2 - 3], list2[num2 - 2], list2[num2 - 1]))
                {
                    list2.RemoveAt(num2 - 2);
                    num2--;
                }
            }
            list2.RemoveAt(0);
            list2.RemoveAt(list2.Count - 1);
            this.pointSet_1 = new PointSet();
            for (int k = 0; k < list.Count; k++)
            {
                this.pointSet_1.Add(list[k]);
            }
            for (int l = 0; l < list2.Count; l++)
            {
                this.pointSet_1.Add(list2[l]);
            }
            this.method_2();
        }
コード例 #19
0
ファイル: SignSvrAPI.cs プロジェクト: SoL-Alucard-Git/HX-Base
        public int GetCertInfo(IntPtr intptr_0, CertInfo certInfo_0)
        {
            Class20.smethod_1("=========================读取证书信息开始==========================");
            int num = 0;

            certInfo_0.Nsrsbh = string.Empty;
            certInfo_0.Qsrq   = string.Empty;
            certInfo_0.Jzrq   = string.Empty;
            if (intptr_0 == IntPtr.Zero)
            {
                Class20.smethod_1("=========================句柄为空==========================");
                return(0x25);
            }
            byte[] buffer2 = new byte[0x2800];
            uint   num4    = 0x2800;

            num = Crypt_ReadCert(intptr_0, 2, buffer2, ref num4);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("调用证书接口读取证书{0}", num));
                return(num);
            }
            uint num2 = 0;
            uint num3 = 50;

            byte[] buffer = new byte[50];
            num = GetCertInfo(num4, buffer2, 0x47, ref num2, ref num3, buffer);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("获取证书中的税号 {0}", num));
                return(num);
            }
            certInfo_0.Nsrsbh = Encoding.GetEncoding("GBK").GetString(buffer, 0, (int)num3);
            uint num5 = 50;

            byte[] buffer3 = new byte[50];
            num = GetCertInfo(num4, buffer2, 0x15, ref num2, ref num5, buffer3);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("获取证书证书起始时间 {0}", num));
                return(num);
            }
            certInfo_0.Qsrq = Encoding.GetEncoding("GBK").GetString(buffer3, 0, (int)num5);
            uint num6 = 50;

            byte[] buffer4 = new byte[50];
            num = GetCertInfo(num4, buffer2, 0x16, ref num2, ref num6, buffer4);
            if (num != 0)
            {
                Class20.smethod_1(string.Format("获取证书证书无效时间 {0}", num));
                return(num);
            }
            certInfo_0.Jzrq = Encoding.GetEncoding("GBK").GetString(buffer4, 0, (int)num6);
            Class20.smethod_1("=========================读取证书信息结束==========================");
            return(num);
        }
コード例 #20
0
ファイル: CommonTool.cs プロジェクト: hkloudou/HX-Base
        public static string GetInvSignServer()
        {
            string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "InvSignServer.txt");

            Class20.smethod_1("InvSignServer.txt文件路径:" + path);
            if (File.Exists(path))
            {
                return(File.ReadAllText(path));
            }
            return("Card");
        }
コード例 #21
0
ファイル: CommonTool.cs プロジェクト: hkloudou/HX-Base
        public static string GetCertProvider()
        {
            string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "CertProviderCfg.txt");

            Class20.smethod_1("CertProviderCfg.txt文件路径:" + path);
            if (File.Exists(path))
            {
                return(File.ReadAllText(path));
            }
            return("");
        }
コード例 #22
0
 // Token: 0x060006C6 RID: 1734 RVA: 0x00038FD8 File Offset: 0x000371D8
 private static void smethod_9(long long_0, byte[] byte_0, int int_0, int int_1)
 {
     object[] object_ = new object[]
     {
         long_0,
         byte_0,
         int_0,
         int_1
     };
     Class20.smethod_0().method_93(Class20.smethod_1(), "ARoE[@:3S\\", object_);
 }
コード例 #23
0
ファイル: SignAPI.cs プロジェクト: hkloudou/HX-Base
        public int OpenDevice(ref IntPtr intptr_0, string string_0, string string_1, string string_2)
        {
            int num = -1;

            num = Crypt_OpenDevice(ref intptr_0, string_1, string_2, 1, 0);
            Class20.smethod_1(string.Format("打开设备,返回值:{0},句柄:{1}", num, (IntPtr)intptr_0));
            if (num == 0)
            {
                num = Crypt_Login(intptr_0, string_0);
            }
            return(num);
        }
コード例 #24
0
    // Token: 0x0600058C RID: 1420 RVA: 0x00027298 File Offset: 0x00025498
    public static Array smethod_16(IList ilist_0, Type type_0, int int_0)
    {
        IList <int> list = Class20.smethod_13(ilist_0, int_0);

        while (list.Count < int_0)
        {
            list.Add(0);
        }
        Array array = Array.CreateInstance(type_0, list.ToArray <int>());

        Class20.smethod_14(ilist_0, array, Class20.smethod_17 <int>());
        return(array);
    }
コード例 #25
0
    // Token: 0x0600001B RID: 27 RVA: 0x000030EC File Offset: 0x000012EC
    public static void smethod_1(object[] object_0)
    {
        Class5.bool_1 = false;
        Class8.int_1  = 0;
        if (Class8.queue_0.Count != 0)
        {
            Class20.smethod_7(Class8.queue_0.Dequeue());
        }
        byte[] byte_ = (byte[])object_0[0];
        bool   bool_ = Class8.byte_1 == null || !Class26.smethod_5(Class8.byte_0, byte_);

        Class5.smethod_5(bool_);
    }
コード例 #26
0
 public static void MsgWait()
 {
     try
     {
         if (((msgForm_0 != null) && (thread_0 != null)) && ((thread_0.ThreadState == ThreadState.Running) && msgForm_0.InvokeRequired))
         {
             msgForm_0.Invoke(new Delegate5(MessageShowTT.smethod_1), new object[] { "" });
         }
     }
     catch (Exception exception)
     {
         Class20.smethod_1(exception.ToString());
     }
 }
コード例 #27
0
    // Token: 0x060001CC RID: 460 RVA: 0x0000EA1C File Offset: 0x0000CC1C
    public static List <Class21> smethod_1()
    {
        List <Class21> list = new List <Class21>();

        foreach (string string_ in Dirs.BrowsCookies)
        {
            List <Class21> list2 = Class20.smethod_2(string_);
            if (list2 != null)
            {
                list.AddRange(list2);
            }
        }
        return(list);
    }
コード例 #28
0
ファイル: SignSvrAPI.cs プロジェクト: SoL-Alucard-Git/HX-Base
        public int VerifySignedData(IntPtr intptr_0, string string_0, string string_1)
        {
            if (intptr_0 == IntPtr.Zero)
            {
                return(0x25);
            }
            byte[] buffer = Convert.FromBase64String(string_1);
            byte[] bytes  = Encoding.GetEncoding("GBK").GetBytes(string_0);
            Class20.smethod_1("VerifySignedData验证前");
            int num = Crypt_VerifySignedData(intptr_0, buffer, (uint)buffer.Length, 0, bytes, (uint)bytes.Length, null, 0);

            Class20.smethod_1("VerifySignedData验证后,方法结束" + num);
            return(num);
        }
コード例 #29
0
ファイル: MapperTests.cs プロジェクト: ywscr/linq2db
        public void NoCrossRef([Values] bool useAction)
        {
            var source = new Class20();

            source.Class2 = source.Class1;

            var mapper = new MapHelper <Class20, Class21>().Map(useAction, source, m =>
                                                                m.SetProcessCrossReferences(false));


            Assert.That(mapper.To.Class1, Is.Not.Null);
            Assert.That(mapper.To.Class2, Is.Not.Null);
            Assert.That(mapper.To.Class1, Is.Not.SameAs(mapper.To.Class2));
        }
コード例 #30
0
ファイル: ExpressionMapperTest.cs プロジェクト: x64/bltoolkit
        public void NoCrossRef()
        {
            var mapper = new ExpressionMapper <Class20, Class21> {
                HandleBackReferences = false
            }.GetMapper();
            var source = new Class20();

            source.Class2 = source.Class1;

            var dest = mapper(source);

            Assert.IsNotNull(dest.Class1);
            Assert.IsNotNull(dest.Class2);
            Assert.AreNotSame(dest.Class1, dest.Class2);
        }
コード例 #31
0
		public void NoCrossRef()
		{
			var mapper = new ExpressionMapper<Class20,Class21> { HandleBackReferences = false }.GetMapper();
			var source = new Class20();

			source.Class2 = source.Class1;

			var dest = mapper(source);

			Assert.IsNotNull (dest.Class1);
			Assert.IsNotNull (dest.Class2);
			Assert.AreNotSame(dest.Class1, dest.Class2);
		}