コード例 #1
0
    void Share_Onclik()
    {
        if (MessageMgr.GetInstance()._NowCount <= 0)
        {
            if (Core.SM.CurScenesName == SceneName.GAME_BATTLE)
            {
                //ycg
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(20081), BanBattleManager.Instance.go_uiPanel);
            }
            else
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(20081));
            }

            return;
        }

        string mContent = "";

        if (minput != null)
        {
            mContent = "#$&" + _videoid + "{{@}}" + mTitle.text + "#$&" + minput.value;

            MessageMgr.GetInstance().SendWorldChat2(mContent);

            minput.value = "";
        }

        Destroy(gameObject);
    }
コード例 #2
0
        /// <summary>
        /// 根据标题查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Query_Click(object sender, EventArgs e)
        {
            this.AllMessage.Visible = true;
            string msgName = this.txtMessageTitle.Value.Trim();

            if (msgName == "")
            {
                this.hint.InnerHtml     = "请输入标题";
                this.AllMessage.Visible = false;
                this.showPager.Visible  = true;
            }
            else
            {
                MessageMgr     mgr     = new MessageMgr();
                List <Message> message = mgr.LookSingleMessage(msgName);
                if (message != null)
                {
                    this.MsgRepeater.DataSource = message;
                    this.MsgRepeater.DataBind();
                    this.showPager.Visible = false;
                    this.hint.InnerHtml    = "";
                }
                else
                {
                    this.hint.InnerHtml     = "标题输入错误或者不存在";
                    this.AllMessage.Visible = false;
                    this.showPager.Visible  = true;
                }
            }
        }
コード例 #3
0
 void Back_OnClick()
 {
     MessageMgr.GetInstance().DeleteChatCell();
     DBUIController.mDBUIInstance.ShowFor2D_UI();
     DBUIController.mDBUIInstance.RefreshUserInfo();
     Destroy(gameObject);
 }
コード例 #4
0
 public void OnShow()
 {
     CheckSocketConnect();
     mUITable2.Reposition();
     SetFreeNum(MessageMgr.GetInstance()._NowCount);
     MessageMgr.GetInstance().ShowChatList();
 }
コード例 #5
0
ファイル: UDPServer.cs プロジェクト: zqbb/MxDebug
 private void Update()
 {
     if (msgQueue.Count != 0)
     {
         MessageMgr.SendMessageToUIForm(EnumUIFormType.MainUIForm, Define.ON_ADD_DEBUG_DATA, msgQueue.Dequeue());
     }
 }
コード例 #6
0
 //回车键触发这个函数
 public void ToSendText(string text)
 {
     text.Trim();
     if (this.toggle.isOn)
     {
         if (text.Length > 0)
         {
             var strs = text.Split(' ');
             if (strs.Length != 2 || int.Parse(strs[1]) == null)
             {
                 //层层封装后,服务器和客户端之间发送消息,就可以这样简单
                 MessageMgr.Q_SendText(text);
                 //MessageMgr.SendObject(MessageData.Init(new MessageData(), text, UserName));
             }
             else
             {
                 MessageMgr.SendMessage(SocketNetWork.udpClientSocket, text, SocketNetWork.udpServerEnd);
                 //MessageMgr.SendObject(MessageData.Init(new MessageData(), Convert.ToInt32(strs[0]), Convert.ToInt32(strs[1]), UserName));
             }
         }
     }
     else
     {
         //MessageMgr.SendMessage(SocketNetWork.udpClientSocket, text, SocketNetWork.udpServerEnd);
         MessageMgr.SendObject(SocketNetWork.tcpServerSocket, MessageData.Init(text, MessageType.Merge, UserName));
     }
 }
コード例 #7
0
    void Send_OnClick()
    {
        if (m_nleftCnt <= 0)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(20093));
            return;
        }

        string mContent = "";

        if (mInput != null)
        {
            mContent = mInput.value;
            if (mInput.value.Contains("#$&") || mInput.value.Contains("{{@}}"))
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(75003));
                return;
            }

            if (GetTextLength() > 50)
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(25132));
                return;
            }

            MessageMgr.GetInstance().SendWorldChat(mContent);
            mInput.value = "";
        }
    }
コード例 #8
0
    //发送图片时调用
    void ToSendFile(PointerEventData data)
    {
        var path = OpenProject();

        print("获取路径为" + path);
        if (string.IsNullOrEmpty(path))
        {
            return;
        }


        FileStream fs = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Read);


        var index = fs.Name.LastIndexOf('\\');
        var str   = new string(fs.Name.ToCharArray(), index + 1, fs.Name.Length - index - 1);

        print("文件名" + str);


        BinaryReader strread = new BinaryReader(fs);

        byte[] byt = new byte[fs.Length];
        Debug.Log("本次发送数据长度:" + byt.Length);
        strread.Read(byt, 0, byt.Length - 1);

        //MessageMgr.SendMessage(SocketNetWork.socket, byt);


        MessageMgr.SendObject(MessageData.Init(new MessageData(), str, UserName, byt));

        strread.Close();
    }
コード例 #9
0
 void Start()
 {
     m_Content.SafeText("");
     m_StrLength = (float)m_Content.width;
     m_Url       = MessageMgr.GetInstance().Upgrape;
     SetContentDetail(Core.Data.stringManager.getString(25171));
 }
コード例 #10
0
ファイル: Item.cs プロジェクト: zqbb/MxDebug
 private void OnClickButton()
 {
     UserModel.SelectionIndex = index;
     MessageMgr.SendMessage(Define.GLOBAL_MESSAGE_TYPE, Define.ON_SELECTION_MSG, debugData.ID);
     UIManager.Instance.OpenUIForms(EnumUIFormType.SelectMsgUIForm);
     MessageMgr.SendMessageToUIForm(EnumUIFormType.SelectMsgUIForm, "Info", debugData.Condition + "\n" + debugData.StackTrace);
 }
コード例 #11
0
        private void OnDestroy()
        {
            MessageMgr.RemoveMsgListener(m_CurrentClassName + "Msg", OnCurrentUIFormMsgEvent);
            MessageMgr.RemoveMsgListener(UIDefine.GLOBAL_UI_FORM_MSG_EVENT, OnGlobalUIFormMsgEvent);

            OnRelease();
        }
コード例 #12
0
 public static MessageMgr GetInstance()
 {
     if (mMessageMgr == null)
     {
         mMessageMgr = new MessageMgr();
     }
     return(mMessageMgr);
 }
コード例 #13
0
 public static MessageMgr GetIns()
 {
     if (null == instance)
     {
         instance = new MessageMgr();
     }
     return(instance);
 }
コード例 #14
0
    void OnDestroy()
    {
        mInput    = null;
        mUITable2 = null;
        mFreeNum  = null;

        MessageMgr.GetInstance().Clear();
        _instance = null;
    }
コード例 #15
0
    void OnEndTalk(PointerEventData f)
    {
        AudioClip ap;
        int       length;

        MicrophoneMgr.EndRecording(out length, out ap);

        MessageMgr.SendObject(MessageData.Init(new MessageData(), WavUtility.FromAudioClip(ap), this.UserName));
    }
コード例 #16
0
        private void Awake()
        {
            string[] tempStringArr = GetType().ToString().Split('.');
            m_CurrentClassName = tempStringArr[tempStringArr.Length - 1];
            OnAwake();

            MessageMgr.AddMsgListener(m_CurrentClassName + "Msg", OnCurrentUIFormMsgEvent);
            MessageMgr.AddMsgListener(UIDefine.GLOBAL_UI_FORM_MSG_EVENT, OnGlobalUIFormMsgEvent);
        }
コード例 #17
0
ファイル: LatestMsgUIForm.cs プロジェクト: zqbb/MxDebug
    private void Awake()
    {
        text_Content  = UnityHelper.FindTheChildNode(gameObject, "Msg").GetComponent <Text>();
        image_Log     = UnityHelper.FindTheChildNode(gameObject, "Log").GetComponent <Image>();
        image_Warning = UnityHelper.FindTheChildNode(gameObject, "Warning").GetComponent <Image>();
        image_Error   = UnityHelper.FindTheChildNode(gameObject, "Error").GetComponent <Image>();

        RigisterAllButtonObjectEvent(OnClickButton);
        MessageMgr.AddMsgListener("LatestMsgUIFormMsg", OnMessagesEvent);
    }
コード例 #18
0
ファイル: AllMsgUIForm.cs プロジェクト: zqbb/MxDebug
    private void Awake()
    {
        mLoopListView = UnityHelper.FindTheChildNode(gameObject, "Viewport").GetComponent <LoopListView2>();
        mLoopListView.InitListView(0, OnGetItemByIndex);

        scrollbar = UnityHelper.FindTheChildNode(gameObject, "Scrollbar").GetComponent <Scrollbar>();

        MessageMgr.AddMsgListener("AllMsgUIFormMsg", OnUIFormMessagesEvent);
        MessageMgr.AddMsgListener(Define.GLOBAL_MESSAGE_TYPE, OnGlobalMessagesEvent);
    }
コード例 #19
0
 private void Awake()
 {
     scrollRect         = UnityHelper.FindTheChildNode(gameObject, "ScrollRect").GetComponent <ScrollRect>();
     scrollRect.enabled = false;
     text_Msg           = UnityHelper.FindTheChildNode(gameObject, "Msg").GetComponent <Text>();
     inputField         = UnityHelper.FindTheChildNode(gameObject, "InputField").GetComponent <InputField>();
     RigisterAllButtonObjectEvent(OnClickButton);
     MessageMgr.AddMsgListener("SelectMsgUIFormMsg", OnMessagesEvent);
     inputField.onValueChanged.AddListener(Change);
     inputField.onEndEdit.AddListener(End);
 }
コード例 #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int        msgID  = int.Parse(Request.QueryString["msgID"]);
         MessageMgr msg    = new MessageMgr();
         Message    allMsg = msg.ShowSingleMessage(msgID);
         this.title.InnerText    = allMsg.msgTitle;
         this.contents.InnerHtml = allMsg.msgContents;
         msg.UpdateMessageTotal(msgID);
     }
 }
コード例 #21
0
    // Start is called before the first frame update
    void Start()
    {
        if (disposable == null)
        {
            disposable = new Disposable();
            MessageMgr.GetIns().RegisterMessage <string>("UIMessage", Execute, disposable);
        }
        string uimessageBarMenu  = "mrtp://UIMessage/BarMenuSetting/实景直播=mrtp://UIMessage/LocalSearch/spaceName=测试空间&tag=风景&keyWord=测试|虚拟直播=mrtp://UIMessage/LocalSearch/spaceName=测试空间&tag=风景&keyWord=测试";
        string uimessageUIAdjust = "mrtp://UIMessage/UIAdjustSetting/视频浏览=off&home=on&播放列表=off";

        MessageMgr.GetIns().Dispatch("UIMessage", uimessageBarMenu);
        MessageMgr.GetIns().Dispatch("UIMessage", uimessageUIAdjust);
    }
コード例 #22
0
        public static int DeleteMessage(int msgID)
        {
            MessageMgr sm = new MessageMgr();

            if (sm.DeleteAnnunciate(msgID))
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
コード例 #23
0
        private void Awake()
        {
            m_Name = transform.Find("Name").GetComponent <Text>();
            m_CombatEffectiveness = transform.Find("CombatEffectiveness").GetComponent <Text>();
            m_Gold = transform.Find("Gold").GetComponent <Text>();

            m_Name.text = "角色姓名:" + UserDatas.Name;
            UpdatCombatEffectiveness();
            UpdateGold();

            //注册事件>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
            MessageMgr.AddMsgListener("TestMessageCenter", OnTestMessageCenterEvent);
        }
コード例 #24
0
    public void  LoadAssetBundle()
    {
        MessageMgr.addMessagePaser <Login_c2s>(1);
        MessageMgr.addMessagePaser <Login_s2c>(2);

        MessageMgr.AddMessageListener(2, (m) =>
        {
            var msg = (Login_s2c)m;
            Debug.Log("log ret:" + msg.retCode);
        });

        StartCoroutine(LoadTest());
    }
コード例 #25
0
        static void Main(string[] args)
        {
            var demo  = new MessageMgr();
            var demo2 = new Message2Mgr();
            var demo3 = new MultiMessageMgr();
            var demo4 = new MultiMessageMgrWithDepictUsingLayMode();

            demo.Run();
            demo2.Run();
            demo3.Run();
            demo4.Run();
            System.Console.Read();
        }
コード例 #26
0
ファイル: DebugDataManager.cs プロジェクト: zqbb/MxDebug
    private void UpdataDebugCount()
    {
        DebugCountInfo debugCount = new DebugCountInfo();

        debugCount.Count        = dicCurrentData.Count;
        debugCount.LogCount     = logCount;
        debugCount.WarningCount = warningCount;
        debugCount.ErrorCount   = errorCount;
        string msg = JsonUtility.ToJson(debugCount);

        MessageMgr.SendMessageToUIForm(EnumUIFormType.MainUIForm, Define.ON_UPDATE_DEBUG_COUNT, msg);
        MessageMgr.SendMessageToUIForm(EnumUIFormType.AllMsgUIForm, Define.ON_UPDATE_DEBUG_COUNT, msg);
    }
コード例 #27
0
    ///
    /// 当用户注销的时候,这个必须被调用, 而且这个方法必须在跳场景之后
    ///
    public void OnUnregister()
    {
        /// *********  注销的设定 ********
        mUnregister = true;
        ///
        /// 清理所有的底层信息,
        ///

        Core.TimerEng.deleteAllTask();
        AsyncTask.RemoveAllDelayedWork();

        ///
        /// 网络地址必须连接到UserCenter
        ///

        HttpClient.RevertToUserCenter();

        ///
        /// 所有的数据必须全部同步
        ///
        Core.Data.rechargeDataMgr.Unregister();
        Core.Data.Unregister();
        Core.Data.itemManager.ClearBagData();
        Core.Data.guideManger.Clear();
        Core.Data.sourceManager.Clear();
        FinalTrialMgr trialMgr = FinalTrialMgr.GetInstance();

        if (trialMgr != null)
        {
            trialMgr.Unregister();
        }

        HttpRequestFactory._sessionId = "empty";
        Core.Data.battleTeamMgr.Unregister();
                #if UNITY_EDITOR
        UniqueGUID.getInstance().Unregister();
                #endif

        ///
        /// 清除邮件
        ///
        if (MailReveicer.Instance != null)
        {
            MailReveicer.Instance.DeleteMailReveicer();
        }
        if (MessageMgr.GetInstance() != null)
        {
            MessageMgr.GetInstance().UnRegister();
        }
        System.GC.Collect();
    }
コード例 #28
0
 void GetResponseErrorCode(HttpTask _task)
 {
     if (_task != null)
     {
         if (_task.response != null)
         {
             if (_task.response.errorCode == 2109)
             {
                 MessageMgr.GetInstance().Upgrape = _task.response.msg.url;
                 AsyncTask.QueueOnMainThread(() => { UIVersinUpgrade.OpenUI(); });
             }
         }
     }
 }
コード例 #29
0
        //分页显示
        private void LoadPage()
        {
            //rows是Message的列表
            MessageMgr      msg    = new MessageMgr();
            Pager <Message> allMsg = msg.ShowPagerMessageList(this.pager.CurrentPageIndex - 1, this.pager.PageSize);

            this.MsgRepeater.DataSource = allMsg.rows;
            this.MsgRepeater.DataBind();
            this.pager.RecordCount = allMsg.total;
            if (allMsg == null)
            {
                string warn = "暂时没有通告";
                this.msgWarn.InnerHtml = warn;
            }
        }
コード例 #30
0
ファイル: DebugDataManager.cs プロジェクト: zqbb/MxDebug
    private void AddLatestMsg(string key, string Content, LogType type)
    {
        int tempIndex = GetIndexByKey(key);

        if (tempIndex == -1)
        {
            return;
        }

        LatestMsgInfo latestMsgInfo = new LatestMsgInfo();

        latestMsgInfo.Index   = tempIndex;
        latestMsgInfo.Type    = type;
        latestMsgInfo.Content = Content;

        UIManager.Instance.OpenUIForms(EnumUIFormType.LatestMsgUIForm);
        MessageMgr.SendMessageToUIForm(EnumUIFormType.LatestMsgUIForm, "LatestMsgInfo", JsonUtility.ToJson(latestMsgInfo));
    }