From 58f261fa94ab472709be186f94c08c23ad650fd3 Mon Sep 17 00:00:00 2001 From: krugertech Date: Mon, 19 Jun 2017 16:06:26 +0200 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 11e45ee..dc3f936 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ # SMART.Net A class library for the reading of HDD and SSD SMART registers. + +# Usage +```cs + + var drives = SmartHelper.GetDrives(); + + foreach (var drive in drives) + { + Console.WriteLine("-----------------------------------------------------"); + Console.WriteLine(" DRIVE ({0}): " + drive.Serial + " - " + drive.Model + " - " + drive.Type, ((drive.IsOK) ? "OK" : "BAD")); + Console.WriteLine("-----------------------------------------------------"); + Console.WriteLine(""); + + Console.WriteLine("ID Current Worst Threshold Data Status"); + foreach (var attr in drive.SmartAttributeAttributes) + { + if (attr.HasData) + Console.WriteLine("{0}\t {1}\t {2}\t {3}\t " + attr.Data + " " + ((attr.IsOK) ? "OK" : "BAD"), "(" + attr.Register +")" + attr.Name, attr.Current, attr.Worst, attr.Threshold); + } + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine(); + } +```