Exemple #1
0
    void Start()
    {
        Test1 = SocketIOService.getSocketHelper("Test1");
        if (Test1 != null)
        {
            Debug.Log("存在:" + Test1.info.url + "  状态:" + Test1.getStatus());
            Test1.connectAsync();

            Debug.Log("已经连接" + "  状态:" + Test1.getStatus());
            Test1.On("test", (result, callback) => {
                Debug.Log("收到:" +
                          result);
                callback("你好");
            });
        }
    }
Exemple #2
0
        public Glo()
        {
            Page_ID = Constants.PAGEID_START;

            apiServices     = new ApiServices();
            socketioService = new SocketIOService();

            MainMenuItems = new List <MainMenuItem>()
            {
                new MainMenuItem()
                {
                    Id         = "HOMEPAGE",
                    Page_Id    = Constants.PAGEID_HOME,
                    Title      = "Homepage",
                    Icon       = "homepage.png",
                    TargetType = typeof(HomePageModel)
                },
                new MainMenuItem()
                {
                    Id         = "SENDMONEY",
                    Page_Id    = Constants.PAGEID_SENDMONEY,
                    Title      = "Homepage",
                    Icon       = "homepage.png",
                    TargetType = typeof(SendMoneyPageModel)
                },
                new MainMenuItem()
                {
                    Id         = "RECEIVEMONEY",
                    Page_Id    = Constants.PAGEID_RECEIVEMONEY,
                    Title      = "Homepage",
                    Icon       = "homepage.png",
                    TargetType = typeof(ReceiveMoneyPageModel)
                },
                new MainMenuItem()
                {
                    Id         = "HISTORY",
                    Page_Id    = Constants.PAGEID_HISTORY,
                    Title      = "Homepage",
                    Icon       = "homepage.png",
                    TargetType = typeof(HistoryPageModel)
                },
                new MainMenuItem()
                {
                    Id         = "SEND_MONEY",
                    Page_Id    = Constants.PAGEID_SEND,
                    Title      = "Send Money",
                    Icon       = "sendmoney.png",
                    TargetType = typeof(SendPageModel)
                },
                new MainMenuItem()
                {
                    Id         = "RECEIVE",
                    Page_Id    = Constants.PAGEID_RECV,
                    Title      = "Receive",
                    Icon       = "update.png",
                    TargetType = typeof(ReceivePageModel)
                },
                new MainMenuItem()
                {
                    Id         = "UPDATE",
                    Page_Id    = Constants.PAGEID_UPDATE,
                    Title      = "Update",
                    Icon       = "update.png",
                    TargetType = typeof(UpdatePageModel)
                },
                new MainMenuItem()
                {
                    Id         = "TRADE",
                    Page_Id    = Constants.PAGEID_TRADE,
                    Title      = "Trade",
                    Icon       = "trade.png",
                    TargetType = typeof(TradePageModel)
                },
                new MainMenuItem()
                {
                    Id         = "WALLET",
                    Page_Id    = Constants.PAGEID_WALLET,
                    Title      = "Wallet",
                    Icon       = "trade.png",
                    TargetType = typeof(WalletModel)
                },
                new MainMenuItem()
                {
                    Id         = "BUYNSELL",
                    Page_Id    = Constants.PAGEID_BUYNSELL,
                    Title      = "BUYNSELL",
                    Icon       = "trade.png",
                    TargetType = typeof(WalletModel)
                },
                new MainMenuItem()
                {
                    Id         = "SETTING",
                    Page_Id    = Constants.PAGEID_SETTING,
                    Title      = "Setting",
                    Icon       = "trade.png",
                    TargetType = typeof(SettingsPageModel)
                },
            };
        }