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

C# Party类代码示例

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

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



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

示例1: PurchasePrice

        public ProductPurchasePrice PurchasePrice(Party supplier, DateTime orderDate, Product product = null, Part part = null)
        {
            ProductPurchasePrice purchasePrice = null;

            foreach (SupplierOffering supplierOffering in supplier.SupplierOfferingsWhereSupplier)
            {
                if ((supplierOffering.ExistProduct && supplierOffering.Product.Equals(product)) ||
                    (supplierOffering.ExistPart && supplierOffering.Part.Equals(part)))
                {
                    if (supplierOffering.FromDate <= orderDate && (!supplierOffering.ExistThroughDate || supplierOffering.ThroughDate >= orderDate))
                    {
                        foreach (ProductPurchasePrice productPurchasePrice in supplierOffering.ProductPurchasePrices)
                        {
                            if (productPurchasePrice.FromDate <= orderDate && (!productPurchasePrice.ExistThroughDate || productPurchasePrice.ThroughDate >= orderDate))
                            {
                                purchasePrice = productPurchasePrice;
                                break;
                            }
                        }
                    }
                }

                if (purchasePrice != null)
                {
                    break;
                }
            }

            return purchasePrice;
        }
开发者ID:Allors,项目名称:apps,代码行数:30,代码来源:SupplierOfferings.cs


示例2: CreateParty

        public Party CreateParty(string userId, string title, string description, double longitude, double latidude, 
            string locationAddress, DateTime startTime, DateTime creationTime)
        {
            var party = new Party()
            {
                UserId = userId,
                Title = title,
                Description = description,
                Longitude = longitude,
                Latitude = latidude,
                LocationAddress = locationAddress,
                StartTime = startTime,
                CreationTime = creationTime
            };

            var user = this.users
                .All()
                .Where(u => u.Id == userId)
                .FirstOrDefault();

            this.parties.Add(party);
            party.Members.Add(user);
            user.Parties.Add(party);

            this.users.SaveChanges();

            return party;
        }
开发者ID:avalkov,项目名称:IParty,代码行数:28,代码来源:PartiesService.cs


示例3: Overworld

        public Overworld(Party playerParty, Area area)
        {
            if (playerParty == null)
                throw new Exception("Party playerParty cannot be null");

            PlayerParty = playerParty;
            Area = area;

            EnemyParties = new List<Party>();

            states = new Stack<OverworldState>();
            states.Push(new OverworldStates.Menu(this));
            stateChanged = true;

            Map = new Map(100, 100, 5, 5);

            PlayerParty.PrimaryPartyMember.StartOverworld(new Vector2(200.0f));
            addEntity(PlayerParty.PrimaryPartyMember.OverworldEntity);

            camera = new Camera(Game1.ScreenSize);
            camera.Target = playerParty.PrimaryPartyMember.OverworldEntity;

            //populateWithScenery();
            //populateWithEnemies();

            playerInvincibilityTimer = 0.0f;
        }
开发者ID:supermaximo93,项目名称:SuperFantasticSteampunk,代码行数:27,代码来源:Overworld.cs


示例4: OnEnable

	void OnEnable () {
        if (CurrentParty == null)
        {
            CurrentParty = new Party(PhotonNetwork.player);
        }
        nonGmPlayers = new PhotonPlayer[9];
        GmPlayers = new PhotonPlayer[11];
        ConnectedPlayers = PhotonNetwork.playerList;
        int counter = 0;
        int gmcounter = 0;
        foreach (GameObject _object in PlayerButtons)
        {
            _object.SetActive(false);
        }
        foreach (GameObject _object in PartyButtons)
        {
            _object.SetActive(false);
        }
        foreach (PhotonPlayer _player in ConnectedPlayers)
        {
            if (_player.name != "" && _player.name != PhotonNetwork.player.name)
            {
                nonGmPlayers[counter] = _player;
                PlayerButtons[counter].SetActive(true);
                PlayerButtons[counter].GetComponentInChildren<Text>().text = _player.name;
                counter++;
            }
            else if (_player.name != PhotonNetwork.player.name && !_player.isMasterClient)
            {
                GmPlayers[gmcounter] = _player;
                gmcounter++;
            }
        }
        updateCurrentPartyUi();
	}
开发者ID:pShusta,项目名称:TheFellnightPrison,代码行数:35,代码来源:SocialScreen.cs


示例5: CreateBook

 public static void CreateBook(string parent, string bookName, string strategy, string portfolio)
 {
     try
     {
         var exist = Env.Current.StaticData.GetPartyByCode(bookName);
         if (exist != null)
         {
             throw new Exception(String.Format("Book {0} already exists!", bookName));
         }
         else
         {
             var entity = Env.Current.StaticData.GetPartyByCode(parent);
             if (entity == null)
             {
                 throw new Exception("Cannot find entity" + entity);
             }
             var newStrategy = new Party { Code = bookName, Name = bookName, ParentId = entity.Id, Role = Party.Book, Description = "Legacy strategy" };
             newStrategy.SetProperty("Portfolio", portfolio);
             newStrategy.SetProperty("Strategy", strategy);
             Env.Current.StaticData.SaveParty(newStrategy);
             ScriptBase.Logger.InfoFormat("Created book {0} in pfolio {1}.", bookName, portfolio);
         }
     }
     catch (Exception ex)
     {
         ScriptBase.Logger.Error(ex);
     }
 }
开发者ID:heimanhon,项目名称:researchwork,代码行数:28,代码来源:BookFunctions.cs


示例6: BattleInfo

 public BattleInfo(BattleType battleType, Party party1, Party party2)
 {
     _BattleType = battleType;
     _ParticipatingParties = new List<Party>();
     _ParticipatingParties.Add(party1);
     _ParticipatingParties.Add(party2);
 }
开发者ID:LaudableBauble,项目名称:Insipidus,代码行数:7,代码来源:BattleInfo.cs


示例7: Add

        public Party Add(Party item)
        {
            if (item == null)
                throw new ArgumentNullException("Party is null");
            using (Context con = new Context())
            {
                foreach (var ing in item.Menus)
                {
                    if (con.Menu.FirstOrDefault(x => x.Id == ing.Id) == null)
                        throw new ArgumentException("You need to add the menu to the database first: " + ing.Name);
                    if (!con.Menu.FirstOrDefault(x => x.Id == ing.Id).Equals(ing))
                        throw new ArgumentException("You need to update the menu first: " + ing.Name);
                }
                if (con.Address.FirstOrDefault(x => x.Id == item.Address.Id) == null)
                    throw new ArgumentException("You need to add the address to the database first: " + item.Address.StreetAddress);
                if (!con.Address.FirstOrDefault(x => x.Id == item.Address.Id).Equals(item.Address))
                    throw new ArgumentException("You need to update the address first: " + item.Address.StreetAddress);

                if (con.Customer.FirstOrDefault(x => x.Id == item.Customer.Id) == null)
                    throw new ArgumentException("You need to add the customer to the database first: " + item.Customer.FirstName);
                if (!con.Customer.FirstOrDefault(x => x.Id == item.Customer.Id).Equals(item.Customer))
                    throw new ArgumentException("You need to update the customer first: " + item.Customer.FirstName);
            }

            using (Context con = new Context())
            {
                item.Menus.ForEach(x => con.Menu.Find(x.Id));
                con.Address.Attach(item.Address);
                con.Customer.Attach(item.Customer);
                item = con.Party.Add(item);
                con.SaveChanges();
            }
            return item;
        }
开发者ID:nordtorp95,项目名称:ExamProject2015,代码行数:34,代码来源:PartyRepository.cs


示例8: EncounterIntro

 public EncounterIntro(Overworld overworld, Party enemyParty)
     : base(overworld)
 {
     if (enemyParty == null)
         throw new Exception("Party enemyParty cannot be null");
     this.enemyParty = enemyParty;
 }
开发者ID:supermaximo93,项目名称:SuperFantasticSteampunk,代码行数:7,代码来源:EncounterIntro.cs


示例9: recieveCurrentParty

 void recieveCurrentParty(PhotonPlayer[] _players, bool _open)
 {
     List<PhotonPlayer> _players2 = new List<PhotonPlayer>();
     foreach (PhotonPlayer _p in _players) { _players2.Add(_p); }
     Party _party = new Party(_players2, _open);
     GameObject.FindGameObjectWithTag("MenuController").GetComponentInChildren<SocialScreen>().recieveCurrentParty(_party);
 }
开发者ID:pShusta,项目名称:TheFellnightPrison,代码行数:7,代码来源:TurnOnCharacter.cs


示例10: run

        public static void run()
        {
            string answer;
            bool success = false;
            Party p1 = new Party(true),
                  p2 = new Party();

            do
            {
                if (success)
                {
                    heal(p1);
                }
                else
                {
                    p1 = initPlayerParty();
                }

                success = fight(p1, p2);

                Console.WriteLine("\nGo another round? (y/n)");
                answer = Console.ReadLine().ToLower();
                Console.WriteLine();

            } while (answer.Equals("y"));

            Console.Write("Until the next time!");
            Text.userRead();
        }
开发者ID:Johnzo91,项目名称:Text-RPG,代码行数:29,代码来源:Driver.cs


示例11: AddToParty

 public static void AddToParty(FighterData fighter, Party party)
 {
     // TODO: party capacity get.
     if ((party.currentCost + fighter.cost) < GameData.instance.playerData.partyCapacity) {
         party.Add (fighter);
     }
 }
开发者ID:mateoKlab,项目名称:AMD,代码行数:7,代码来源:PartyManager.cs


示例12: HandlePartyInvitationDungeonRequest

 public static void HandlePartyInvitationDungeonRequest(PartyInvitationDungeonRequestMessage message, WorldClient client)
 {
     WorldClient target = WorldServer.Instance.GetOnlineClient(message.name);
     Party p;
     if (client.Character.PartyMember == null)
     {
         WorldServer.Instance.Parties.OrderBy(x => x.Id);
         int partyId = 0;
         if (WorldServer.Instance.Parties.Count > 0)
         {
             partyId = WorldServer.Instance.Parties.Last().Id + 1;
         }
         else
         {
             partyId = 1;
         }
         p = new Party(partyId, client.Character.Id, "");
     }
     else
     {
         p = WorldServer.Instance.Parties.Find(x => x.Id == client.Character.PartyMember.Party.Id);
     }
     if (p == null)
         return;
     p.SetName(DungeonsIdRecord.DungeonsId.Find(x => x.Id == message.dungeonId).Name, client);
     p.CreateInvitation(client, target, PartyTypeEnum.PARTY_TYPE_DUNGEON, message.dungeonId);
     if (p.Members.Count == 0)
     {
         p.BossCharacterId = client.Character.Id;
         p.NewMember(client);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:32,代码来源:PartyHandler.cs


示例13: AddAccountability

        public void AddAccountability(Party parent,Party child)
        {
            Guard.Against<ArgumentNullException>(_partyHierarchyRepository == null, "建構式需指定repository");

            PartyHierarchy partyHierarchy =
                new PartyHierarchy()
                {
                    Level = 1,
                    ParentPartyId = parent.Id,
                    ChildPartyId = child.Id,
                    PartyHierarchyType = PartyHierarchyType.Accountable
                };
            _partyHierarchyRepository.SaveOrUpdate(partyHierarchy);

            IList<PartyHierarchy> allParents = _partyHierarchyRepository.
                Query(q => q.ChildPartyId == parent.Id && q.PartyHierarchyType == PartyHierarchyType.Accountable);

            foreach(var up in allParents)
            {
                PartyHierarchy hierarchy =
                   new PartyHierarchy()
                   {
                       Level = up.Level + 1,
                       ParentPartyId = up.ParentPartyId,
                       ChildPartyId = child.Id,
                       PartyHierarchyType = up.PartyHierarchyType
                   };
                _partyHierarchyRepository.SaveOrUpdate(hierarchy);
            }
        }
开发者ID:ephebe,项目名称:MySecurity,代码行数:30,代码来源:PartyService.cs


示例14: AbilityModifier

 public override double AbilityModifier(Party.DataEquipmentInformation weapon, Party.DataEquipmentInformation armor, Party.DataEquipmentInformation accessory, Ability ability)
 {
     if (ability.IsJumpAttack())
     {
         return 1.25;
     }
     return 1.0;
 }
开发者ID:KHShadowrunner,项目名称:ffrkx,代码行数:8,代码来源:IllustriousDragoon.cs


示例15: Encounter

        public Encounter(Overworld overworld, Party enemyParty)
            : base(overworld)
        {
            this.enemyParty = enemyParty;

            // In here instead of Start() to stop flicker when the state is rendered before Start() is called. The EncounterRenderer doesn't rely on the state of Encounter anyway
            OverworldStateRenderer = new EncounterRenderer(this);
        }
开发者ID:supermaximo93,项目名称:SuperFantasticSteampunk,代码行数:8,代码来源:Encounter.cs


示例16: AbilityModifier

 public override double AbilityModifier(Party.DataEquipmentInformation weapon, Party.DataEquipmentInformation armor, Party.DataEquipmentInformation accessory, Ability ability)
 {
     if (weapon != null && weapon.Category == SchemaConstants.EquipmentCategory.Bow && ability.Category == SchemaConstants.AbilityCategory.BlackMagic)
     {
         return 1.2;
     }
     return 1.0;
 }
开发者ID:KHShadowrunner,项目名称:ffrkx,代码行数:8,代码来源:EtrosIntervention.cs


示例17: MagModifier

 public override double MagModifier(Party.DataEquipmentInformation weapon, Party.DataEquipmentInformation armor, Party.DataEquipmentInformation accessory)
 {
     if (weapon != null && weapon.Category == SchemaConstants.EquipmentCategory.Gun)
     {
         return 1.1;
     }
     return 1.0;
 }
开发者ID:KHShadowrunner,项目名称:ffrkx,代码行数:8,代码来源:FleshUndying.cs


示例18: AbilityModifier

 public override double AbilityModifier(Party.DataEquipmentInformation weapon, Party.DataEquipmentInformation armor, Party.DataEquipmentInformation accessory, Ability ability)
 {
     if (ability.Element == SchemaConstants.ElementID.Fire)
     {
         return 1.1;
     }
     return 1.0;
 }
开发者ID:KHShadowrunner,项目名称:ffrkx,代码行数:8,代码来源:MightOfFire.cs


示例19: AbilityModifier

 public override double AbilityModifier(Party.DataEquipmentInformation weapon, Party.DataEquipmentInformation armor, Party.DataEquipmentInformation accessory, Ability ability)
 {
     if (ability.Category == SchemaConstants.AbilityCategory.Thief)
     {
         return 1.3;
     }
     return 1.0;
 }
开发者ID:KHShadowrunner,项目名称:ffrkx,代码行数:8,代码来源:AlBhedIngenuity.cs


示例20: AbilityModifier

 public override double AbilityModifier(Party.DataEquipmentInformation weapon, Party.DataEquipmentInformation armor, Party.DataEquipmentInformation accessory, Ability ability)
 {
     if (weapon != null && weapon.Category == SchemaConstants.EquipmentCategory.Sword && ability.Formula == SchemaConstants.Formulas.Physical)
     {
         return 1.1;
     }
     return 1.0;
 }
开发者ID:KHShadowrunner,项目名称:ffrkx,代码行数:8,代码来源:SoldierStrike.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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