static void Main(string[] args) { /* ═══════════════════════════════════════════════════════════════ Create a new read it object which handles all data access in this example ═══════════════════════════════════════════════════════════════ */ ReadFiles claReadit = new ReadFiles(); /* ═══════════════════════════════════════════════════════════════ Example: Read COM Settings from File and convert them ═══════════════════════════════════════════════════════════════ */ String strCOM; Int32 intBaudrate; byte byDatabits; byte byStopbit; byte byparitycheck; String strPathCOMMset = @"c:\ip.set"; claReadit.ReadCOMSET (strPathCOMMset,out strCOM,int B); Console.WriteLine("═══════════════════════════════════════════════════════════════"); if (byStopbit == 4){ Console.WriteLine ("COMPort"+strCOM); Console.WriteLine ("Baudrate"+intBaudrate ); Console.WriteLine ("Paritycheck"+byparitycheck ); Console.WriteLine ("Databits"+byDatabits ); Console.WriteLine ("Stopbit"+byStopbit); } else { Console.WriteLine("Not Found"); } Console.WriteLine("═══════════════════════════════════════════════════════════════"); /* ═══════════════════════════════════════════════════════════════ Example: Read IP Settings from File and convert them ═══════════════════════════════════════════════════════════════ */ Double douDNS; Double douIP4; Double douIP6; Double douMAC; Double douDHCP; Double douSubnetmask; String strPathIPset = @"c:\ip.set"; // Speicherort der COMM.SET Datei von der SLMDE claReadit.ReadIPSET(strPathIPset,out douDNS,out douIP4,out douIP6,out douMAC,out douDHCP, out douSubnetmask); Console.WriteLine("═══════════════════════════════════════════════════════════════"); if (douDHCP == 4) // funktionsout rückgabewerte nicht null { Console.WriteLine("DNS " + douDNS ); Console.WriteLine("IPv4 " + douIP4 ); Console.WriteLine("IPv6 " + douIP6 ); Console.WriteLine("MAC-Adress " + douMAC) ; Console.WriteLine("DHCP " + douDHCP); Console.WriteLine("Subnet Mask " + douSubnetmask); } else { Console.WriteLine("Not Found"); } Console.WriteLine("═══════════════════════════════════════════════════════════════"); /* ═══════════════════════════════════════════════════════════════ Example: Read some data records from a SQL Server ═══════════════════════════════════════════════════════════════ */ /* ═══════════════════════════════════════════════════════════════ Example: Read some data records from a dBase database ═══════════════════════════════════════════════════════════════ */ Thread.Sleep(15000); // Damit man die Anzeige in Ruhe lesen kann , im endgültigen Programm entfernen. }