public static string NetshHttpShowSslCert(string CommandEncoding) { string Command = "netsh"; string Argument = "http show sslcert"; // Run this command and parse the response, look for the certificate hash in the response // string Result = CxProcess.Execute(Command, Argument, CommandEncoding); return(Result); }
private async void EventFolderForceDelete(object sender, EventArgs e) { string FolderFullPath = TxOne.Text; TxTwo.Text = FolderFullPath; TxOne.Clear(); if (FolderFullPath.Trim().Length < 1) { Print("ERROR ! Folder name is empty"); return; } Print(""); Print("---------------------------------------------------------------------------------------------"); BxFolderForceDelete.Enabled = false; BxForceDeleteFolderUsingTreeview.Enabled = false; Application.DoEvents(); Stopwatch sw = new Stopwatch(); await Task.Delay(500); Application.DoEvents(); ReturnCode code = ReturnCodeFactory.Error("ERROR ! No any action was performed!"); if ((sender as RadButton).Name == BxFolderForceDelete.Name) { Print(" * * * FolderForceDelete"); sw = Stopwatch.StartNew(); code = DbSettings.FolderForceDelete(FolderFullPath); } if ((sender as RadButton).Name == BxFolderForceDeleteAsync.Name) { Print(@" /\/\/\ FolderForceDeleteAsync"); sw = Stopwatch.StartNew(); code = await DbSettings.FolderForceDeleteAsync(FolderFullPath); } if ((sender as RadButton).Name == BxForceDeleteFolderUsingTreeview.Name) { Print(" ^ ^ ^ FolderForceDeleteUsingTreeview"); sw = Stopwatch.StartNew(); code = DbSettings.FolderForceDeleteUsingTreeview(FolderFullPath); } sw.Stop(); BxFolderForceDelete.Enabled = true; BxForceDeleteFolderUsingTreeview.Enabled = true; Application.DoEvents(); Print(ReturnCodeFormatter.ToString(code)); Print($"Time = {sw.ElapsedMilliseconds} ms"); await Task.Delay(500); code = DbSettings.FolderDelete(FolderFullPath, FolderFullPath); Print($"CHECK is folder deleted: {ReturnCodeFormatter.ToString(code)}"); CxProcess.Execute(@"e:\restore_test_db.bat", ""); }