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


C# Objects类代码示例

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


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


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