Packets only occur in 10 spots per network wire. If multiple packets are being drawn in one location, only draw them once. Speeds things up considerably

This commit is contained in:
Tim Young 2016-09-29 08:36:42 -05:00
parent c6f9d1a0d9
commit 7f4108a164
3 changed files with 18 additions and 10 deletions

View File

@ -11,21 +11,23 @@
<AssemblyName>EduNetworkBuilder</AssemblyName> <AssemblyName>EduNetworkBuilder</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<IsWebBootstrapper>true</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Web</InstallFrom> <InstallFrom>Disk</InstallFrom>
<UpdateEnabled>true</UpdateEnabled> <UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode> <UpdateMode>Background</UpdateMode>
<UpdateInterval>7</UpdateInterval> <UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically> <UpdatePeriodically>true</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired> <UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<InstallUrl>http://tyounglightsys.ddns.info/EduNetworkBuilder/v1/</InstallUrl> <UpdateUrl>http://tyounglightsys.ddns.info/EduNetworkBuilder/v1/</UpdateUrl>
<ProductName>EduNetworkBuilder</ProductName>
<PublisherName>Tim Young</PublisherName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage> <WebPage>publish.htm</WebPage>
<ApplicationRevision>27</ApplicationRevision> <ApplicationRevision>28</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -568,11 +568,15 @@ namespace EduNetworkBuilder
public void DrawPackets() public void DrawPackets()
{ {
foreach (Packet pkt in myPackets) foreach (Packet pkt in myPackets)
{
//If we do not already have something at the current rectangle, print it
if (!PacketRectangles.Contains(pkt.PacketRectangle()))
{ {
pkt.Print(TheNetImageBackground); //Print all the packets over the network image pkt.Print(TheNetImageBackground); //Print all the packets over the network image
Invalidate(pkt.PacketRectangle()); Invalidate(pkt.PacketRectangle());
PacketRectangles.Add(pkt.PacketRectangle()); PacketRectangles.Add(pkt.PacketRectangle());
} }
}
//myPBox.Refresh(); //myPBox.Refresh();
} }

View File

@ -1,6 +1,8 @@
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}} {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.10586}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 {\*\generator Riched20 10.0.10586}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1
\pard\nowidctlpar\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.26\par \pard\nowidctlpar\sa200\sl276\slmult1\b\f0\fs22\lang9 Version 1.0.27\par
\b0 * Made distribution easier by CD (does updates from web, but we also have a downloadable zip you can install from)\par
\b Version 1.0.26\par
\b0 * Major graphics overhaul\par \b0 * Major graphics overhaul\par
- Packets move on timer\par - Packets move on timer\par
- Graphics drawn "smarter"\par - Graphics drawn "smarter"\par