xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 4.70M
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2020-12-26
  • 語言: C#
  • 標簽: Socket??ck??OC??網絡??象棋??

資源簡介

主要參考大廳部分的設計。象棋游戲部分可網絡對戰旁觀,沒啥參考意義。
界面沒做,只是簡單用了幾個組件,只是為了說明問題。
由于代碼寫的不滿意,以后還要返工,就沒寫文檔了,
自行代碼里看注釋,主要就是帶Globa的文件。
如重新寫,需引用System.Runtime.Serialization。
代碼Game開頭的文件為大廳,CHESS開頭的為游戲部分。
CrossThreadCall.cs為跨線程文件,Game_Control.cs為雙緩存組件
websocket-sharp-master文件夾為websocket源碼,
可在https://github.com/sta/websocket-sharp獲取最新版

1、使用:
首先,運行Game_Server文件夾Game_Server.EXE,點擊開始服務,
ip地址可按你的網絡地址自行填寫,服務端、客戶端填寫一致就可以了。

客戶端,運行Game_Client文件夾的Game_Client.EXE,
用戶名1000至1029,密碼:123456

2、規則:
可選擇紅或藍或旁觀,
房間內沒有紅或藍,則不能旁觀,
如對局者點擊退出,則該房間內全部人員退出房間(提示忘寫了,自己加上去)。

選擇紅或藍進入房間后,首先等待對方加入(有提示顯示),
如果房間湊齊2名對局者,則等待雙點擊“開始”(有提示顯示),
雙方都點擊開始后,進行游戲(每個用戶點擊均有提示顯示),
用戶對戰分為對戰和旁觀推送不同消息。

客戶端:每有用戶房間變化,在左側顯示每個房間人數、全部用戶的狀態,
右側房間顯示每個房間的變化情況。

3、其他
數據包為
public class Package
    {
        [DataMember]
        public string Socket;
        [DataMember]
        public string Name;
        [DataMember]
        public string Pasword;
        [DataMember]
        public string Id;
        [DataMember]
        public int Room;
        [DataMember]
        public Pieces_Type Wield;
        [DataMember]
        public State_Type State;
        [DataMember]
        public string UserSerializer;
        [DataMember]
        public string RoomSerializer;
        [DataMember]
        public Login_State LoginState;
        [DataMember]
        public Room_State RoomState;
        [DataMember]
        public string Take;

        // 對局相關
        [DataMember]
        public bool Active;
        [DataMember]
        public string PiecesSerializer;
        [DataMember]
        public int Index;
    }
序列化為json,加密傳輸,密鑰在StringEncrypt.cs文件,
如修改,服務端、客戶端密鑰需改為一致。

代碼看登錄、房間相關就可以了,對局相關可忽略。
大廳設計沒有想象中的簡單,總寫不好,想法是大廳可以掛接其他雙人游戲

加Q,常交流:3532927017。



資源截圖

代碼片段和文件信息

using?System;
using?System.Drawing;
using?System.Windows.Forms;

namespace?Game_Client
{
????public?partial?class?Chess_Play?:?Form
????{
????????public?RichTextBox?Rich_Info?=?new?RichTextBox();
????????public?Label[]?label_info?=?new?Label[3];
????????public?Button[]?button?=?new?Button[2];

????????public?PanelEx?Qipan_Panel;
????????public?int?index?=?-1;
????????private?bool?drag?=?false;
????????private?Bitmap?index_bmp?=?new?Bitmap(59?59);

????????public?Chess_Play(int?type)
????????{
????????????InitializeComponent();
????????
????????????this.FormBorderstyle?=?FormBorderstyle.FixedDialog;
????????????this.Size?=?new?Size(1078?752);
????????????this.DoubleBuffered?=?true;
????????????this.StartPosition?=?FormStartPosition.CenterScreen;
????????????this.M

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????142??2020-05-06?06:03??websocket-sharp-master\.gitignore

????..A..H.?????22016??2020-05-22?09:25??websocket-sharp-master\.vs\websocket-sharp\v15\.suo

?????文件??????????0??2020-05-22?09:24??websocket-sharp-master\.vs\websocket-sharp\v15\Server\sqlite3\db.lock

?????文件???????4096??2020-05-22?09:24??websocket-sharp-master\.vs\websocket-sharp\v15\Server\sqlite3\storage.ide

?????文件??????32768??2020-05-22?09:24??websocket-sharp-master\.vs\websocket-sharp\v15\Server\sqlite3\storage.ide-shm

?????文件?????918792??2020-05-22?09:24??websocket-sharp-master\.vs\websocket-sharp\v15\Server\sqlite3\storage.ide-wal

?????文件????????985??2020-05-06?06:03??websocket-sharp-master\Backup\Example\AssemblyInfo.cs

?????文件???????2959??2020-05-06?06:03??websocket-sharp-master\Backup\Example\Example.csproj

?????文件????????336??2020-05-06?06:03??websocket-sharp-master\Backup\Example\NotificationMessage.cs

?????文件???????1678??2020-05-06?06:03??websocket-sharp-master\Backup\Example\Notifier.cs

?????文件???????4366??2020-05-06?06:03??websocket-sharp-master\Backup\Example\Program.cs

?????文件????????986??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\AssemblyInfo.cs

?????文件???????4973??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\AudioStreamer.cs

?????文件???????1551??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\BinaryMessage.cs

?????文件???????3236??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\Example1.csproj

?????文件????????337??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\NotificationMessage.cs

?????文件???????1679??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\Notifier.cs

?????文件????????845??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\Program.cs

?????文件????????512??2020-05-06?06:03??websocket-sharp-master\Backup\Example1\TextMessage.cs

?????文件????????214??2020-05-06?06:03??websocket-sharp-master\Backup\Example2\App.config

?????文件????????986??2020-05-06?06:03??websocket-sharp-master\Backup\Example2\AssemblyInfo.cs

?????文件???????1036??2020-05-06?06:03??websocket-sharp-master\Backup\Example2\Chat.cs

?????文件????????349??2020-05-06?06:03??websocket-sharp-master\Backup\Example2\Echo.cs

?????文件???????2802??2020-05-06?06:03??websocket-sharp-master\Backup\Example2\Example2.csproj

?????文件???????4950??2020-05-06?06:03??websocket-sharp-master\Backup\Example2\Program.cs

?????文件????????269??2020-05-06?06:03??websocket-sharp-master\Backup\Example3\App.config

?????文件????????986??2020-05-06?06:03??websocket-sharp-master\Backup\Example3\AssemblyInfo.cs

?????文件???????1036??2020-05-06?06:03??websocket-sharp-master\Backup\Example3\Chat.cs

?????文件????????349??2020-05-06?06:03??websocket-sharp-master\Backup\Example3\Echo.cs

?????文件???????2986??2020-05-06?06:03??websocket-sharp-master\Backup\Example3\Example3.csproj

............此處省略403個文件信息

評論

共有 條評論