コード例 #1
0
 //RuleInfo CurrentRule { get { return m_Rules.First(r => r.Name == CurrentVariant); } }
 public CreateTableTabControl(string playerName, LobbyTypeEnum lobby, GameInfo game)
 {
     m_LobbyType = lobby;
     m_Game = game;
     InitializeComponent();
     txtTableName.Text = playerName + Resources.CreateTableTabControl_CreateTableTabControl__Table;
     InitVariants();
     RefreshNumbers();
     grpQuickMode.Visible = lobby == LobbyTypeEnum.QuickMode;
 }
コード例 #2
0
ファイル: Table.cs プロジェクト: BluffinMuffin/Logger
 public Table(string tableName, GameSubTypeEnum gameSubType, int minPlayersToStart, int maxPlayers, BlindTypeEnum blindType, LobbyTypeEnum lobbyType, LimitTypeEnum limitType, Server server)
 {
     TableName = tableName;
     GameSubType = gameSubType;
     MinPlayersToStart = minPlayersToStart;
     MaxPlayers = maxPlayers;
     BlindType = blindType;
     LobbyType = lobbyType;
     LimitType = limitType;
     Server = server;
 }
コード例 #3
0
        public CreateTableForm(string playerName, LobbyTypeEnum lobby, IEnumerable<GameInfo> games)
        {
            Params = null;
            InitializeComponent();

            var infos = games as GameInfo[] ?? games.ToArray();
            foreach (var type in infos.Select(r => r.GameType).Distinct())
            {
                var t = type.ToString();
                var tp = new TabPage(t) { Name = "tab" + t, BackColor = Color.White };
                tp.Controls.Add(new CreateTableTabControl(playerName, lobby, infos.First(r => r.GameType.ToString() == t)) { Dock = DockStyle.Fill });
                tabControl1.TabPages.Add(tp);
            }
        }
コード例 #4
0
ファイル: MyMultiplayer.cs プロジェクト: caomw/SpaceEngineers
        public static MyMultiplayerHostResult HostLobby(LobbyTypeEnum lobbyType, int maxPlayers, MySyncLayer syncLayer)
        {
            System.Diagnostics.Debug.Assert(syncLayer != null);
            MyTrace.Send(TraceWindow.Multiplayer, "Host game");

            MyMultiplayerHostResult ret = new MyMultiplayerHostResult();
            SteamSDK.Lobby.Create(lobbyType, maxPlayers, (lobby, result) =>
            {
                if (!ret.Cancelled)
                {
                    if (result == Result.OK && lobby.GetOwner() != MySteam.UserId)
                    {
                        result = Result.Fail;
                        lobby.Leave();
                    }

                    MyTrace.Send(TraceWindow.Multiplayer, "Lobby created");
                    lobby.SetLobbyType(lobbyType);
                    ret.RaiseDone(result, result == Result.OK ? MyMultiplayer.Static = new MyMultiplayerLobby(lobby, syncLayer) : null);
                }
            });
            return ret;
        }
コード例 #5
0
 public override void SetLobbyType(LobbyTypeEnum type)
 {
     Lobby.SetLobbyType(type);
 }
コード例 #6
0
        protected MyOnlineModeEnum GetOnlineMode(LobbyTypeEnum lobbyType)
        {
            switch (lobbyType)
            {
                case LobbyTypeEnum.Private: return MyOnlineModeEnum.PRIVATE;
                case LobbyTypeEnum.FriendsOnly: return MyOnlineModeEnum.FRIENDS;
                case LobbyTypeEnum.Public: return MyOnlineModeEnum.PUBLIC;

                case LobbyTypeEnum.Invisible:
                default:
                    Debug.Fail("Invalid branch.");
                    return MyOnlineModeEnum.PUBLIC;
            }
        }
コード例 #7
0
        public unsafe bool SetLobbyType(LobbyTypeEnum type)
         {
             //IsUdtReturn false;
             //if (this.GetOwner() != num)
             //{
             //    return false;
             //}
             //ISteamMatchmaking* type2 = <Module>.SteamMatchmaking();
             //CSteamID lobbyId = this.LobbyId;
             //bool success = calli(System.Byte modopt(System.Runtime.CompilerServices.CompilerMarshalOverride) modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,CSteamID,ELobbyType), type2, lobbyId, type, *(*(long*)type2 + 264L));

             bool success = false;
             if (success)
             {
                 this.SetLobbyData("LobbyType", ((LobbyTypeEnum)type).ToString());
             }
             return success;
         }
コード例 #8
0
        // public unsafe static Result ConvertLobby(LobbyCreated_t* lobby, ref Lobby result)
        // {
        //     return false;
        // }

        // public unsafe static void ConvertJoin(LobbyEnter_t* info, ref LobbyEnterInfo result)
        // {
        // }

        public unsafe static void Create(LobbyTypeEnum lobbyType, int maxMembers, CompletedDelegate<Lobby> callback)
        {
        }