当前位置: 首页>>代码示例>>C#>>正文


C# ContactData类代码示例

本文整理汇总了C#中ContactData的典型用法代码示例。如果您正苦于以下问题:C# ContactData类的具体用法?C# ContactData怎么用?C# ContactData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ContactData类属于命名空间,在下文中一共展示了ContactData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Contact

		internal Contact(ContactData contact, IntPtr relativeTo, long timestamp)
		{
			Area = contact.Area;
			Bounds = contact.Bounds;
			Id = contact.Id;
			MajorAxis = contact.MajorAxis;
			MinorAxis = contact.MinorAxis;
			Orientation = contact.Orientation;
			Hwnd = contact.Hwnd;
			RelativeTo = relativeTo;
			Position = ConvertPosition(contact.Position);

			switch (contact.State)
			{
				case Service.ContactState.New:
					State = ContactState.New;
					break;
				case Service.ContactState.Removed:
					State = ContactState.Removed;
					break;
				case Service.ContactState.Moved:
					State = ContactState.Moved;
					break;
				default:
					throw new ArgumentOutOfRangeException();
			}
			Timestamp = timestamp;
		}
开发者ID:zhuangfangwang,项目名称:ise,代码行数:28,代码来源:Contact.cs

示例2: Setup

 ///<summary>
 /// Sets upt he contact with new information.
 ///</summary>
 ///<param name="candidate">Contact data to initialize the contact with.</param>
 public void Setup(ref ContactData candidate)
 {
     Position = candidate.Position;
     Normal = candidate.Normal;
     PenetrationDepth = candidate.PenetrationDepth;
     Id = candidate.Id;
 }
开发者ID:Indiefreaks,项目名称:igf,代码行数:11,代码来源:Contact.cs

示例3: Contact

 public JsonResult Contact(string MyChecked)
 {
     Contact n = new Contact();
     ContactData nd = new ContactData();
     var array = MyChecked.Split(',');
     if (MyChecked != "" && MyChecked != null)
     {
         for (var i = 0; i < array.Length; i++)
         {
             //var Original = nd.Get().ToList().Where(a => a.num.ToString() == array[i]).SingleOrDefault();
             //var DelPath = System.IO.Path.Combine(Server.MapPath("~/upload/News/"), Original.pic1);
             //System.IO.File.Delete(DelPath);
             //if (Original.jsonimg != "no_img.jpg")
             //{
             //    var jsonstr = JsonConvert.DeserializeObject<List<jsonSer>>(Original.jsonimg);
             //    var DelJsonPath = Server.MapPath("~/upload/photograhy/");
             //    foreach (var j in jsonstr)
             //    {
             //        var DelJsonPathing = System.IO.Path.Combine(DelJsonPath, j.content);
             //        System.IO.File.Delete(DelJsonPathing);
             //    }
             //}
             n.isdel = 1;
             n.udate = DateTime.Now;
             n.num = Convert.ToInt32(array[i]);
             nd.Delete(n);
         }
     }
     return Json("");
 }
开发者ID:boy22200011,项目名称:funnmtbProject,代码行数:30,代码来源:DelisCheckController.cs

示例4: Contact

 public JsonResult Contact(string MyChecked)
 {
     Contact ct = new Contact();
     ContactData ctd = new ContactData();
     var array = MyChecked.Split(',');
     if (MyChecked != "" && MyChecked != null)
     {
         for (var i = 0; i < array.Length; i++)
         {
             //var Original = dred.Get().ToList().Where(a => a.num.ToString() == array[i]).SingleOrDefault();
             ////var DelPath = System.IO.Path.Combine(Server.MapPath("~/upload/dressdesign/"), Original.img);
             ////System.IO.File.Delete(DelPath);
             //if (Original.jsonimg != "no_img.jpg")
             //{
             //    var jsonstr = JsonConvert.DeserializeObject<List<jsonSer>>(Original.jsonimg);
             //    var DelJsonPath = Server.MapPath("~/upload/dressdesign/");
             //    foreach (var j in jsonstr)
             //    {
             //        var DelJsonPathing = System.IO.Path.Combine(DelJsonPath, j.content);
             //        System.IO.File.Delete(DelJsonPathing);
             //    }
             //}
             ct.num = Convert.ToInt32(array[i]);
             ctd.Delete(ct);
         }
     }
     return Json("");
 }
开发者ID:boy22200011,项目名称:jojo,代码行数:28,代码来源:DelisCheckController.cs

示例5: FindMapping

        /// <summary>
        /// Find a mapping for a given contactdata object
        /// We use different methods to find a skype handle
        /// </summary>
        /// <param name="contact"></param>
        /// <returns></returns>
        public string FindMapping(ContactData contact)
        {
            // Extract skypeName from TFS Power Tools 2012 custom id
            string skypeNameCustomId = FindSkypeUserByCustomId(contact);
            if (!string.IsNullOrEmpty(skypeNameCustomId))
            {
                return skypeNameCustomId;
            }

            // Find skypename from 2012 skype provider mapping file
            string skypeName2012Mapping = FindSkypeUserIn2012MappingFile(contact);
            if (!string.IsNullOrEmpty(skypeName2012Mapping))
            {
                return skypeName2012Mapping;
            }

            // Find skypename from old 2008 + 2010 skype provider mapping file
            string skypeName2008Mapping = FindSkypeUserIn20082010MappingFile(contact);
            if (!string.IsNullOrEmpty(skypeName2008Mapping))
            {
                return skypeName2008Mapping;
            }

            // Find skypename in Skype contact list
            string skypeNameFromSkypeContactList = FindSkypeUserInSkypeContactList(contact);
            if (!string.IsNullOrEmpty(skypeNameFromSkypeContactList))
            {
                return skypeNameFromSkypeContactList;
            }

            // Found nothing
            Logger.Write(string.Format("Found no mapping for user {0}.", contact.Name));
            return string.Empty;
        }
开发者ID:TfsCollab,项目名称:SkypeProvider,代码行数:40,代码来源:SkypeNameResolver.cs

示例6: AreSpheresColliding

        /// <summary>
        /// Computes contact data for two spheres.
        /// </summary>
        /// <param name="a">First sphere.</param>
        /// <param name="b">Second sphere.</param>
        /// <param name="positionA">Position of the first sphere.</param>
        /// <param name="positionB">Position of the second sphere.</param>
        /// <param name="contact">Contact data between the spheres, if any.</param>
        /// <returns>Whether or not the spheres are touching.</returns>
        public static bool AreSpheresColliding(SphereShape a, SphereShape b, ref Vector3 positionA, ref Vector3 positionB, out ContactData contact)
        {
            contact = new ContactData();

            float radiusSum = a.collisionMargin + b.collisionMargin;
            Vector3 centerDifference;
            Vector3.Subtract(ref positionB, ref positionA, out centerDifference);
            float centerDistance = centerDifference.LengthSquared();

            if (centerDistance < (radiusSum + CollisionDetectionSettings.maximumContactDistance) * (radiusSum + CollisionDetectionSettings.maximumContactDistance))
            {
                //In collision!

                if (radiusSum > Toolbox.Epsilon) //This would be weird, but it is still possible to cause a NaN.
                    Vector3.Multiply(ref centerDifference, a.collisionMargin / (radiusSum), out  contact.Position);
                else contact.Position = new Vector3();
                Vector3.Add(ref contact.Position, ref positionA, out contact.Position);

                centerDistance = (float)Math.Sqrt(centerDistance);
                if (centerDistance > Toolbox.BigEpsilon)
                {
                    Vector3.Divide(ref centerDifference, centerDistance, out contact.Normal);
                }
                else
                {
                    contact.Normal = Toolbox.UpVector;
                }
                contact.PenetrationDepth = radiusSum - centerDistance;

                return true;

            }
            return false;
        }
开发者ID:Indiefreaks,项目名称:igf,代码行数:43,代码来源:SphereTester.cs

示例7: Events_InitialCollisionDetected

        private void Events_InitialCollisionDetected(EntityCollidable sender, Collidable info, CollidablePairHandler pair, ContactData contact)
        {
            try
            {
                //var contact = pair.Contacts[0].Contact;

                //if(contact.PenetrationDepth>2f)
                //DebugSystem.Instance.DebugCommandUI.Echo(contact.PenetrationDepth.ToString());

                // Select collisionInformation for object in contact with instead of the ships own collisionInformation
                Collidable candidate = (pair.BroadPhaseOverlap.EntryA == racerEntity.CollisionInformation ? pair.BroadPhaseOverlap.EntryB : pair.BroadPhaseOverlap.EntryA) as Collidable;
                if (candidate.Equals(Physics.currentTrackFloor))
                {

                    ReactToTrackHit(contact);
                }
                else if (candidate.Equals(Physics.currentTrackWall))
                {
                    ReactToWallHit(contact);
                }
                else
                {

                    ReactToShipShipCollision(contact, candidate);
                }
            }
            catch (Exception e)
            {
                // System.Diagnostic.Debug.WriteLine("Unfound pair");
            }
        }
开发者ID:Jamedjo,项目名称:BeatShift,代码行数:31,代码来源:ShipPhysics_CollisionDetected.cs

示例8: getContactList

        public List<ContactData> getContactList()
        {
            if (contactCache == null)
            {
                short i = -1;
                contactCache = new List<ContactData>();
                ICollection<IWebElement> elements = driver.FindElements(By.XPath("//div[@class='contactInfo']/div[@class='name']"));

                foreach (IWebElement element in elements)
                {
                    ContactData contact = new ContactData()
                    {
                        ID = ++i
                    };
                    contactCache.Add(contact);
                }

                string allContactNames = driver.FindElement(By.CssSelector("div#contactsContainer")).Text;
                string[] parts = allContactNames.Split('\n');

                for (int j = 0; j < parts.Length; j++)
                {
                    parts[j] = parts[j].Replace("\r", "");
                }

                string[] newParts = parts.Where(w => w.Length > 2).ToArray();

                for (int j = 0; j < contactCache.Count; j++)
                {
                    contactCache[j].FirstName = newParts[j];
                }
            }

            return new List<ContactData>(contactCache);
        }
开发者ID:JonyLogy,项目名称:PlaxoTest,代码行数:35,代码来源:ContactHelper.cs

示例9: ContactPersonViewModel

 public ContactPersonViewModel(ContactData contactPerson)
 {
     OrganisationId = contactPerson.OrganisationId;
     FirstName = contactPerson.FirstName;
     LastName = contactPerson.LastName;
     Position = contactPerson.Position;
 }
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:7,代码来源:ContactPersonViewModel.cs

示例10: Add

 protected virtual void Add(ref ContactData contactCandidate)
 {
     Contact adding = unusedContacts.Take();
     adding.Setup(ref contactCandidate);
     contacts.Add(adding);
     OnAdded(adding);
 }
开发者ID:d3x0r,项目名称:Voxelarium,代码行数:7,代码来源:ContactManifold.cs

示例11: EditCarrierViewModel

        public EditCarrierViewModel()
        {
            Address = new AddressData();

            Contact = new ContactData();

            Business = new BusinessTypeViewModel();
        }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:8,代码来源:EditCarrierViewModel.cs

示例12: ImporterViewModel

        public ImporterViewModel()
        {
            Address = new AddressData();

            Contact = new ContactData();

            Business = new BusinessTypeViewModel();
        }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:8,代码来源:ImporterViewModel.cs

示例13: ImporterData

        public ImporterData()
        {
            Address = new AddressData();

            Contact = new ContactData();

            Business = new BusinessInfoData();
        }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:8,代码来源:ImporterData.cs

示例14: EditFacilityViewModel

        public EditFacilityViewModel()
        {
            Address = new AddressData();

            Contact = new ContactData();

            Business = new BusinessTypeViewModel();
        }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:8,代码来源:EditFacilityViewModel.cs

示例15: EditProducerViewModel

        public EditProducerViewModel()
        {
            Address = new AddressData();

            Contact = new ContactData();

            Business = new ProducerBusinessTypeViewModel();
        }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:8,代码来源:EditProducerViewModel.cs


注:本文中的ContactData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。