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


C# ContactInfo类代码示例

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


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

示例1: GetContactList

        public List<ContactInfo> GetContactList()
        {
            List<ContactInfo> contacts = new List<ContactInfo>();
            // System.Console.WriteLine("Before FetchContact {0}", m_handle);
            BulletHelper_FetchContact(m_handle);
            uint numEntries = m_collisionsPinned[1];
            uint offsetStride = m_collisionsPinned[2];
            uint offset = 3;     // size of header (max, cnt, stride)
            for (int ii = 0; ii < numEntries ; ii++)
            {
                ContactInfo ci = new ContactInfo();
                ci.contact = m_collisionsPinned[offset + 0];
                ci.contactWith = m_collisionsPinned[offset + 1];
                ci.pX = m_collisionsPinned[offset + 2] / 1000.0f;
                ci.pY = m_collisionsPinned[offset + 3] / 1000.0f;
                ci.pZ = m_collisionsPinned[offset + 4] / 1000.0f;
                ci.nX = m_collisionsPinned[offset + 5] / 1000.0f;
                ci.nY = m_collisionsPinned[offset + 6] / 1000.0f;
                ci.nZ = m_collisionsPinned[offset + 7] / 1000.0f;
                ci.depth = m_collisionsPinned[offset + 8] / 1000.0f;
                offset += offsetStride;
                // if collision info is zero, don't pass the info up
                // if (ci.X == 0 && ci.Y == 0 && ci.Z == 0) continue;
                contacts.Add(ci);
            }

            return contacts;
        }
开发者ID:Belxjander,项目名称:Asuna,代码行数:28,代码来源:ContactAddedCallbackHandler.cs

示例2: MirandaDatabaseEventArgs

 public MirandaDatabaseEventArgs(ContactInfo contact, DatabaseEventInfo eventInfo) : base(contact)
 {
     if (eventInfo == null) 
         throw new ArgumentNullException("eventInfo");
                 
     this.eventInfo = eventInfo;
 }
开发者ID:tomasdeml,项目名称:hyphen,代码行数:7,代码来源:MirandaDatabaseEventArgs.cs

示例3: VMContactInfo

 public VMContactInfo(ContactInfo c)
 {
     Title = c.Title;
     Information = c.Information;
     Id = c.Id;
     UserId = c.UserId;
 }
开发者ID:Jeremy29229,项目名称:Portfolio-Unleashed,代码行数:7,代码来源:VMContactInfo.cs

示例4: MirandaContactEventArgs

        public MirandaContactEventArgs(ContactInfo contactInfo)
        {
            if (contactInfo == null) 
                throw new ArgumentNullException("contactInfo");

            this.contactInfo = contactInfo;
        }
开发者ID:tomasdeml,项目名称:hyphen,代码行数:7,代码来源:MirandaContactEventArgs.cs

示例5: EditForm_OnAfterValidate

    protected void EditForm_OnAfterValidate(object sender, EventArgs e)
    {
        // Test if selected date is not empty
        if (ValidationHelper.GetString(EditForm.GetFieldValue("ActivityCreated"), String.Empty) == String.Empty)
        {
            ShowError(GetString("om.sctivity.selectdatetime"));
            StopProcessing = true;
        }

        // Ignore contact selector value when there is contactId in query string (contact selector should be hidden in this case due to its visibility condition)
        int queryContactID = QueryHelper.GetInteger("ContactID", 0);
        if (queryContactID > 0)
        {
            mContact = ContactInfoProvider.GetContactInfo(queryContactID);
        }
        else
        {
            int contactID = ValidationHelper.GetInteger(EditForm.GetFieldValue("ActivityActiveContactID"), 0);
            mContact = ContactInfoProvider.GetContactInfo(contactID);
        }

        // Test if selected contact exists
        if (mContact == null)
        {
            ShowError(GetString("om.activity.contactdoesnotexist"));
            StopProcessing = true;
        }
    }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:28,代码来源:Edit.ascx.cs

示例6: ShowAwayMessage

        public static bool ShowAwayMessage(ContactInfo contact)
        {
            int result = MirandaContext.Current.CallService(MS_AWAYMSG_SHOWAWAYMSG, contact.MirandaHandle, IntPtr.Zero);
            Debug.Assert(result == 0);

            return result == 0;
        }
开发者ID:tomasdeml,项目名称:hyphen,代码行数:7,代码来源:ProtocolStatus.cs

示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        ci = (ContactInfo)EditedObject;
        CheckReadPermission(ci.ContactSiteID);

        globalContact = (ci.ContactSiteID <= 0);
        mergedContact = (ci.ContactMergedWithContactID > 0);
        modifyAllowed = ContactHelper.AuthorizedModifyContact(ci.ContactSiteID, false);

        contactId = QueryHelper.GetInteger("contactid", 0);

        string where = null;
        // Filter only site members in CMSDesk (for global contacts)
        if (!IsSiteManager && globalContact && AuthorizedForSiteContacts)
        {
            where += " (ContactSiteID IS NULL OR ContactSiteID=" + CMSContext.CurrentSiteID + ")";
        }

        // Choose correct object ("query") according to type of contact
        if (globalContact)
        {
            gridElem.ObjectType = OnlineMarketingObjectType.MEMBERSHIPGLOBALCUSTOMERLIST;
        }
        else if (mergedContact)
        {
            gridElem.ObjectType = OnlineMarketingObjectType.MEMBERSHIPMERGEDCUSTOMERLIST;
        }
        else
        {
            gridElem.ObjectType = OnlineMarketingObjectType.MEMBERSHIPCUSTOMERLIST;
        }

        // Query parameters
        QueryDataParameters parameters = new QueryDataParameters();
        parameters.Add("@ContactId", contactId);

        gridElem.WhereCondition = where;
        gridElem.QueryParameters = parameters;
        gridElem.OnAction += new OnActionEventHandler(gridElem_OnAction);
        gridElem.OnExternalDataBound += new OnExternalDataBoundEventHandler(gridElem_OnExternalDataBound);

        // Hide header actions for global contact
        CurrentMaster.HeaderActionsPlaceHolder.Visible = modifyAllowed && !globalContact && !mergedContact;

        // Setup customer selector
        try
        {
            ucSelectCustomer = (FormEngineUserControl)Page.LoadUserControl("~/CMSModules/Ecommerce/FormControls/CustomerSelector.ascx");
            ucSelectCustomer.SetValue("Mode", "OnlineMarketing");
            ucSelectCustomer.SetValue("SiteID", ci.ContactSiteID);
            ucSelectCustomer.Changed += new EventHandler(ucSelectCustomer_Changed);
            ucSelectCustomer.IsLiveSite = false;
            pnlSelectCustomer.Controls.Clear();
            pnlSelectCustomer.Controls.Add(ucSelectCustomer);
        }
        catch
        {
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:59,代码来源:Customers.aspx.cs

示例8: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        CheckUIElementAccessHierarchical(ModuleName.ONLINEMARKETING, "ContactMembership.Subscribers");
        ci = (ContactInfo)EditedObject;
        if (ci == null)
        {
            RedirectToAccessDenied(GetString("general.invalidparameters"));
        }

        CheckReadPermission(ci.ContactSiteID);

        globalContact = (ci.ContactSiteID <= 0);
        mergedContact = (ci.ContactMergedWithContactID > 0);
        modifyAllowed = ContactHelper.AuthorizedModifyContact(ci.ContactSiteID, false);

        contactId = QueryHelper.GetInteger("contactid", 0);

        string where = null;
        // Filter only site members in CMSDesk (for global contacts)
        if (!IsSiteManager && globalContact && AuthorizedForSiteContacts)
        {
            where = " (ContactSiteID IS NULL OR ContactSiteID=" + SiteContext.CurrentSiteID + ")";
        }

        // Choose correct object ("query") according to type of contact
        if (globalContact)
        {
            gridElem.ObjectType = ContactMembershipGlobalSubscriberListInfo.OBJECT_TYPE;
        }
        else if (mergedContact)
        {
            gridElem.ObjectType = ContactMembershipMergedSubscriberListInfo.OBJECT_TYPE;
        }
        else
        {
            gridElem.ObjectType = ContactMembershipSubscriberListInfo.OBJECT_TYPE;
        }

        // Query parameters
        QueryDataParameters parameters = new QueryDataParameters();
        parameters.Add("@ContactId", contactId);

        gridElem.WhereCondition = where;
        gridElem.QueryParameters = parameters;
        gridElem.OnAction += gridElem_OnAction;
        gridElem.OnExternalDataBound += gridElem_OnExternalDataBound;

        // Hide header actions for global contact or merged contact.
        CurrentMaster.HeaderActionsPlaceHolder.Visible = modifyAllowed && !globalContact && !mergedContact;

        // Setup subscriber selector
        selectSubscriber.UniSelector.SelectionMode = SelectionModeEnum.MultipleButton;
        selectSubscriber.UniSelector.OnItemsSelected += UniSelector_OnItemsSelected;
        selectSubscriber.UniSelector.ReturnColumnName = "SubscriberID";
        selectSubscriber.UniSelector.DisplayNameFormat = "{%SubscriberFullName%} ({%SubscriberEmail%})";
        selectSubscriber.ShowSiteFilter = false;
        selectSubscriber.IsLiveSite = false;
        selectSubscriber.SiteID = ci.ContactSiteID;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:59,代码来源:Subscribers.aspx.cs

示例9: addContactInfo

 public void addContactInfo(ContactInfo c, int userID)
 {
     using (var db = new PortfolioUnleashedContext())
     {
         db.Users.Include("ContactInfoes").Include("Educations").Include("Links").Include("Portfolios").Include("QuickReferences").FirstOrDefault(user => user.Id == userID).ContactInfoes.Add(c);
         db.SaveChanges();
     }
 }
开发者ID:Jeremy29229,项目名称:Portfolio-Unleashed,代码行数:8,代码来源:DatabaseDAL.cs

示例10: CCSDATA

        public CCSDATA(ContactInfo contact, string serviceName)
        {
            this.ContactHandle = contact.MirandaHandle;
            this.ServiceNamePtr = new UnmanagedStringHandle(serviceName, StringEncoding.Ansi).IntPtr;

            this.WParam = UIntPtr.Zero;
            this.LParam = IntPtr.Zero;
        }
开发者ID:tomasdeml,项目名称:hyphen,代码行数:8,代码来源:CCSDATA.cs

示例11: ValidatePhoneNumber

        public static ValidationResult ValidatePhoneNumber(ContactInfo contact)
        {
            bool isValid = !contact.ShowPhoneNumber || !string.IsNullOrEmpty(contact.PhoneNumber);

            if (isValid)
                return ValidationResult.Success;
            else
                return new ValidationResult("The Phone field is required when it is made visible on the listing.");
        }
开发者ID:wes-cutting,项目名称:Sandbox-V2,代码行数:9,代码来源:ContactInfoValidation.cs

示例12: OnInit

 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     ContactInfo contact = new ContactInfo();
     MacroResolver resolver = MacroContext.CurrentResolver.CreateChild();
     resolver.SetNamedSourceData("Contact", contact);
     DescriptionMacroEditor.Resolver = resolver;
     DescriptionMacroEditor.Editor.Language = LanguageEnum.Text;
 }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:9,代码来源:Description.ascx.cs

示例13: UserCallback

 public override bool UserCallback(Body body, float distance, Vector3 normal, int collisionID)
 {
     ContactInfo contact = new ContactInfo();
       contact.Distance = distance;
       contact.Body = body;
       contact.Normal = normal;
       Contacts.Add(contact);
       return true;
 }
开发者ID:janPierdolnikParda,项目名称:RPG,代码行数:9,代码来源:Raycaster.cs

示例14: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        ci = (ContactInfo)EditedObject;
        CheckReadPermission(ci.ContactSiteID);

        globalContact = (ci.ContactSiteID <= 0);
        mergedContact = (ci.ContactMergedWithContactID > 0);
        modifyAllowed = ContactHelper.AuthorizedModifyContact(ci.ContactSiteID, false);

        contactId = QueryHelper.GetInteger("contactid", 0);

        string where = null;
        // Filter only site members in CMSDesk (for global contacts)
        if (!IsSiteManager && globalContact && AuthorizedForSiteContacts)
        {
            where = " (ContactSiteID IS NULL OR ContactSiteID=" + CMSContext.CurrentSiteID + ")";
        }

        // Choose correct object ("query") according to type of contact
        if (globalContact)
        {
            gridElem.ObjectType = OnlineMarketingObjectType.MEMBERSHIPGLOBALSUBSCRIBERLIST;
        }
        else if (mergedContact)
        {
            gridElem.ObjectType = OnlineMarketingObjectType.MEMBERSHIPMERGEDSUBSCRIBERLIST;
        }
        else
        {
            gridElem.ObjectType = OnlineMarketingObjectType.MEMBERSHIPSUBSCRIBERLIST;
        }

        // Query parameters
        QueryDataParameters parameters = new QueryDataParameters();
        parameters.Add("@ContactId", contactId);

        gridElem.WhereCondition = where;
        gridElem.QueryParameters = parameters;
        gridElem.OnAction += new OnActionEventHandler(gridElem_OnAction);
        gridElem.OnExternalDataBound += new OnExternalDataBoundEventHandler(gridElem_OnExternalDataBound);

        // Hide header actions for global contact
        CurrentMaster.HeaderActionsPlaceHolder.Visible = modifyAllowed && !globalContact && !mergedContact;

        // Setup subscriber selector
        selectSubscriber.UniSelector.SelectionMode = SelectionModeEnum.MultipleButton;
        selectSubscriber.UniSelector.OnItemsSelected += new EventHandler(UniSelector_OnItemsSelected);
        selectSubscriber.UniSelector.ReturnColumnName = "SubscriberID";
        selectSubscriber.UniSelector.DisplayNameFormat = "{%SubscriberFullName%} ({%SubscriberEmail%})";
        selectSubscriber.UniSelector.ButtonImage = GetImageUrl("Objects/Newsletter_Subscriber/add.png");
        selectSubscriber.UniSelector.DialogLink.CssClass = "MenuItemEdit";
        selectSubscriber.ShowSiteFilter = false;
        selectSubscriber.UniSelector.DialogButton.CssClass = "LongButton";
        selectSubscriber.IsLiveSite = false;
        selectSubscriber.SiteID = ci.ContactSiteID;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:56,代码来源:Subscribers.aspx.cs

示例15: MirandaContactSettingEventArgs

        public MirandaContactSettingEventArgs(ContactInfo contactInfo, string name, string owner, object value, DatabaseSettingType valueType)
            : base(contactInfo)
        {
            if (String.IsNullOrEmpty(name))
                throw new ArgumentNullException("name");

            this.settingName = name;
            this.settingOwner = owner;
            this.value = value;
            this.valueType = valueType;
        }
开发者ID:tomasdeml,项目名称:hyphen,代码行数:11,代码来源:MirandaContactSettingEventArgs.cs


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