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


C# Client类代码示例

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


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

示例1: GetNotes

 public static async Task<Note[]> GetNotes(Client client, string orderId)
 {
     return
         (await
             client.MakeGetRequest<Notes>(client.ConcatAccountPath(string.Format("{0}/{1}/notes", PortOutPath, orderId))))
             .List;
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:7,代码来源:ImportToAccount.cs

示例2: Mesh

        /// <summary>
        /// Create a new mesh for the given client using shader as the default shader
        /// </summary>
        /// <param name="client"></param>
        /// <param name="shader"></param>
        public Mesh(Client client, Shader shader)
        {
            Client = client;
            Shader = shader;

            Id = CSycles.scene_add_mesh(Client.Id, Client.Scene.Id, Client.Scene.GetShaderSceneId(shader));
        }
开发者ID:jesterKing,项目名称:CCSycles,代码行数:12,代码来源:Mesh.cs

示例3: HandleDoProcessStart

        public static void HandleDoProcessStart(Packets.ServerPackets.DoProcessStart command, Client client)
        {
            if (string.IsNullOrEmpty(command.Processname))
            {
                new Packets.ClientPackets.SetStatus("Process could not be started!").Execute(client);
                return;
            }

            try
            {
                ProcessStartInfo startInfo = new ProcessStartInfo
                {
                    UseShellExecute = true,
                    FileName = command.Processname
                };
                Process.Start(startInfo);
            }
            catch
            {
                new Packets.ClientPackets.SetStatus("Process could not be started!").Execute(client);
            }
            finally
            {
                HandleGetProcesses(new Packets.ServerPackets.GetProcesses(), client);
            }
        }
开发者ID:nhymxu,项目名称:xRAT,代码行数:26,代码来源:SystemHandler.cs

示例4: VM

 public VM()
 {
     //get a handler to the Lync Client, then subscribe to state changes.
     _client = LyncClient.GetClient();
     _client.StateChanged += _client_StateChanged;
     SubscribetoPresenceIfSignedIn(_client.State);
 }
开发者ID:NALSS,项目名称:LyncPauseMusicOnCall,代码行数:7,代码来源:VM.cs

示例5: FrmRemoteWebcam

        public FrmRemoteWebcam(Client c)
        {
            _connectClient = c;
            _connectClient.Value.FrmWebcam = this;

            InitializeComponent();
        }
开发者ID:GeekGalaxy,项目名称:QuasarRAT,代码行数:7,代码来源:FrmRemoteWebcam.cs

示例6: Main

 public static void Main(Client client)
 {
     foreach (var vip in client.Vip.GetCharacters())
     {
         client.Vip.Remove(vip);
     }
 }
开发者ID:KyLuaa,项目名称:bot,代码行数:7,代码来源:VipRemoveAll.cs

示例7: Start

 void Start()
 {
     Application.runInBackground = true;
     client = new Client(PORT, "192.168.1.101");
     client.Work();
     sendMessage = forPrint;
 }
开发者ID:comradgrey,项目名称:Chat,代码行数:7,代码来源:Chat.cs

示例8: SaveSpells

 public static void SaveSpells(Client.GameState client)
 {
     if (client.Entity == null)
         return;
     if (client.Spells == null)
         return;
     if (client.Spells.Count == 0)
         return;
     foreach (Interfaces.ISkill spell in client.Spells.Values)
     {
         if(spell.Available)
         {
             MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
             cmd.Update("skills").Set("Level", spell.Level).Set("PreviousLevel", spell.PreviousLevel)
                 .Set("Experience", spell.Experience).Where("EntityID", client.Entity.UID).And("ID", spell.ID).Execute();
         }
         else
         {
             spell.Available = true;
             MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
             cmd.Insert("skills").Insert("Level", spell.Level).Insert("Experience", spell.Experience).Insert("EntityID", client.Entity.UID)
                 .Insert("Type", "Spell").Insert("ID", spell.ID).Execute();
         }
     }
 }
开发者ID:faresali,项目名称:co-pserver,代码行数:25,代码来源:Copy+of+SkillTable.cs

示例9: Read

 protected override void Read(Client client, NReader rdr)
 {
     Time = rdr.ReadInt32();
     BulletId = rdr.ReadByte();
     ObjectId = rdr.ReadInt32();
     TargetId = rdr.ReadInt32();
 }
开发者ID:BlackRayquaza,项目名称:MMOE,代码行数:7,代码来源:OtherHitPacket.cs

示例10: HandleDoDownloadFile

        public static void HandleDoDownloadFile(Packets.ServerPackets.DoDownloadFile command, Client client)
        {
            new Thread(() =>
            {
                try
                {
                    FileSplit srcFile = new FileSplit(command.RemotePath);
                    if (srcFile.MaxBlocks < 0)
                        new Packets.ClientPackets.DoDownloadFileResponse(command.ID, "", new byte[0], -1, -1,
                            srcFile.LastError).Execute(client);

                    for (int currentBlock = 0; currentBlock < srcFile.MaxBlocks; currentBlock++)
                    {
                        if (!client.Connected) return;
                        if (_canceledDownloads.ContainsKey(command.ID)) return;

                        byte[] block;
                        if (srcFile.ReadBlock(currentBlock, out block))
                        {
                            new Packets.ClientPackets.DoDownloadFileResponse(command.ID,
                                Path.GetFileName(command.RemotePath), block, srcFile.MaxBlocks, currentBlock,
                                srcFile.LastError).Execute(client);
                        }
                        else
                            new Packets.ClientPackets.DoDownloadFileResponse(command.ID, "", new byte[0], -1, -1,
                                srcFile.LastError).Execute(client);
                    }
                }
                catch (Exception ex)
                {
                    new Packets.ClientPackets.DoDownloadFileResponse(command.ID, "", new byte[0], -1, -1, ex.Message)
                        .Execute(client);
                }
            }).Start();
        }
开发者ID:nhymxu,项目名称:xRAT,代码行数:35,代码来源:FileHandler.cs

示例11: StreamFetcher

 public StreamFetcher(DataServiceContextWrapper context, EntityBase entity, string propertyName, Client.DataServiceStreamLink link)
 {
     _context = context;
     _entity = entity;
     _link = link;
     _propertyName = propertyName;
 }
开发者ID:iambmelt,项目名称:Vipr,代码行数:7,代码来源:StreamFetcher.cs

示例12: ChangeDungeonCoords

        public static void ChangeDungeonCoords(Client client, Enums.Direction dir)
        {
            int dist = 1;
            int rand = Server.Math.Rand(1, 10000);
            if (rand <= 66) { //.66% chance warp
                exPlayer.Get(client).DungeonX = Server.Math.Rand(0, exPlayer.Get(client).DungeonMaxX-1);
                exPlayer.Get(client).DungeonY = Server.Math.Rand(0, exPlayer.Get(client).DungeonMaxY-1);
                return;
            } else if (rand <= 666) { //6% chance skip
                dist = 2;
            }

            if (dir == Enums.Direction.Up) {
                exPlayer.Get(client).DungeonY = exPlayer.Get(client).DungeonY - dist;
                if (exPlayer.Get(client).DungeonY < 0) {
                    exPlayer.Get(client).DungeonY += exPlayer.Get(client).DungeonMaxY;
                }
            } else if (dir == Enums.Direction.Down) {
                exPlayer.Get(client).DungeonY = (exPlayer.Get(client).DungeonY + dist) % exPlayer.Get(client).DungeonMaxY;
            } else if (dir == Enums.Direction.Left) {
                exPlayer.Get(client).DungeonX = exPlayer.Get(client).DungeonX - dist;
                if (exPlayer.Get(client).DungeonX < 0) {
                    exPlayer.Get(client).DungeonX += exPlayer.Get(client).DungeonMaxX;
                }
            } else if (dir == Enums.Direction.Right) {
                exPlayer.Get(client).DungeonX = (exPlayer.Get(client).DungeonX + dist) % exPlayer.Get(client).DungeonMaxX;
            }
        }
开发者ID:ScruffyKnight,项目名称:PMU-Server,代码行数:28,代码来源:PitchBlackAbyss.cs

示例13: UserInfo

 public UserInfo(string user, string pass, Client conn)
 {
     this.UserName = user;
     this.Password = pass;
     this.LoggedIn = true;
     this.Connection = conn;
 }
开发者ID:ristokippa,项目名称:Instant_Messenger,代码行数:7,代码来源:UserInfo.cs

示例14: CanCalculate

        public void CanCalculate()
        {
            var client = new Client(new Uri(AmeeUrl), AmeeUserName, AmeePassword);
            var value = client.Calculate("transport/defra/fuel", "9DE1D9435784", new ValueItem("volume", "10"));

            Assert.AreEqual(value.Amounts.Amount[0].Value, "4.7385");
        }
开发者ID:bitpusher,项目名称:AMEE,代码行数:7,代码来源:DefraFixture.cs

示例15: Form1

        public Form1()
        {
            InitializeComponent();

            // Turn on key preview
            this.KeyPreview = true;

            // Allocate Kinect data structure for speed
            data = new KinectData();

            // Allocate bitmaps for speed
            //!! Should use System.Windows.Media.Imaging.WriteableBitmap
            colorBitmap = new Bitmap(640, 480, PixelFormat.Format24bppRgb);
            depthBitmap = new Bitmap(640, 480, PixelFormat.Format24bppRgb);
            testBitmap = new Bitmap(640, 480, PixelFormat.Format24bppRgb);
            demoBitmap = new Bitmap(640, 480, PixelFormat.Format24bppRgb);

            // Set up session parameters
            SessionParameters sessionParams = new SessionParameters(KinectDataParams.EnableType.All);
            sessionParams.DataParams.validityImageEnable = false;
            sessionParams.DataParams.testImageEnable = false;

            // Connect to a local Kinect and hook up to the data event
            client = KinectTableNet.KinectTable.ConnectLocal(sessionParams);
            client.DataReady += new Client.DataReadyHandler(client_DataReady);

            return;
        }
开发者ID:AaronGenest,项目名称:KinectArms,代码行数:28,代码来源:Form1.cs


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