Esempio n. 1
0
 public void method_2(Struct9 A_0)
 {
     this.clipdata_0.intptr_0 = Marshal.AllocHGlobal(this.byte_0.Length);
     Marshal.Copy(this.byte_0, 0, this.clipdata_0.intptr_0, this.byte_0.Length);
     this.clipdata_0.uint_0 = (uint)this.byte_0.Length;
     Marshal.StructureToPtr(this.clipdata_0, A_0.intptr_0, true);
 }
Esempio n. 2
0
    // Token: 0x060005B3 RID: 1459 RVA: 0x000273FC File Offset: 0x000255FC
    private static Func <object, object> smethod_5(Struct9 <Type, Type> struct9_0)
    {
        Class23.Class24 @class   = new Class23.Class24();
        Type            gparam_  = struct9_0.gparam_0;
        Type            gparam_2 = struct9_0.gparam_1;
        MethodInfo      method;

        if ((method = gparam_2.GetMethod("op_Implicit", new Type[]
        {
            gparam_
        })) == null)
        {
            method = gparam_2.GetMethod("op_Explicit", new Type[]
            {
                gparam_
            });
        }
        MethodInfo methodInfo = method;

        if (methodInfo == null)
        {
            return(null);
        }
        @class.delegate1_0 = Class124.smethod_19().vmethod_0 <object>(methodInfo);
        return(new Func <object, object>(@class.method_0));
    }
Esempio n. 3
0
    public void method_0(Struct9 A_0)
    {
        object obj2 = Marshal.PtrToStructure(A_0.intptr_0, typeof(CLIPDATA));

        this.clipdata_0 = (CLIPDATA)obj2;
        this.byte_0     = new byte[this.clipdata_0.uint_0];
        Marshal.Copy(this.clipdata_0.intptr_0, this.byte_0, 0, this.byte_0.Length);
    }
Esempio n. 4
0
    // Token: 0x06000685 RID: 1669 RVA: 0x0002B4A4 File Offset: 0x000296A4
    private static Class52 smethod_0(Struct9 <Type, NamingStrategy> struct9_0)
    {
        Type gparam_ = struct9_0.gparam_0;

        string[] names  = Enum.GetNames(gparam_);
        string[] array  = new string[names.Length];
        ulong[]  array2 = new ulong[names.Length];
        for (int i = 0; i < names.Length; i++)
        {
            string    name  = names[i];
            FieldInfo field = gparam_.GetField(name, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
            array2[i] = Class53.smethod_6(field.GetValue(null));
            string text = field.GetCustomAttributes(typeof(EnumMemberAttribute), true).Cast <EnumMemberAttribute>().Select(new Func <EnumMemberAttribute, string>(Class53.Class54.class54_0.method_0)).SingleOrDefault <string>() ?? field.Name;
            if (Array.IndexOf <string>(array, text, 0, i) != -1)
            {
                throw new InvalidOperationException("Enum name '{0}' already exists on enum '{1}'.".smethod_1(CultureInfo.InvariantCulture, text, gparam_.Name));
            }
            array[i] = ((struct9_0.gparam_1 != null) ? struct9_0.gparam_1.GetPropertyName(text, false) : text);
        }
        return(new Class52(gparam_.IsDefined(typeof(FlagsAttribute), false), array2, names, array));
    }
Esempio n. 5
0
 public static void RequestIdentify(D3Item item)
 {
     Struct9 @struct = new Struct9(item);
     IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(@struct));
     Marshal.StructureToPtr(@struct, intPtr, true);
     Framework.delegate19_0(281u, intPtr, 12);
     Marshal.FreeHGlobal(intPtr);
 }
Esempio n. 6
0
        public StructDateFullInfo GetDateInfo(DateTime d)
        {
            StructDateFullInfo info;
            string             xml     = FileUtil.ReadFileFromEmbedded("WHC.OrderWater.Commons.Others.CCalendarData.xml");
            Struct9            struct2 = this.method_4(d);

            info.IsLeap    = struct2.bool_0;
            info.Year      = d.Year;
            info.Cyear     = struct2.int_0;
            info.Scyear    = this.string_3[(struct2.int_0 - 4) % 12];
            info.CyearCyl  = this.method_6(struct2.int_3);
            info.Month     = d.Month;
            info.Cmonth    = struct2.int_1;
            info.Scmonth   = this.string_0[struct2.int_1];
            info.CmonthCyl = this.method_6(struct2.int_4);
            info.Day       = d.Day;
            info.Cday      = struct2.int_2;
            info.Scday     = this.method_8(struct2.int_2);
            info.CdayCyl   = this.method_6(struct2.int_5);
            switch (d.DayOfWeek)
            {
            case DayOfWeek.Sunday:
                info.DayInWeek = "星期日";
                break;

            case DayOfWeek.Monday:
                info.DayInWeek = "星期一";
                break;

            case DayOfWeek.Tuesday:
                info.DayInWeek = "星期二";
                break;

            case DayOfWeek.Wednesday:
                info.DayInWeek = "星期三";
                break;

            case DayOfWeek.Thursday:
                info.DayInWeek = "星期四";
                break;

            case DayOfWeek.Friday:
                info.DayInWeek = "星期五";
                break;

            case DayOfWeek.Saturday:
                info.DayInWeek = "星期六";
                break;

            default:
                info.DayInWeek = "星期?";
                break;
            }
            int num3 = this.method_7(d.Year, (d.Month * 2) - 1);
            int num4 = this.method_7(d.Year, d.Month * 2);

            if (info.Day == num3)
            {
                info.solarterm = this.string_4[(d.Month * 2) - 2];
            }
            else if (info.Day == num4)
            {
                info.solarterm = this.string_4[(d.Month * 2) - 1];
            }
            else
            {
                info.solarterm = "";
            }
            info.Info     = "";
            info.Feast    = "";
            info.Image    = "";
            info.SayHello = false;
            XmlDocument document = new XmlDocument();

            document.LoadXml(xml);
            foreach (XmlNode node2 in document.SelectNodes("descendant::AD/feast[@day='" + d.ToString("MMdd") + "']"))
            {
                info.Feast = info.Feast + node2.Attributes["name"].InnerText + " ";
                if (node2.Attributes["sayhello"].InnerText == "yes")
                {
                    info.Info = node2["hello"].InnerText;
                    if (node2["startyear"] != null)
                    {
                        int num = Convert.ToInt32(node2["startyear"].InnerText);
                        info.Info = info.Info.Replace("_YEARS_", (d.Year - num).ToString());
                    }
                    info.Image    = node2["img"].InnerText;
                    info.SayHello = true;
                }
            }
            XmlNode node = document.SelectSingleNode("descendant::LUNAR/feast[@day='" + (((info.Cmonth.ToString().Length == 2) ? info.Cmonth.ToString() : ("0" + info.Cmonth.ToString())) + ((info.Cday.ToString().Length == 2) ? info.Cday.ToString() : ("0" + info.Cday.ToString()))) + "']");

            if (node != null)
            {
                info.Feast = info.Feast + node.Attributes["name"].InnerText;
                if (node.Attributes["sayhello"].InnerText == "yes")
                {
                    info.Info     = info.Info + node["hello"].InnerText;
                    info.Image    = node["img"].InnerText;
                    info.SayHello = true;
                }
            }
            if (info.Info == "")
            {
                node = document.SelectSingleNode("descendant::NORMAL/day[@time1<'" + d.ToString("HHmm") + "']");
                if (node != null)
                {
                    info.Info  = node["hello"].InnerText;
                    info.Image = node["img"].InnerText;
                }
            }
            info.Fullinfo = info.Year.ToString() + "年" + info.Month.ToString() + "月" + info.Day.ToString() + "日";
            info.Fullinfo = info.Fullinfo + info.DayInWeek;
            string fullinfo = info.Fullinfo;

            info.Fullinfo = fullinfo + " 农历" + info.CyearCyl + "[" + info.Scyear + "]年";
            if (info.IsLeap)
            {
                info.Fullinfo = info.Fullinfo + "闰";
            }
            info.Fullinfo = info.Fullinfo + info.Scmonth + info.Scday;
            if (info.solarterm != "")
            {
                info.Fullinfo = info.Fullinfo + "  " + info.solarterm;
            }
            return(info);
        }
Esempio n. 7
0
        public StructDateFullInfo GetDateTidyInfo(DateTime d)
        {
            StructDateFullInfo info;
            Struct9            struct2 = this.method_4(d);

            info.IsLeap    = struct2.bool_0;
            info.Year      = d.Year;
            info.Cyear     = struct2.int_0;
            info.Scyear    = this.string_3[(struct2.int_0 - 4) % 12];
            info.CyearCyl  = this.method_6(struct2.int_3);
            info.Month     = d.Month;
            info.Cmonth    = struct2.int_1;
            info.Scmonth   = this.string_0[struct2.int_1];
            info.CmonthCyl = this.method_6(struct2.int_4);
            info.Day       = d.Day;
            info.Cday      = struct2.int_2;
            info.Scday     = this.method_8(struct2.int_2);
            info.CdayCyl   = this.method_6(struct2.int_5);
            switch (d.DayOfWeek)
            {
            case DayOfWeek.Sunday:
                info.DayInWeek = "星期日";
                break;

            case DayOfWeek.Monday:
                info.DayInWeek = "星期一";
                break;

            case DayOfWeek.Tuesday:
                info.DayInWeek = "星期二";
                break;

            case DayOfWeek.Wednesday:
                info.DayInWeek = "星期三";
                break;

            case DayOfWeek.Thursday:
                info.DayInWeek = "星期四";
                break;

            case DayOfWeek.Friday:
                info.DayInWeek = "星期五";
                break;

            case DayOfWeek.Saturday:
                info.DayInWeek = "星期六";
                break;

            default:
                info.DayInWeek = "星期?";
                break;
            }
            info.Info     = "";
            info.Feast    = "";
            info.Image    = "";
            info.SayHello = false;
            int num  = this.method_7(d.Year, (d.Month * 2) - 1);
            int num2 = this.method_7(d.Year, d.Month * 2);

            if (info.Day == num)
            {
                info.solarterm = this.string_4[(d.Month * 2) - 2];
            }
            else if (info.Day == num2)
            {
                info.solarterm = this.string_4[(d.Month * 2) - 1];
            }
            else
            {
                info.solarterm = "";
            }
            info.Fullinfo = info.Year.ToString() + "年" + info.Month.ToString() + "月" + info.Day.ToString() + "日";
            info.Fullinfo = info.Fullinfo + " " + info.DayInWeek;
            string fullinfo = info.Fullinfo;

            info.Fullinfo = fullinfo + " 农历" + info.CyearCyl + "(" + info.Scyear + ")年";
            if (info.IsLeap)
            {
                info.Fullinfo = info.Fullinfo + "闰";
            }
            info.Fullinfo = info.Fullinfo + info.Scmonth + info.Scday;
            if (info.solarterm != "")
            {
                info.Fullinfo = info.Fullinfo + " " + info.solarterm;
            }
            return(info);
        }