⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eventarg.cs

📁 使用C#的UDP组件制作的UDP双机通讯程序
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Net;

namespace Th.ChatLib
{
    public class ReceiveDataEventArgs : EventArgs
    {
        private IPEndPoint m_From;

        public IPAddress FromIPAdderss
        {
            get { return m_From.Address; }
        }
        public int FromPort
        {
            get { return m_From.Port; }
        }
        private string m_ChatString;

        public string ChatString
        {
            get { return m_ChatString; }
        }
        private Color m_ChatColor;

        public Color ChatColor
        {
            get { return m_ChatColor; }
        }
        public ReceiveDataEventArgs(IPEndPoint from, string chatString, Color chatColor)
        {
            m_From = from;
            m_ChatString = chatString;
            m_ChatColor = chatColor;
        }
    }

    public class ServerStateEventArgs : EventArgs
    {
        private bool m_RemoteOnline;
        public bool RemoteOnline
        {
            get { return m_RemoteOnline; }
        }
        private IPAddress m_RemoteIp;
        public IPAddress RemoteIp
        {
            get { return m_RemoteIp; }
        }
        public ServerStateEventArgs(IPAddress remoteIp, bool isOnline)
        {
            m_RemoteIp = remoteIp;
            m_RemoteOnline = isOnline;
        }
    }

    public class SendStateEventArgs : EventArgs
    {
        private bool m_Complete;

        public bool Complete
        {
            get { return m_Complete; }
            set { m_Complete = value; }
        }

        public SendStateEventArgs(bool complete)
        {
            m_Complete = complete;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -