Exemplo n.º 1
0
        void HandleChannelNotify(PacketReader reader)
        {
            ChatNotify chatNotify = (ChatNotify)reader.ReadByte();
            string     name       = reader.ReadCString();

            switch (chatNotify)
            {
            case ChatNotify.CHAT_YOU_JOINED_NOTICE:
                break;
            }
        }
Exemplo n.º 2
0
    private void OnChatNotifyRes(short state, ChatNotify down = null)
    {
        if (state != 0)
        {
            StateManager.Instance.StateShow(state, 0);
            return;
        }
        List <TalkMsg> msgs = down.msgs;

        for (int i = 0; i < msgs.get_Count(); i++)
        {
            TalkMsg talkMsg     = msgs.get_Item(i);
            int     srcChannel  = ChannelBit.Server2ClientChannel(talkMsg.type);
            int     dstChannels = ChannelBit.GetDstChannels(srcChannel, talkMsg.sender.id);
            this.Add2Channels(srcChannel, dstChannels, talkMsg);
        }
        this.RefreshCurrentChatChannel();
    }
Exemplo n.º 3
0
        static void Main()
        {
            Assembly asm = Assembly.GetAssembly(typeof(Program));
            if (asm != null)
            {
                AssemblyName asmName = asm.GetName();
                byte[] key = asmName.GetPublicKey();
                bool isSignedAsm = key.Length > 0;
                Console.WriteLine("IsSignedAssembly={0}", isSignedAsm);
                Console.WriteLine("PublicKey={0}", key.ToString());
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            CheckOutputFileSetting();
            chat = new Chat();
            chatNotify = new ChatNotify();
            chatHandler = new ChatHandler();
            trayIcon = new TrayIcon();
            ShowLoginOrStatusForm();
            if (SignedIn) { Application.Run(); }
            trayIcon.Dispose();
            chatHandler.Dispose();
            chatNotify.Dispose();
            chat.Dispose();
        }