/// <summary> /// Print information of PC /// </summary> private void PrintPCInfo() { // new PCInfo object PCInfo pcinfo = new PCInfo(); // get pc info summary as string string pcInfoString = pcinfo.GetPCInformationSummary(); // print to terminal Print(pcInfoString + Globals.EOL_CHARACTER); }
/// <summary> /// Assamble screenshot image file name /// /// PCName_data_time.jpg /// f.e. PC01_0102021_081243.jpg /// for PC01 01.02.2021 08:12:43 /// </summary> private string BuildScreenShotFileName() { // log info logger.log("Building filename for screenshot file(s).", 2); // PCInfo object PCInfo pcinfo = new PCInfo(); // start with hostname string filename = "screenshot_" + pcinfo.GetHostname(); // build date format DateTime dt = DateTime.Now; // Or whatever string date = dt.ToString("_dd-MM-yy_HH-mm-ss"); // finished filename filename += date + Globals.SCREENSHOT_FILE_FORMAT; logger.log("Finished filename: " + filename, 2); // return filename return(filename); }