當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。