Ejemplo n.º 1
0
        /// <summary>
        /// 注册一个依赖属性
        /// </summary>
        /// <param name="name">属性名</param>
        /// <param name="propertyType">属性类型</param>
        /// <param name="ownerType">所属类类型</param>
        /// <param name="typeMetadata">注册信息</param>
        /// <param name="validateValueCallback">验证回调</param>
        /// <returns></returns>
        public static DependencyProperty Register(string name, Type propertyType, Type ownerType, PropertyMetadata typeMetadata, ValidateValueCallback validateValueCallback = null)
        {
            var dp = new DependencyProperty(name: name,
                                            propertyType: propertyType,
                                            ownerType: ownerType,
                                            defaultMetadata: typeMetadata,
                                            validateValueCallback: validateValueCallback, readOnly: false);

            Dps.Add(dp);
            return(dp);
        }
Ejemplo n.º 2
0
    public const double WGS84_b = 6356752.3; // Minor semiaxis [m]

    #endregion Fields

    #region Methods

    public static Dps degToDps(double degrees)
    {
        double int_degrees = Math.Floor(degrees);
        double primes = (degrees - int_degrees) * 60.0;
        double int_primes = Math.Floor(primes);
        double seconds = (primes - int_primes) * 60.0;
        double int_seconds = Math.Round(seconds);

        Dps dps = new Dps();

        dps.degrees = (Int16)int_degrees;
        dps.primes = (Int16)int_primes;
        dps.seconds = (Int16)int_seconds;

        return dps;
    }
Ejemplo n.º 3
0
        public static bool IsDps(this GameObject unit)
        {
            var gameObject = unit as Character;

            return(gameObject != null && Dps.Contains(gameObject.CurrentJob));
        }
Ejemplo n.º 4
0
 public static double dpsToDeg(Dps dps)
 {
     return dpsToDeg(dps.degrees, dps.primes, dps.seconds);
 }
Ejemplo n.º 5
0
        public async Task TestDPS()
        {
            var d = new Dps();

            Console.WriteLine(d.onMessage("dps Öìȸ BlackMage"));
        }
Ejemplo n.º 6
0
        public async Task TestCrawl()
        {
            var d = new Dps();

            d.CrawlDpsListAsync(21, 51, "Bard", -1).Wait();
        }