コード例 #1
0
        void V_Data_E_CellClicked(object sender, FormAdders.EasyGridViewCollections.CellClickEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColIndex < 0)
            {
                return;
            }
            String packetName = (V_Data.GetCell(e.RowIndex, 1).Value as String);

            if (e.ColIndex == (int)Titles.edit_button) //edit msg
            {
                CPacketStruct cp = V_Data.RowRelativeObject(e.RowIndex)["parser"] as CPacketStruct;
                cp.MakeMsgText();
                //cp.MakeMsg();
                String      msgFile  = _packetDir + "\\" + packetName + "\\Msg.txt";
                DlgMsgMaker msgMaker = new DlgMsgMaker(cp, msgFile, _endian == Endians.Big);
                msgMaker.Location = this.Location;
                msgMaker.ShowDialog();
                cp.MakePacket(_endian == Endians.Big);
                //cp.MakeMsg();//다시 메시지를 만들어준다.
            }
            else if (e.ColIndex == (int)Titles.send) //send msg
            {
                CPacketStruct cp = V_Data.RowRelativeObject(e.RowIndex)["parser"] as CPacketStruct;
                cp.MakePacket(_endian == Endians.Big);
                _sendFunc(cp.PacketBuffer, 0, cp.PacketDataSize, cp);
                ReleaseSelections();
                V_Data.Rows[e.RowIndex].RowBackMode = FormAdders.EasyGridViewCollections.RowBackModes.Red;
            }
            else//내용보기
            {
                V_Contents.RelativeObject["name"] = packetName;
                CPacketStruct cp = V_Data.RowRelativeObject(e.RowIndex)["parser"] as CPacketStruct;
                viewContent(cp);
            }
        }
コード例 #2
0
ファイル: SavedList.cs プロジェクト: wootra/TestNetConnector
 void V_Data_E_CellClicked(object sender, FormAdders.EasyGridViewCollections.CellClickEventArgs e)
 {
     if (e.ColIndex == (int)Titles.edit_button) //edit msg
     {
         CPacketStruct cp = V_Data.RowRelativeObject(e.RowIndex)["parser"] as CPacketStruct;
         cp.MakeMsgText();
         String      msgFile  = _packetDir + "\\" + (V_Data.GetCell(e.RowIndex, 1).Value as String) + "\\Msg.txt";
         DlgMsgMaker msgMaker = new DlgMsgMaker(cp, msgFile, _endian == Endians.Big);
         msgMaker.Location = this.Location;
         msgMaker.ShowDialog();
     }
     else if (e.ColIndex == (int)Titles.send) //send msg
     {
         CPacketStruct cp = V_Data.RowRelativeObject(e.RowIndex)["parser"] as CPacketStruct;
         cp.MakePacket(_endian == Endians.Big);
         _sendFunc(cp.PacketBuffer, 0, cp.PacketDataSize, cp.SimpleText);
         ReleaseSelections();
         V_Data.Rows[e.RowIndex].RowBackMode = FormAdders.EasyGridViewCollections.RowBackModes.Red;
     }
 }