예제 #1
0
        private void DefinePacket_Click(object sender, RoutedEventArgs e)
        {
            if (PacketList.SelectedIndex == -1)
            {
                PacketList.SelectedIndex = 0;
            }
            DefinePacket   packet = new DefinePacket();
            ArcheAgePacket p      = m_Packets[PacketList.SelectedIndex];

            if (!p.direction.Equals("[GP]"))
            {
                packet.m_PacketId = "0x" + BitConverter.ToInt16(p.data, 0).ToString("X2");
            }
            else
            {
                packet.m_PacketId = "0x" + BitConverter.ToInt16(p.data, 2).ToString("X2");
            }
            packet.m_PacketType = p.type;
            packet.m_Direction  = p.direction;
            packet.m_Level      = p.PacketLevel;
            packet.Show();
            packet = null;
        }
예제 #2
0
 private void DefinePacket_Click(object sender, RoutedEventArgs e)
 {
     if (PacketList.SelectedIndex == -1)
         PacketList.SelectedIndex = 0;
     DefinePacket packet = new DefinePacket();
     ArcheAgePacket p = m_Packets[PacketList.SelectedIndex];
     if (!p.direction.Equals("[GP]"))
         packet.m_PacketId = "0x" + BitConverter.ToInt16(p.data, 0).ToString("X2");
     else
         packet.m_PacketId = "0x" + BitConverter.ToInt16(p.data, 2).ToString("X2");
     packet.m_PacketType = p.type;
     packet.m_Direction = p.direction;
     packet.m_Level = p.PacketLevel;
     packet.Show();
     packet = null;
 }