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

C# IContact类代码示例

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

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



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

示例1: ContactViewModel

 protected ContactViewModel(ChatClient client, IContact contact)
 {
     this.client = client;
     this.contact = contact;
     Contact.Changed += OnContactChanged;
     OnContactChanged(Contact, null);
 }
开发者ID:npcook,项目名称:infinichat-client,代码行数:7,代码来源:ContactViewModel.cs


示例2: FileTransfer

        public FileTransfer(XmppClientConnection xmppCon, IQ iq, IContact from)
            : base(from)
        {
            _siIq = iq;
            _si = iq.SelectSingleElement(typeof (SI)) as SI;

            if (_si != null)
            {
                // get SID for file transfer
                _sid = _si.Id;
                _file = _si.File;

                Contact = from;

                if (_file != null)
                {
                    _fileLength = _file.Size;

                    FileDescription = _file.Description;
                    FileName = _file.Name;
                }

                _xmppConnection = xmppCon;
            }
        }
开发者ID:erpframework,项目名称:xeus-messenger2,代码行数:25,代码来源:FileTransfer.cs


示例3: Message

 protected internal Message(IContact contact, string text, DateTime time, bool online)
 {
     Contact = contact;
     Text = text;
     Online = online;
     Time = time;
 }
开发者ID:accursoft,项目名称:Unified-IM,代码行数:7,代码来源:Message.cs


示例4: TestBase

        public TestBase()
        {
            var builder = new ContainerBuilder();
               builder.RegisterType<DatabaseFactory>().As<IDatabaseFactory>().InstancePerLifetimeScope();
               builder.RegisterType<UnityOfWork>().As<IUnitOfWork>();

               builder.RegisterType<ContactRepostory>().AsImplementedInterfaces();
               builder.RegisterType<ContactServices>().AsImplementedInterfaces();
               builder.RegisterType<ProductRepository>().AsImplementedInterfaces();
               builder.RegisterType<LodgingRepository>().AsImplementedInterfaces();
               builder.RegisterType<ResortRepository>().AsImplementedInterfaces();

               builder.RegisterType<ProductService>().AsImplementedInterfaces();
               builder.RegisterType<LodgingService>().AsImplementedInterfaces();
               builder.RegisterType<ResortService>().AsImplementedInterfaces();

               #region 权限
               builder.RegisterType<PermissionModuleRepository>().AsImplementedInterfaces();
               builder.RegisterType<PermissionRoleRepository>().AsImplementedInterfaces();
               builder.RegisterType<PermissionReRoleModuleRepostory>().AsImplementedInterfaces();
               builder.RegisterType<PermissionSvc>().AsImplementedInterfaces();
               #endregion
               container= builder.Build();
               this.unitOfWork = container.Resolve<IUnitOfWork>();
               this.contact=container.Resolve<IContact>();
               this.productsvc=container.Resolve<IProduct>();
               this.resortSvc = container.Resolve<IResort>();
               this.lodgingsvc = container.Resolve<ILodging>();
               this.permissionSvc = container.Resolve<IPermission>();
             //  StartUp();
        }
开发者ID:Jan307,项目名称:permissionrepository,代码行数:31,代码来源:TestBase.cs


示例5: CanDelete

        public OperationResult CanDelete([PexAssumeUnderTest] ContactManager target, IContact contact)
        {
            OperationResult result = target.CanDelete(contact);
            return result;

            // TODO: add assertions to method ContactManagerTest.CanDelete(ContactManager, IContact)
        }
开发者ID:theoju,项目名称:CleanCode,代码行数:7,代码来源:ContactManagerTest.cs


示例6: GroupsOpenUI

        public void GroupsOpenUI(IContact contact)
        {
            GroupsWindow groupsWindow = new GroupsWindow(contact);

            groupsWindow.Activate();
            groupsWindow.ShowDialog();
        }
开发者ID:erpframework,项目名称:xeus-messenger2,代码行数:7,代码来源:Groups.cs


示例7: CreateShortenedContactName

        private string CreateShortenedContactName(IContact contact)
        {
            List<string> names = new List<string>();
            foreach (string namePart in new string[] { contact.FirstName, contact.MiddleName, contact.LastName})
            {
                if (!string.IsNullOrEmpty(namePart))
                {
                    names.Add(namePart);
                }
            }
            if (names.Count == 0)
            {
                return contact.DisplayName;
            }

            string name;
            if (names.Count == 1)
            {
                name = names[0];
            }
            else // if (names.Count > 1)
            {
                char lastInitial = names[names.Count - 1][0];
                name = string.Format("{0} {1}.", names[0], lastInitial);
            }

            name = TruncateNameIfTooLong(name);
            return name;
        }
开发者ID:jzajac2,项目名称:AllYourTexts,代码行数:29,代码来源:ConversationDescriptionHelper.cs


示例8: GroupsWindow

        public GroupsWindow(IContact contact)
            : base(_keyBase, string.Empty)
        {
            DataContext = contact;

            InitializeComponent();
        }
开发者ID:erpframework,项目名称:xeus-messenger2,代码行数:7,代码来源:GroupsWindow.xaml.cs


示例9: Handle

		public IPreviewResult Handle(IContact contact)
		{
			Point transformedCoordinates;
			IntPtr hWnd = desktop.GetWindowAt(new Point((int)contact.X, (int)contact.Y), out transformedCoordinates);

			if (new SystemWindow(hWnd).WindowState == FormWindowState.Normal)
			{
				switch (contact.State)
				{
					case ContactState.New:
						OnNewContact(hWnd, contact);
						break;
					case ContactState.Removed:
						OnContactRemoved(hWnd, contact);
						break;
					case ContactState.Moved:
						OnContactMoved(hWnd, contact);
						break;
					default:
						throw new ArgumentOutOfRangeException();
				}
			}
			TransformedContact newContact = new TransformedContact(contact);
			newContact.X = transformedCoordinates.X;
			newContact.Y = transformedCoordinates.Y;
			return new Result(hWnd, newContact);
		}
开发者ID:zhuangfangwang,项目名称:ise,代码行数:27,代码来源:InputPreviewHandler.cs


示例10: GetFundRedemptionsStep

        public static void GetFundRedemptionsStep(IContact contact, out System.Collections.Generic.IList<Sage.Entity.Interfaces.IContactFundRedemptions> result)
        {
            //Get a list of all fund redemptions for this contact
               Sage.Platform.RepositoryHelper<Sage.Entity.Interfaces.IContactFundRedemptions> f = Sage.Platform.EntityFactory.GetRepositoryHelper<Sage.Entity.Interfaces.IContactFundRedemptions>();
               Sage.Platform.Repository.ICriteria crit = f.CreateCriteria();

               crit.Add(f.EF.Eq("ContactId", contact.Id.ToString()));

               result = crit.List<Sage.Entity.Interfaces.IContactFundRedemptions>();

               //Calculate the total values
               double totalRedemptions = (Double)(from h in result
                                           select h.TotalRedemptions).Distinct().Sum();
               int totalAccounts = (Int32)(from h in result
                                       select h.TotalNumberOfAccounts).Distinct().Sum();
               double totalYTDRedemptions = (Double)(from h in result
                                                select h.TotalYTDRedemptions).Distinct().Sum();

               //Add the totals to the the result set
               Sage.Entity.Interfaces.IContactFundRedemptions totalItem = Sage.Platform.EntityFactory.Create<Sage.Entity.Interfaces.IContactFundRedemptions>();
               totalItem.RepCode = "-";
               totalItem.FundName = "All";
               totalItem.FundCode = "-";
               totalItem.Redemptions = totalRedemptions;
               totalItem.NumberOfAccounts = totalAccounts;
               totalItem.YTDRedemptions = totalYTDRedemptions;

               result.Add(totalItem);
        }
开发者ID:ssommerfeldt,项目名称:TAC_AH,代码行数:29,代码来源:ContactExtension.cs


示例11: OpenUserChat

        public void OpenUserChat(IContact friend)
        {
            if (MainChatViewModel == null) MainChatViewModel = new MainChatViewModel();

            if (!MainChatViewModel.IsActive)
            {
                _windowManager.ShowWindow(MainChatViewModel);
                MainChatView = MainChatViewModel.GetView() as Window;
            }
            else
            {
                if (MainChatView != null)
                {
                    if (MainChatView.WindowState == WindowState.Minimized) MainChatView.WindowState = WindowState.Normal;
                    MainChatView.Activate();
                }
            }

            var tab = (from f in OpenTabs where f.Key == friend.UserId select f).FirstOrDefault();

            // tab does exist ... Key == UserId
            if (tab.Key != 0)
            {
                int tabIndex = OpenTabs.FirstOrDefault(t => t.Value == tab.Key).Value;
                MainChatViewModel.Items.ElementAt(tabIndex).Activate();
                return;
            }

            MainChatViewModel.OpenTab(this, friend);
            OpenTabs.Add(friend.UserId, MainChatViewModel.Items.Count - 1);
        }
开发者ID:Jallah,项目名称:FOWA,代码行数:31,代码来源:ContactViewModel.cs


示例12: CompareAlphabetically

        public static int CompareAlphabetically(IContact contactA, IContact contactB)
        {
            int unknownCompare = CompareForUnknownContact(contactA, contactB);
            if (unknownCompare != 0)
            {
                return unknownCompare;
            }

            List<string> contactAParts = GetNamePartsFromContact(contactA);
            List<string> contactBParts = GetNamePartsFromContact(contactB);

            int compareResult;

            while ((contactAParts.Count > 0) && (contactBParts.Count > 0))
            {
                string aPart = contactAParts[0];
                string bPart = contactBParts[0];

                compareResult = string.Compare(aPart, bPart);
                if (compareResult != 0)
                {
                    return compareResult;
                }

                contactAParts.RemoveAt(0);
                contactBParts.RemoveAt(0);
            }

            if (contactAParts.Count != contactBParts.Count)
            {
                return contactAParts.Count - contactBParts.Count;
            }

            return string.Compare(contactA.PhoneNumbers[0].Number, contactB.PhoneNumbers[0].Number);
        }
开发者ID:jzajac2,项目名称:AllYourTexts,代码行数:35,代码来源:ContactComparer.cs


示例13: VerifyRightSideGreater

        private static void VerifyRightSideGreater(IContact contactA, IContact contactB)
        {
            int comparisonValue = ContactComparer_Accessor.CompareAlphabetically(contactA, contactB);
            int unitValue = ReduceToUnitValue(comparisonValue);

            Assert.AreEqual(1, unitValue);
        }
开发者ID:jzajac2,项目名称:AllYourTexts,代码行数:7,代码来源:ContactComparerTest.cs


示例14: Update

        public void Update(IContact entity)
        {
            var contact = contacts.SingleOrDefault(g => g.Id == entity.Id);

            contact.FirstName = entity.FirstName;
            contact.LastName = entity.LastName;
        }
开发者ID:GiantRobots,项目名称:layered-ntier,代码行数:7,代码来源:MockContactRepository.cs


示例15: Conversation

        internal Conversation(ChatClient client, IContact who, ConversationEvents events)
        {
            this.client = client;
            this.events = events;
            Name = who.Name;
            Contact = who;

            events.UserAdded += OnUserAdded;
            events.UserChanged += OnUserChanged;
            events.UserRemoved += OnUserRemoved;
            events.UserTyping += OnUserTyping;
            events.ChatReceived += OnChatReceived;

            if (Contact is IUser)
            {
                participants.Add(new Participant(Contact as IUser));
            }
            else
            {
                foreach (var member in (Contact as IGroup).Members)
                {
                    participants.Add(new Participant(member));
                }
            }
        }
开发者ID:npcook,项目名称:infinichat-client,代码行数:25,代码来源:Conversation.cs


示例16: ContactSendingOption

 public ContactSendingOption(IContact contact, SendableDocumentCategories sendableDocumentCategory, 
                               SendingOptions sendingOption, bool value)
 {
     Contact = contact;
     SendableDocumentCategory = sendableDocumentCategory;
     SendingOption = sendingOption;
     Value = value;
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:8,代码来源:ContactSendingOption.cs


示例17: TwitterProfileViewModel

        public TwitterProfileViewModel(IMicroblog source, IContact contact, TwitterClient twitterClient)
            : this()
        {
            _twitterClient = twitterClient;

            Source = source;
            Contact = contact;
        }
开发者ID:nickhodge,项目名称:MahTweets.LawrenceHargrave,代码行数:8,代码来源:TwitterProfileViewModel.cs


示例18: WindowContact

		public WindowContact(IContact copy)
		{
			Id = copy.Id;
			Position = new Point(copy.X, copy.Y);
			Width = copy.Width;
			Height = copy.Height;
			State = copy.State;
		}
开发者ID:zhuangfangwang,项目名称:ise,代码行数:8,代码来源:WindowContact.cs


示例19: Contact

 public Contact(IContact other)
 {
     FullName = other.FullName;
     foreach (string email in other.Emails)
     {
         addMail(email);
     }
 }
开发者ID:KrishPS,项目名称:GContactSync,代码行数:8,代码来源:Contact.cs


示例20: UserChatViewModel

 public UserChatViewModel(ContactViewModel caller, IContact user)
 {
     base.DisplayName = user.Nick;
     ContactViewModel = caller;
     User = user;
     CharCounter = Settings.ClientSettings.Default.CharMax;
     _connection = FowaConnection.Instance;
 }
开发者ID:Jallah,项目名称:FOWA,代码行数:8,代码来源:UserChatViewModel.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IContactRepository类代码示例发布时间:2022-05-24
下一篇:
C# IConsumer类代码示例发布时间: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