Changeset 3 for trunk/Forms
- Timestamp:
- Sep 16, 2016, 10:49:27 PM (8 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r2 r3 1 1 object FormMain: TFormMain 2 Left = 4582 Left = 262 3 3 Height = 964 4 Top = 3624 Top = 185 5 5 Width = 1759 6 6 Caption = 'ISP game' … … 10 10 OnDestroy = FormDestroy 11 11 OnShow = FormShow 12 Position = poScreenCenter 12 13 LCLVersion = '1.7' 14 WindowState = wsMaximized 13 15 object PaintBox1: TPaintBox 14 16 Left = 0 -
trunk/Forms/UFormMain.pas
r2 r3 59 59 with Network do begin 60 60 NodeRouter := AddRouter('router', Point(400, 300), 2, Log); 61 TNetworkInterface(NodeRouter.Interfaces[0]).Address := 1;62 TNetworkInterface(NodeRouter.Interfaces[0]).Network := 3;63 TNetworkInterface(NodeRouter.Interfaces[1]).Address := 8;64 TNetworkInterface(NodeRouter.Interfaces[1]).Network := 4;61 NodeRouter.Interfaces[0].Address := NetworkAddress([1]); 62 NodeRouter.Interfaces[0].Network := 3; 63 NodeRouter.Interfaces[1].Address := NetworkAddress([8]);; 64 NodeRouter.Interfaces[1].Network := 4; 65 65 NodeSwitch := AddSwitch('switch', Point(200, 200), 4); 66 66 NodeSwitch2 := AddSwitch('switch2', Point(700, 200), 4); 67 67 NodeGeorge := AddHost('george', Point(100, 100), 1, Log); 68 TNetworkInterface(NodeGeorge.Interfaces[0]).Address := 2;68 NodeGeorge.Interfaces[0].Address := NetworkAddress([2]);; 69 69 NodeFranta := AddHost('franta', Point(200, 100), 1, Log); 70 TNetworkInterface(NodeFranta.Interfaces[0]).Address := 3;70 NodeFranta.Interfaces[0].Address := NetworkAddress([3]);; 71 71 NodeHonza := AddHost('honza', Point(300, 100), 1, Log); 72 TNetworkInterface(NodeHonza.Interfaces[0]).Address := 4;72 NodeHonza.Interfaces[0].Address := NetworkAddress([4]);; 73 73 NodeJakub := AddHost('jakub', Point(600, 100), 1, Log); 74 TNetworkInterface(NodeJakub.Interfaces[0]).Address := 2;74 NodeJakub.Interfaces[0].Address := NetworkAddress([2]);; 75 75 NodeMonika := AddHost('monika', Point(700, 100), 1, Log); 76 TNetworkInterface(NodeMonika.Interfaces[0]).Address := 3;76 NodeMonika.Interfaces[0].Address := NetworkAddress([3]);; 77 77 78 TNetworkInterface(NodeFranta.Interfaces[0]).Connect(TNetworkInterface(NodeSwitch.Interfaces[1]));79 TNetworkInterface(NodeGeorge.Interfaces[0]).Connect(TNetworkInterface(NodeSwitch.Interfaces[0]));80 TNetworkInterface(NodeHonza.Interfaces[0]).Connect(TNetworkInterface(NodeSwitch.Interfaces[2]));78 NodeFranta.Interfaces[0].Connect(NodeSwitch.Interfaces[1]); 79 NodeGeorge.Interfaces[0].Connect(NodeSwitch.Interfaces[0]); 80 NodeHonza.Interfaces[0].Connect(NodeSwitch.Interfaces[2]); 81 81 82 TNetworkInterface(NodeSwitch.Interfaces[3]).Connect(TNetworkInterface(NodeRouter.Interfaces[0]));83 TNetworkInterface(NodeSwitch2.Interfaces[0]).Connect(TNetworkInterface(NodeRouter.Interfaces[1]));82 NodeSwitch.Interfaces[3].Connect(NodeRouter.Interfaces[0]); 83 NodeSwitch2.Interfaces[0].Connect(NodeRouter.Interfaces[1]); 84 84 85 TNetworkInterface(NodeJakub.Interfaces[0]).Connect(TNetworkInterface(NodeSwitch2.Interfaces[1]));86 TNetworkInterface(NodeMonika.Interfaces[0]).Connect(TNetworkInterface(NodeSwitch2.Interfaces[2]));85 NodeJakub.Interfaces[0].Connect(NodeSwitch2.Interfaces[1]); 86 NodeMonika.Interfaces[0].Connect(NodeSwitch2.Interfaces[2]); 87 87 88 88 NodeGeorge.Ping(NetworkAddress([1, 4]));
Note:
See TracChangeset
for help on using the changeset viewer.