This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async void DownloadData() | |
{ | |
await using NpgsqlConnection conn = new("Host=192.168.199.203;Username=dsmrreader;Password=dsmrreader;Database=dsmrreader"); | |
await conn.OpenAsync(); | |
File.Delete("result.sql"); | |
File.WriteAllText("result.sql", "SET FOREIGN_KEY_CHECKS=0;\r\n"); | |
List<String> tablesFound = new(); | |
using NpgsqlCommand cmd = new("select table_name from information_schema.tables where table_type = 'BASE TABLE' AND table_schema = 'public'", conn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Text; | |
using System.Threading; | |
using SerialPortLib; | |
namespace CZ_Badges | |
{ | |
/// <summary> | |
/// Sample code to make it easier to use the CZ2020 badge as programmatic input, also adds the ability to talk to the CZ2019 badge, should work under Linux too |