• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ContactData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Create

 private Contact Create(ContactData contactData)
 {
     return new Contact
     {
         EmailAddress = contactData.EmailAddress,
         Name = contactData.Name,
         PhoneNumber = contactData.PhoneNumber
     };
 }
开发者ID:AndreasFurster,项目名称:kiwi,代码行数:9,代码来源:ModelFactory.cs


示例17: Add

        protected override void Add(ref ContactData contactCandidate)
        {
            contact.Normal = contactCandidate.Normal;
            contact.PenetrationDepth = contactCandidate.PenetrationDepth;
            contact.Position = contactCandidate.Position;

            contacts.Add(contact);
            OnAdded(contact);
        }
开发者ID:Indiefreaks,项目名称:igf,代码行数:9,代码来源:BoxSphereContactManifold.cs


示例18: CreateContact

 public static Contact CreateContact(ContactData contact)
 {
     contact.Telephone = contact.TelephonePrefix + "-" + contact.Telephone;
     if (!string.IsNullOrWhiteSpace(contact.Fax))
     {
         contact.Fax = contact.FaxPrefix + "-" + contact.Fax;
     }
     return new Contact(contact.FullName, contact.Telephone, contact.Email, contact.Fax);
 }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:9,代码来源:ValueObjectInitializer.cs


示例19: ExporterViewModel

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

            Contact = new ContactData();

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


示例20: ToAddRequest

 public AddContactPersonToOrganisation ToAddRequest()
 {
     var contact = new ContactData
     {   
         FirstName = FirstName,
         LastName = LastName,
         Position = Position
     };
     return new AddContactPersonToOrganisation(OrganisationId, contact);
 }
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:10,代码来源:ContactPersonViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ContactInfo类代码示例发布时间:2022-05-24
下一篇:
C# Contact类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap