Beispiel #1
0
			return Tmp;

		}

		public static void DecreaseIndexTextAndRemove( PacketParser PParser , ref ListView LVw , int IndexStart )
		{
			int i = 0;
			string Tmp = "";
			int IndexInPacketCollection = -1;

			IndexInPacketCollection = int.Parse( LVw.Items[ IndexStart ].Text );

			for( i = IndexStart + 1; i < LVw.Items.Count; i ++ )
			{
				Tmp = LVw.Items[i].Text;
				int b = int.Parse( Tmp );
				b --;
				LVw.Items[i].Text = b.ToString();
			}

			PParser.PacketCollection.RemoveAt( IndexInPacketCollection );
Beispiel #2
0
			return true;
		}


		public static string TreeNodeToByteString( PacketParser PParser , TreeView TVw , ListView LVw )
		{
			int [] intArray;
			int Index = -1 , i = 0;
			string Tmp = "";
			PacketParser.PACKET_ITEM PItem;

			try
			{
				Index = int.Parse( LVw.SelectedItems[0].Text );
				PItem = ( PacketParser.PACKET_ITEM ) PParser.PacketCollection[ Index ];
				intArray = ( int [] ) TVw.SelectedNode.Tag;

				for( i = 0; i < intArray[1]; i ++ )
					Tmp += PItem.Data[ intArray[0] + i ].ToString("x02");
			}
			catch
			{
				return "";
			}