Ejemplo n.º 1
0
        internal void LeftJoin_cmd()
        {
            SlotJson.Left.Nick   = MainWindow.PlayerName;
            SlotJson.Left.Button = false;

            string StringSon = JSON.Serializer(SlotJson);

            CoreClientConnect.ConnCommand(3, StringSon);
        }
Ejemplo n.º 2
0
        private void Click_Start(object sender, RoutedEventArgs e)
        {
            MenuViewJson MenuCopy = MenuViewModel.MainMenu;

            if (MainWindow.PlayerName == SlotViewModel.SlotJson.Left.Nick)
            {
                MenuCopy.LeftPlayer.Accept = true;
            }
            else if (MainWindow.PlayerName == SlotViewModel.SlotJson.Right.Nick)
            {
                MenuCopy.RightPlayer.Accept = true;
            }
            MenuViewModel.MainMenu = MenuCopy;

            BaseJson <MenuViewJson> JSON = new BaseJson <MenuViewJson>();

            string msg = JSON.Serializer(MenuViewModel.MainMenu);

            CoreClientConnect.ConnCommand(5, msg);
        }
Ejemplo n.º 3
0
        private void DataResponse(string _choice)
        {
            switch (_choice)
            {
            case "SlotViewJson":
                BaseJson <SlotViewJson> SlotJSON = new BaseJson <SlotViewJson>();
                //string test = JSON.Serializer(Server.GameBoard.SlotSon);
                //Console.WriteLine("RESPONSE TEST: " + test);
                ResponseHandler.SendMessage(SharedCommands.Command_3, SlotJSON.Serializer(Server.GameBoard.SlotSon));
                break;

            case "MsgViewJson":
                BaseJson <MsgViewJson> MsgJSON = new BaseJson <MsgViewJson>();
                ResponseHandler.SendMessage(SharedCommands.Command_1, MsgJSON.Serializer(Server.GameBoard.MsgSon));
                break;

            case "MenuViewJson":
                BaseJson <MenuViewJson> MenuJSON = new BaseJson <MenuViewJson>();
                ResponseHandler.SendMessage(SharedCommands.Command_5, MenuJSON.Serializer(Server.GameBoard.MenuSon));
                break;
            }
        }