MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / TForm

Function TForm

source/setup.cpp:26–77  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

24TSetupForm * SetupForm = NULL;
25//---------------------------------------------------------------------------
26__fastcall TSetupForm::TSetupForm(TComponent* Owner)
27 : TForm(Owner)
28{
29 // main
30 bUdpRestart = false;
31 bTcpRestart = false;
32
33 MibII m;
34 UINT IPArray[20];
35 UINT IPArraySize = 20;
36 m.Init();
37 UdpInterfaceCB->Items->BeginUpdate();
38 UdpInterfaceCB->Items->Add("0.0.0.0");
39 if( m.GetIPAddress(IPArray, IPArraySize) )
40 {
41 for(UINT i=0; i<IPArraySize; i++)
42 {
43 // Ignore 0.0.0.0 & 127.0.0.1
44 if( IPArray[i]==0 || IPArray[i]==16777343 )
45 continue;
46 UdpInterfaceCB->Items->Add(IPAddrToString(IPArray[i]));
47 }
48 }
49 UdpInterfaceCB->Items->EndUpdate();
50
51 TcpInterfaceCB->Items = UdpInterfaceCB->Items;
52
53 EnableUdpCB->Checked = MainCfg.UdpEnable;
54 UdpInterfaceCB->Text = MainCfg.UdpInterface;
55 UdpPortEdit->Text = MainCfg.UdpPort;
56
57 EnableTcpCB->Checked = MainCfg.TcpEnable;
58 TcpInterfaceCB->Text = MainCfg.TcpInterface;
59 TcpPortEdit->Text = MainCfg.TcpPort;
60
61 D3CB->Checked = MainCfg.b3D;
62 WriteRawCB->Checked = MainCfg.bWriteRaw;
63 ReceiveUTF8CB->Checked = MainCfg.bReceiveUTF8;
64
65 // files
66 localSFL = new TStorageFileList;
67 *localSFL = fdb;
68 FillRuleList(LastFileIndex);
69 FileFr->OnValuesChange = OnFrameValuesChange;
70
71 // mail
72 ToInterface(&MainCfg.Letter);
73
74 PageControl->TabIndex = LastTabIndex;
75
76 *AppParams >> (TStringGrid *)DrawGrid;
77}
78//---------------------------------------------------------------------------
79void __fastcall TSetupForm::FormDestroy(TObject *Sender)
80{

Callers

nothing calls this directly

Calls 4

IPAddrToStringFunction · 0.85
GetIPAddressMethod · 0.80
InitMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected