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

C# Objects类代码示例

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

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



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

示例1: Send

 public static bool Send(Objects.Client client, uint creatureId, string creatureName)
 {
     RemoveCreatureTextPacket p = new RemoveCreatureTextPacket(client);
     p.CreatureId = creatureId;
     p.CreatureName = creatureName;
     return p.Send();
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:7,代码来源:RemoveCreatureTextPacket.cs


示例2: SaveEl_2

 public static void SaveEl_2(El_2 e, int objId, NPLabDbContext db)
 {
     Database.SetInitializer(new MigrateDatabaseToLatestVersion<NPLabDbContext, Configuration>());
     currObj = (from p in db.Object
                where p.Id == objId
                select p).FirstOrDefault();
     //e.Object = currObj;
     //.ObjectsId = currObj.Id;
     currObj.El_2.Add(e);
     db.Entry(e).State = System.Data.Entity.EntityState.Added;
     foreach (Sectors sec in e.ListOfSectors)
     {
         db.Entry(sec).State = System.Data.Entity.EntityState.Added;
         foreach (Floors f in sec.ListOfFloors)
         {
             db.Entry(f).State = System.Data.Entity.EntityState.Added;
             foreach (Rooms r in f.ListOfRooms)
             {
                 db.Entry(r).State = System.Data.Entity.EntityState.Added;
                 foreach (Installations inst in r.ListOfInstallations) db.Entry(inst).State = System.Data.Entity.EntityState.Added;
             }
         }
     }
     db.SaveChanges();
 }
开发者ID:BorislavRadev,项目名称:NPLab,代码行数:25,代码来源:SaveLoad.cs


示例3: Main

        /// <summary>
        /// Main Method.
        /// </summary>
        public static void Main()
        {
            Objects obj1 = new Objects("gosho", 1);
            Console.WriteLine(obj1.ToString());

            // TODO : add == and != operator
        }
开发者ID:ViktorBarzin,项目名称:HackBulgaria-CSharp,代码行数:10,代码来源:Program.cs


示例4: checkDistance

    private bool checkDistance(Objects obj)
    {
        bool isInRange = true;

        Vector3 distanceToCheck;

        switch (obj)
        {
            case Objects.Start:
                distanceToCheck = startPosition;
                break;
            case Objects.End:
                distanceToCheck = endPosition;
                break;
            // This default block is just for the compiler. It shouldn't execute ever.
            default:
                distanceToCheck = startPosition;
                break;
        }

        // Check x and y distance to the object.

        float xDistance = 0, yDistance = 0;

        xDistance = sphere.transform.position.x - distanceToCheck.x;
        yDistance = sphere.transform.position.y - distanceToCheck.y;

        if (Mathf.Abs(xDistance) > distanceDelta || Mathf.Abs(yDistance) > distanceDelta)
        {
            isInRange = false;
        }

        return isInRange;
    }
开发者ID:potray,项目名称:TFM,代码行数:34,代码来源:StraightLine.cs


示例5: Send

 public static bool Send(Objects.Client client, byte slot, Objects.Item item)
 {
     InventorySetSlotPacket p = new InventorySetSlotPacket(client);
     p.Slot = slot;
     p.Item = item;
     return p.Send();
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:7,代码来源:InventorySetSlotPacket.cs


示例6: MovePacket

        public MovePacket(Objects.Client c, Constants.Direction direction)
            : base(c)
        {
            Direction = direction;

            switch (direction)
            {
                case Tibia.Constants.Direction.Down:
                    Type = OutgoingPacketType.MoveDown;
                    break;
                case Tibia.Constants.Direction.Up:
                    Type = OutgoingPacketType.MoveUp;
                    break;
                case Tibia.Constants.Direction.Right:
                    Type = OutgoingPacketType.MoveRight;
                    break;
                case Tibia.Constants.Direction.Left:
                    Type = OutgoingPacketType.MoveLeft;
                    break;
                case Tibia.Constants.Direction.DownLeft:
                    Type = OutgoingPacketType.MoveDownLeft;
                    break;
                case Tibia.Constants.Direction.DownRight:
                    Type = OutgoingPacketType.MoveDownRight;
                    break;
                case Tibia.Constants.Direction.UpLeft:
                    Type = OutgoingPacketType.MoveUpLeft;
                    break;
                case Tibia.Constants.Direction.UpRight:
                    Type = OutgoingPacketType.MoveUpRight;
                    break;
            }

            Destination = PacketDestination.Server;
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:35,代码来源:MovePacket.cs


示例7: Send

 public static bool Send(Objects.Client client, ChatChannel channel, string name)
 {
     ChannelOpenPacket p = new ChannelOpenPacket(client);
     p.ChannelId = channel;
     p.ChannelName = name;
     return p.Send();
 }
开发者ID:sindromexd,项目名称:simplebot,代码行数:7,代码来源:ChannelOpenPacket.cs


示例8: GetAll

 public static ObjectsCollection GetAll() {
     resourceSchema.Dal.Objects dbo = null;
     try {
         dbo = new resourceSchema.Dal.Objects();
         System.Data.DataSet ds = dbo.Objects_Select_All();
         ObjectsCollection collection = new ObjectsCollection();
         if (GlobalTools.IsSafeDataSet(ds)) {
             for (int i = 0; (i < ds.Tables[0].Rows.Count); i = (i + 1)) {
                 Objects obj = new Objects();
                 obj.Fill(ds.Tables[0].Rows[i]);
                 if ((obj != null)) {
                     collection.Add(obj);
                 }
             }
         }
         return collection;
     }
     catch (System.Exception ) {
         throw;
     }
     finally {
         if ((dbo != null)) {
             dbo.Dispose();
         }
     }
 }
开发者ID:rexwhitten,项目名称:resourceSchema,代码行数:26,代码来源:Objects.generated.cs


示例9: LoadPanes

 void LoadPanes()
 {
     IOptionPane general = new General();
     panes.Add(general);
     IOptionPane objects = new Objects();
     panes.Add(objects);
 }
开发者ID:miniBill,项目名称:DiagramDrawer,代码行数:7,代码来源:OptionsForm.cs


示例10: Send

 public static bool Send(Objects.Client client, uint creatureId, SquareColor color)
 {
     CreatureSquarePacket p = new CreatureSquarePacket(client);
     p.CreatureId = creatureId;
     p.Color = color;
     return p.Send();
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:7,代码来源:CreatureSquarePacket.cs


示例11: Send

 public static bool Send(Objects.Client client, uint playerId, string playerName, byte state)
 {
     VipStatePacket p = new VipStatePacket(client);
     p.PlayerId = playerId;
     p.PlayerName = playerName;
     p.PlayerState = state;
     return p.Send();
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:8,代码来源:VipStatePacket.cs


示例12: Send

        public static bool Send(Objects.Client client, uint iconId)
        {
            RemoveIconPacket p = new RemoveIconPacket(client);

            p.IconId = iconId;

            return p.Send();
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:RemoveIconPacket.cs


示例13: Send

 public static bool Send(Objects.Client client, Objects.Location position, ushort spriteId, byte stackPosition)
 {
     LookAtPacket p = new LookAtPacket(client);
     p.Location = position;
     p.SpriteId = spriteId;
     p.StackPosition = stackPosition;
     return p.Send();
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:LookAtPacket.cs


示例14: Send

 public static bool Send(Objects.Client client, byte fightMode, byte chaseMode, byte safeMode)
 {
     FightModesPacket p = new FightModesPacket(client);
     p.FightMode = fightMode;
     p.ChaseMode = chaseMode;
     p.SafeMode = safeMode;
     return p.Send();
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:8,代码来源:FightModesPacket.cs


示例15: Send

        public static bool Send(Objects.Client client, uint skinId)
        {
            RemoveSkinPacket p = new RemoveSkinPacket(client);

            p.SkinId = skinId;

            return p.Send();
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:RemoveSkinPacket.cs


示例16: Send

        public static bool Send(Objects.Client client, byte[] packet)
        {
            HookSendToServerPacket p = new HookSendToServerPacket(client);

            p.PacketToSend = packet;

            return p.Send();
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:HookSendToServerPacket.cs


示例17: Send

 public static bool Send(Objects.Client client, string message, Objects.Location position, TextColor color)
 {
     AnimatedTextPacket p = new AnimatedTextPacket(client);
     p.Message = message;
     p.Location = position;
     p.Color = color;
     return p.Send();
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:8,代码来源:AnimatedTextPacket.cs


示例18: Send

 public static bool Send(Objects.Client client, Objects.Location fromLocation, Objects.Location toLocation, ProjectileType effect)
 {
     ProjectilePacket p = new ProjectilePacket(client);
     p.FromPosition = fromLocation;
     p.ToPosition = toLocation;
     p.Effect = effect;
     return p.Send();
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:ProjectilePacket.cs


示例19: Send

        public static bool Send(Objects.Client client, Location location, Effect effect)
        {
            MagicEffectPacket p = new MagicEffectPacket(client);
            p.Location = location;
            p.Effect = effect;

            return p.Send();
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:MagicEffectPacket.cs


示例20: Send

        public static bool Send(Objects.Client client, TextMessageColor color, string msg)
        {
            TextMessagePacket p = new TextMessagePacket(client);
            p.Color = color;
            p.Message = msg;

            return p.Send();
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:TextMessagePacket.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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